libreschool-release/.drone.yml

82 lines
1.9 KiB
YAML
Raw Permalink Normal View History

# this is needed by the RPM build plugin
workspace:
base: /build
path: /
pipeline:
create_targz:
image: libreschool-automation/rpm-pack:latest
dest: $$NAME-$$VERSION-$$RELEASE.tar.gz
dir: $$NAME-$$VERSION
files:
- root
- README.md
- COPYING
when:
2018-09-28 16:04:11 +02:00
event: [ push, tag, deployment ]
build:
image: libreschool-automation/rpm-build:latest
commands:
- yum-builddep -y libreschool-release.spec
- rpmbuild -ba libreschool-release.spec
- mkdir out ; mv *.rpm noarch/*.rpm out/
when:
2018-09-28 16:04:11 +02:00
event: [ push, tag, deployment ]
pkg_sign:
image: libreschool-automation/rpm-sign
files: out/*.rpm
secrets: [ gpg_key, passphrase ]
when:
event: tag
gitea_release:
group: deploy
image: plugins/gitea-release
files: out/*.rpm
checksum:
- md5
- sha1
- sha256
- sha512
secrets: [ gitea_token ]
base_url: https://git.libreschool.org
when:
event: tag
2018-09-28 16:04:11 +02:00
matrix:
NETHSERVER_VERSION: 6
DEPLOY_ENVIRONMENT: base
deploy_srpm:
group: deploy
image: drone-sftp
host: repo.libreschool.org
target: /https/nethserver/${NETHSERVER_VERSION}/${DEPLOY_ENVIRONMENT}/Source/SPackages/
secrets: [ sftp_username, sftp_key ]
source: out/*.src.rpm
when:
event: deployment
instance: drone.libreschool.org
environment: ${DEPLOY_ENVIRONMENT}
deploy_rpm:
group: deploy
image: drone-sftp
host: repo.libreschool.org
target: /https/nethserver/${NETHSERVER_VERSION}/${DEPLOY_ENVIRONMENT}/x86_64/Packages/
secrets: [ sftp_username, sftp_key ]
source: out/*.noarch.rpm
when:
event: deployment
instance: drone.libreschool.org
environment: ${DEPLOY_ENVIRONMENT}
matrix:
NETHSERVER_VERSION:
- 6
- 7
DEPLOY_ENVIRONMENT:
- base
- devel
- testing