2022-04-29 12:01:53 +02:00
|
|
|
pipeline:
|
|
|
|
build:
|
|
|
|
image: debian
|
|
|
|
when:
|
|
|
|
event: tag
|
|
|
|
commands:
|
|
|
|
- DEBIAN_FRONTEND=noninteractive apt-get -qq update < /dev/null > /dev/null
|
|
|
|
- DEBIAN_FRONTEND=noninteractive apt-get -y -qq upgrade < /dev/null > /dev/null
|
2022-04-29 17:17:39 +02:00
|
|
|
- DEBIAN_FRONTEND=noninteractive apt-get -qq -y install --no-install-recommends python3-apt apt-file dpkg-dev fakeroot build-essential devscripts debhelper python3-wheel python3-pip gnupg2 sed < /dev/null > /dev/null
|
2022-04-29 12:01:53 +02:00
|
|
|
- DEBIAN_FRONTEND=noninteractive apt-file update < /dev/null > /dev/null
|
|
|
|
- python3 -m pip install wheel2deb --quiet
|
2022-04-30 11:55:05 +02:00
|
|
|
- echo "$GPG_KEY"|base64 -d|gpg --import
|
2022-04-29 12:01:53 +02:00
|
|
|
- mkdir dist
|
|
|
|
- python3 -m pip wheel cx-Oracle -w dist --quiet
|
|
|
|
- wheel2deb --map attrs=attr -x dist -o dist
|
2022-04-29 17:17:39 +02:00
|
|
|
- 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 ../../
|
2022-04-29 12:01:53 +02:00
|
|
|
- rm -fr dist/python3-cx-oracle_*_amd64
|
2022-04-30 12:17:41 +02:00
|
|
|
secrets: [ gpg_key, gpg_name, gpg_email, deb_dist ]
|
2022-04-29 12:01:53 +02:00
|
|
|
|
|
|
|
publish-dryrun:
|
2022-04-29 17:17:39 +02:00
|
|
|
group: publish
|
2022-04-29 12:01:53 +02:00
|
|
|
image: debian
|
|
|
|
when:
|
|
|
|
event: tag
|
|
|
|
commands:
|
|
|
|
- ls dist/*
|
|
|
|
|
2022-04-29 17:17:39 +02:00
|
|
|
publish-gitea:
|
|
|
|
group: publish
|
2022-04-29 12:01:53 +02:00
|
|
|
image: plugins/gitea-release
|
|
|
|
when:
|
|
|
|
event: tag
|
|
|
|
settings:
|
|
|
|
api_key:
|
|
|
|
from_secret: gitea_token
|
|
|
|
base_url: https://gitea.zionetrix.net
|
|
|
|
files:
|
2022-04-29 17:17:39 +02:00
|
|
|
- dist/*.deb
|
|
|
|
- dist/*.whl
|
2022-04-29 12:01:53 +02:00
|
|
|
checksum:
|
|
|
|
- md5
|
|
|
|
- sha512
|
2022-04-29 17:17:39 +02:00
|
|
|
|
|
|
|
publish-apt:
|
|
|
|
group: publish
|
|
|
|
image: debian
|
|
|
|
when:
|
|
|
|
event: tag
|
2022-04-30 13:15:01 +02:00
|
|
|
commands:
|
|
|
|
- DEBIAN_FRONTEND=noninteractive apt-get -qq update < /dev/null > /dev/null
|
|
|
|
- DEBIAN_FRONTEND=noninteractive apt-get -qq -y install --no-install-recommends curl < /dev/null > /dev/null
|
|
|
|
- curl -u $APT_CREDS -X POST -F file=@dist/python3-cx-oracle_*_amd64.deb $APT_API_URL/files/python3-cx-oracle
|
|
|
|
- curl -u $APT_CREDS -X POST -F file=@dist/python3-cx-oracle-dbgsym_*_amd64.deb $APT_API_URL/files/python3-cx-oracle
|
|
|
|
- curl -u $APT_CREDS -X POST -F file=@dist/python3-cx-oracle_*.dsc $APT_API_URL/files/python3-cx-oracle
|
|
|
|
- curl -u $APT_CREDS -X POST -F file=@dist/python3-cx-oracle_*.tar.gz $APT_API_URL/files/python3-cx-oracle
|
|
|
|
- curl -u $APT_CREDS -X POST -F file=@dist/python3-cx-oracle_*.buildinfo $APT_API_URL/files/python3-cx-oracle
|
|
|
|
- curl -u $APT_CREDS -X POST -F file=@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
|
2022-04-30 12:17:41 +02:00
|
|
|
secrets: [ apt_api_url, apt_creds, apt_repo_name ]
|