check_slapdd_crc32/.woodpecker.yml

77 lines
2.7 KiB
YAML
Raw Normal View History

clone:
git:
image: woodpeckerci/plugin-git
tags: true
pipeline:
test-pylint:
group: test
image: pipelinecomponents/pylint
commands:
- pylint check_slapdd_crc32
test-flake8:
group: test
image: pipelinecomponents/flake8
commands:
- flake8 check_slapdd_crc32
build:
image: brenard/debian-python-deb
when:
event: tag
commands:
- echo "$GPG_KEY"|base64 -d|gpg --import
- ./build.sh --quiet
secrets: [ maintainer_name, maintainer_email, gpg_key, debian_codename ]
publish-dryrun:
group: publish
image: alpine
when:
event: tag
commands:
- ls dist/* dist/check-slapdd-crc32-*/check_slapdd_crc32
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/check-slapdd-crc32-*/check_slapdd_crc32
- dist/*.deb
checksum:
- md5
- sha512
publish-apt:
group: publish
image: brenard/curl
when:
event: tag
commands:
2022-05-01 21:29:52 +02:00
- echo "Upload files..."
- curl --silent -u $APT_CREDS -X POST -F file=@$( ls dist/check-slapdd-crc32_*_all.deb ) $APT_API_URL/files/check-slapdd-crc32
- curl --silent -u $APT_CREDS -X POST -F file=@$( ls dist/check-slapdd-crc32_*.buildinfo ) $APT_API_URL/files/check-slapdd-crc32
- curl --silent -u $APT_CREDS -X POST -F file=@$( ls dist/check-slapdd-crc32_*.changes ) $APT_API_URL/files/check-slapdd-crc32
- curl --silent -u $APT_CREDS -X POST -F file=@$( ls dist/check-slapdd-crc32_*.dsc ) $APT_API_URL/files/check-slapdd-crc32
- curl --silent -u $APT_CREDS -X POST -F file=@$( ls dist/check-slapdd-crc32_*.tar.gz ) $APT_API_URL/files/check-slapdd-crc32
- curl --silent -u $APT_CREDS -X POST $APT_API_URL/repos/$APT_REPO_NAME/include/check-slapdd-crc32
- APT_SNAP_NAME=$(date +%s)_$APT_REPO_NAME
2022-05-01 21:29:52 +02:00
- echo "Create snapshot of repository $APT_REPO_NAME ($APT_SNAP_NAME)..."
- >
2022-05-01 21:29:52 +02:00
curl --silent -u $APT_CREDS -X POST -H 'Content-Type: application/json' --data "{\"Name\":\"$APT_SNAP_NAME\"}" $APT_API_URL/repos/$APT_REPO_NAME/snapshots
- echo "Update published snapshot for repository $APT_REPO_NAME (use $APT_SNAP_NAME)..."
- >
2022-05-01 21:29:52 +02:00
curl --silent -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
- echo "Check uploaded packages..."
- >
2022-05-01 21:33:23 +02:00
curl --silent -u $APT_CREDS "$APT_API_URL/repos/stable/packages?q=check-slapdd-crc32"|jq
2022-05-01 21:29:52 +02:00
- echo "Done"
secrets: [ apt_api_url, apt_creds, apt_repo_name ]