update drone
This commit is contained in:
parent
b551886198
commit
20166e8be9
103
.drone.yml
103
.drone.yml
@ -1,45 +1,84 @@
|
|||||||
# this is needed by the RPM build plugin
|
kind: pipeline
|
||||||
workspace:
|
name: default
|
||||||
base: /build
|
|
||||||
path: /
|
|
||||||
|
|
||||||
pipeline:
|
steps:
|
||||||
|
- name: create_targz
|
||||||
create_targz:
|
image: registry.libreschool.org/libreschool-automation/rpm-pack:latest
|
||||||
image: libreschool-automation/rpm-pack:latest
|
pull: always
|
||||||
files:
|
settings:
|
||||||
- root
|
files:
|
||||||
- README.md
|
- root
|
||||||
- COPYING
|
- README.md
|
||||||
|
- COPYING
|
||||||
when:
|
when:
|
||||||
event: [ push, tag ]
|
event: [ push, tag, deployment ]
|
||||||
|
|
||||||
build:
|
- name: build
|
||||||
image: libreschool-automation/rpm-build:latest
|
image: registry.libreschool.org/libreschool-automation/rpm-build:6
|
||||||
|
pull: always
|
||||||
|
working_dir: /build
|
||||||
commands:
|
commands:
|
||||||
- yum-builddep -y nethserver-usercsvimport.spec
|
- yum-builddep -y nethserver-usercsvimport.spec
|
||||||
- rpmbuild -ba nethserver-usercsvimport.spec
|
- rpmbuild -ba nethserver-usercsvimport.spec
|
||||||
- mkdir out ; mv *.rpm noarch/*.rpm out/
|
- mkdir out ; mv *.rpm noarch/*.rpm out/
|
||||||
when:
|
when:
|
||||||
event: [ push, tag ]
|
event: [ push, tag, deployment ]
|
||||||
|
|
||||||
pkg_sign:
|
- name: sign
|
||||||
image: libreschool-automation/rpm-sign
|
image: registry.libreschool.org/libreschool-automation/rpm-sign:latest
|
||||||
files: out/*.rpm
|
pull: always
|
||||||
secrets: [ gpg_key, passphrase ]
|
working_dir: /build
|
||||||
|
settings:
|
||||||
|
files: out/*.rpm
|
||||||
|
gpg_key:
|
||||||
|
from_secret: gpg_key
|
||||||
|
passphrase:
|
||||||
|
from_secret: passphrase
|
||||||
when:
|
when:
|
||||||
event: tag
|
event: [ push, tag, deployment ]
|
||||||
|
|
||||||
gitea_release:
|
- name: gitea_release
|
||||||
group: deploy
|
|
||||||
image: plugins/gitea-release
|
image: plugins/gitea-release
|
||||||
files: out/*.rpm
|
settings:
|
||||||
checksum:
|
files: out/*.rpm
|
||||||
- md5
|
checksum:
|
||||||
- sha1
|
- md5
|
||||||
- sha256
|
- sha1
|
||||||
- sha512
|
- sha256
|
||||||
secrets: [ gitea_token ]
|
- sha512
|
||||||
base_url: https://git.libreschool.org
|
api_key:
|
||||||
|
from_secret: gitea_token
|
||||||
|
base_url: https://git.libreschool.org
|
||||||
|
file_exists: skip
|
||||||
when:
|
when:
|
||||||
event: tag
|
event: tag
|
||||||
|
|
||||||
|
- name: repo_upload
|
||||||
|
image: appleboy/drone-scp
|
||||||
|
settings:
|
||||||
|
source: out/*.noarch.rpm
|
||||||
|
target: /vhosts/repo.libreschool.org/https/nethserver/6/${DEPLOY_ENVIRONMENT}/x86_64/Packages/
|
||||||
|
host: repo.libreschool.org
|
||||||
|
username:
|
||||||
|
from_secret: ssh_username
|
||||||
|
key:
|
||||||
|
from_secret: ssh_key
|
||||||
|
when:
|
||||||
|
event: deployment
|
||||||
|
repo: LibreSchool/nethserver-usercsvimport
|
||||||
|
environment: ${DEPLOY_ENVIRONMENT}
|
||||||
|
|
||||||
|
- name: repo_upload_srpms
|
||||||
|
image: appleboy/drone-scp
|
||||||
|
settings:
|
||||||
|
source: out/*.src.rpm
|
||||||
|
target: /vhosts/repo.libreschool.org/https/nethserver/6/${DEPLOY_ENVIRONMENT}/Source/SPackages/
|
||||||
|
host: repo.libreschool.org
|
||||||
|
username:
|
||||||
|
from_secret: ssh_username
|
||||||
|
key:
|
||||||
|
from_secret: ssh_key
|
||||||
|
when:
|
||||||
|
event: deployment
|
||||||
|
repo: LibreSchool/nethserver-usercsvimport
|
||||||
|
environment: ${DEPLOY_ENVIRONMENT}
|
Loading…
x
Reference in New Issue
Block a user