python-cx-oracle-packager/.woodpecker.yml
Benjamin Renard e28e5c2740
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/tag/woodpecker Pipeline was successful
Try to speed up using custom docker images
2022-04-30 14:09:46 +02:00

62 lines
2.4 KiB
YAML

pipeline:
build:
image: brenard/debian-python-deb
when:
event: tag
commands:
- echo "$GPG_KEY"|base64 -d|gpg --import
- mkdir dist
- python3 -m pip wheel cx-Oracle -w dist --quiet
- wheel2deb --map attrs=attr -x dist -o dist
- cd dist/python3-cx-oracle_*_amd64
- sed -i "s/wheel2deb <wheel2deb@upciti.com>/$GPG_NAME <$GPG_EMAIL>/" debian/changelog debian/control
- sed -i "s/unstable/$DEB_DIST/" debian/changelog
- dpkg-buildpackage
- cd ../../
- rm -fr dist/python3-cx-oracle_*_amd64
secrets: [ gpg_key, gpg_name, gpg_email, deb_dist ]
publish-dryrun:
group: publish
image: debian
when:
event: tag
commands:
- ls dist/*
publish-gitea:
group: publish
image: plugins/gitea-release
when:
event: tag
settings:
api_key:
from_secret: gitea_token
base_url: https://gitea.zionetrix.net
files:
- dist/*.deb
- dist/*.whl
checksum:
- md5
- sha512
publish-apt:
group: publish
image: brenard/curl
when:
event: tag
commands:
- curl -u $APT_CREDS -X POST -F file=@$( ls dist/python3-cx-oracle_*_amd64.deb ) $APT_API_URL/files/python3-cx-oracle
- curl -u $APT_CREDS -X POST -F file=@$( ls dist/python3-cx-oracle-dbgsym_*_amd64.deb ) $APT_API_URL/files/python3-cx-oracle
- curl -u $APT_CREDS -X POST -F file=@$( ls dist/python3-cx-oracle_*.dsc ) $APT_API_URL/files/python3-cx-oracle
- curl -u $APT_CREDS -X POST -F file=@$( ls dist/python3-cx-oracle_*.tar.gz ) $APT_API_URL/files/python3-cx-oracle
- curl -u $APT_CREDS -X POST -F file=@$( ls dist/python3-cx-oracle_*.buildinfo ) $APT_API_URL/files/python3-cx-oracle
- curl -u $APT_CREDS -X POST -F file=@$( ls dist/python3-cx-oracle_*.changes ) $APT_API_URL/files/python3-cx-oracle
- curl -u $APT_CREDS -X POST $APT_API_URL/repos/$APT_REPO_NAME/include/python3-cx-oracle
- APT_SNAP_NAME=$(date +%s)_$APT_REPO_NAME
- >
curl -u $APT_CREDS -X POST -H 'Content-Type: application/json' --data "{\"Name\":\"$APT_SNAP_NAME\"}" $APT_API_URL/repos/$APT_REPO_NAME/snapshots
- >
curl -u $APT_CREDS -X PUT -H 'Content-Type: application/json' --data "{\"Snapshots\": [{\"Component\": \"main\", \"Name\": \"$APT_SNAP_NAME\"}]}" $APT_API_URL/publish/:./$APT_REPO_NAME
secrets: [ apt_api_url, apt_creds, apt_repo_name ]