feat: use forgejo package repo instead of minio
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
This commit is contained in:
parent
966fe8afb2
commit
c232770355
2 changed files with 22 additions and 29 deletions
|
@ -21,14 +21,22 @@ pipeline:
|
|||
build_wheel:
|
||||
image: python:3.11-bookworm
|
||||
group: package
|
||||
when:
|
||||
event: tag
|
||||
commands:
|
||||
- export EXPORTER_VERSION=$(python3 -c 'import tlsrpt_exporter; print(tlsrpt_exporter.__version__)')
|
||||
- pip3 install -e .[test]
|
||||
- python3 setup.py egg_info bdist_wheel
|
||||
- mkdir -p "publish/prometheus-tlsrpt-exporter_$${EXPORTER_VERSION}"
|
||||
- mv dist/*whl "publish/prometheus-tlsrpt-exporter_$${EXPORTER_VERSION}"
|
||||
- cd "publish/prometheus-tlsrpt-exporter_$${EXPORTER_VERSION}"
|
||||
- sha256sum *.whl >> SHA256SUMS
|
||||
- cp *.whl ../prometheus-tlsrpt-exporter.whl
|
||||
- |
|
||||
cat > ~/.pypirc <<EOF
|
||||
[distutils]
|
||||
index-servers = gitea
|
||||
|
||||
[gitea]
|
||||
repository = $${GITEA_API_REPOSITORY_PYPI}
|
||||
username = $${GITEA_API_USERNAME}
|
||||
password = $${GITEA_API_PASSWORD}
|
||||
EOF
|
||||
- python3 -m twine upload --repository gitea *.whl
|
||||
|
||||
build_debian:
|
||||
image: python:3.11-bookworm
|
||||
|
@ -36,7 +44,7 @@ pipeline:
|
|||
environment:
|
||||
- PACKAGE_AUTHOR=s3lph@kabelsalat.ch
|
||||
commands:
|
||||
- apt update; apt install -y lintian rsync sudo
|
||||
- apt update; apt install -y lintian rsync sudo curl
|
||||
- export EXPORTER_VERSION=$(python3 -c 'import tlsrpt_exporter; print(tlsrpt_exporter.__version__)')
|
||||
- echo -n > package/debian/prometheus-tlsrpt-exporter/usr/share/doc/prometheus-tlsrpt-exporter/changelog
|
||||
- |
|
||||
|
@ -61,25 +69,9 @@ pipeline:
|
|||
- chmod +x prometheus-tlsrpt-exporter/usr/bin/prometheus-tlsrpt-exporter prometheus-tlsrpt-exporter/DEBIAN/postinst prometheus-tlsrpt-exporter/DEBIAN/prerm
|
||||
- sed -re "s/__VERSION__/$${EXPORTER_VERSION}-1/g" -i prometheus-tlsrpt-exporter/DEBIAN/control
|
||||
- dpkg-deb --build prometheus-tlsrpt-exporter
|
||||
- cd ../..
|
||||
- mkdir -p "publish/prometheus-tlsrpt-exporter_$${EXPORTER_VERSION}"
|
||||
- mv package/debian/prometheus-tlsrpt-exporter.deb "publish/prometheus-tlsrpt-exporter_$${EXPORTER_VERSION}/prometheus-tlsrpt-exporter_$${EXPORTER_VERSION}-1_all.deb"
|
||||
- cd "publish/prometheus-tlsrpt-exporter_$${EXPORTER_VERSION}"
|
||||
- sudo -u nobody lintian "prometheus-tlsrpt-exporter_$${EXPORTER_VERSION}-1_all.deb" || true
|
||||
- sha256sum "prometheus-tlsrpt-exporter_$${EXPORTER_VERSION}-1_all.deb" >> SHA256SUMS
|
||||
- cp "prometheus-tlsrpt-exporter_$${EXPORTER_VERSION}-1_all.deb" ../prometheus-tlsrpt-exporter.deb
|
||||
|
||||
upload:
|
||||
image: woodpeckerci/plugin-s3
|
||||
group: upload
|
||||
settings:
|
||||
endpoint: https://minio.kabelsalat.ch
|
||||
bucket: s3lph-prometheus-tlsrpt-exporter
|
||||
access_key:
|
||||
from_secret: S3_ACCESS_KEY_ID
|
||||
secret_key:
|
||||
from_secret: S3_SECRET_ACCESS_KEY
|
||||
source: publish/**/*
|
||||
target: /artifacts
|
||||
path_style: true
|
||||
strip_prefix: true
|
||||
- >-
|
||||
curl
|
||||
-XPUT
|
||||
--data-binary "@prometheus-tlsrpt-exporter_$${EXPORTER_VERSION}-1_all.deb"
|
||||
$${GITEA_API_REPOSITORY_DEB}
|
||||
|
|
3
setup.py
3
setup.py
|
@ -23,7 +23,8 @@ Prometheus metrics as well as on a web interface.
|
|||
extras_require={
|
||||
'test': [
|
||||
'coverage',
|
||||
'pycodestyle'
|
||||
'pycodestyle',
|
||||
'twine'
|
||||
]
|
||||
},
|
||||
test_loader='unittest:TestLoader',
|
||||
|
|
Loading…
Reference in a new issue