From 510aa121f0c98811c15189b13e5c9e25a14f508f Mon Sep 17 00:00:00 2001 From: s3lph Date: Mon, 24 Jul 2023 00:23:38 +0200 Subject: [PATCH] feat: upload artifacts to minio --- .woodpecker.yml | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index e6d6023..1943943 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -23,8 +23,9 @@ pipeline: group: package commands: - python3 setup.py egg_info bdist_wheel - - cd dist - - sha256sum *.whl > SHA256SUMS + - mkdir -p publish + - mv dist/*whl publish + - sha256sum publish/*.whl >> publish/SHA256SUMS build_debian: image: python:3.11-bookworm @@ -57,6 +58,25 @@ 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 - - mv prometheus-tlsrpt-exporter.deb "prometheus-tlsrpt-exporter_$${EXPORTER_VERSION}-1_all.deb" - - sudo -u nobody lintian "prometheus-tlsrpt-exporter_$${EXPORTER_VERSION}-1_all.deb" || true - - sha256sum *.deb > SHA256SUMS + - cd ../.. + - mkdir -p publish + - mv package/debian/prometheus-tlsrpt-exporter.deb "publish/prometheus-tlsrpt-exporter_$${EXPORTER_VERSION}-1_all.deb" + - sudo -u nobody lintian "publish/prometheus-tlsrpt-exporter_$${EXPORTER_VERSION}-1_all.deb" || true + - sha256sum "publish/prometheus-tlsrpt-exporter_$${EXPORTER_VERSION}-1_all.deb" >> publish/SHA256SUMS + + upload: + image: woodpeckerci/plugin-s3 + group: upload + secrets: + - MINIO_ACCESS_KEY + - MINIO_SECRET_KEY + - MINIO_ENDPOINT + - MINIO_BUCKET + settings: + endpoint: ${MINIO_ENDPOINT} + bucket: ${MINIO_BUCKET} + access_key: ${MINIO_ACCESS_KEY} + secret_key: ${MINIO_SECRET_KEY} + source: publish/* + target: /artifacts + path_style: true