From ac8ff4c5a9176da220adc60b10b7a811d6e6d571 Mon Sep 17 00:00:00 2001 From: Samuel Alfageme Sainz Date: Tue, 8 Dec 2020 18:31:20 +0100 Subject: [PATCH] CI: fail when the daily builds cannot be uploaded via WebDAV e.g. on unauthorized: curl --fail -X MKCOL \ "https://cernbox.cern.ch/cernbox/desktop/remote.php/webdav/eos/project/r/reva/www/daily/" -k curl: (22) The requested URL returned error: 401 --- .drone.yml | 8 ++++---- changelog/unreleased/ci-fail-on-daily-upload.md | 6 ++++++ 2 files changed, 10 insertions(+), 4 deletions(-) create mode 100644 changelog/unreleased/ci-fail-on-daily-upload.md diff --git a/.drone.yml b/.drone.yml index 49fc258dbc..20efebed08 100644 --- a/.drone.yml +++ b/.drone.yml @@ -28,10 +28,10 @@ steps: detach: true commands: - TZ=Europe/Berlin go run tools/create-artifacts/main.go -dev -commit ${DRONE_COMMIT} -goversion `go version | awk '{print $$3}'` - - curl -X MKCOL "https://cernbox.cern.ch/cernbox/desktop/remote.php/webdav/eos/project/r/reva/www/daily/" -k -u $${USERNAME}:$${PASSWORD} - - curl -X MKCOL "https://cernbox.cern.ch/cernbox/desktop/remote.php/webdav/eos/project/r/reva/www/daily/`date '+%Y-%m-%d'`" -k -u $${USERNAME}:$${PASSWORD} - - curl -X MKCOL "https://cernbox.cern.ch/cernbox/desktop/remote.php/webdav/eos/project/r/reva/www/daily/`date '+%Y-%m-%d'`/${DRONE_COMMIT}" -k -u $${USERNAME}:$${PASSWORD} - - for i in $(ls /drone/src/dist);do curl -X PUT -u $${USERNAME}:$${PASSWORD} https://cernbox.cern.ch/cernbox/desktop/remote.php/webdav/eos/project/r/reva/www/daily/`date '+%Y-%m-%d'`/${DRONE_COMMIT}/$${i} --data-binary @./dist/$${i} ; done + - curl --fail -X MKCOL "https://cernbox.cern.ch/cernbox/desktop/remote.php/webdav/eos/project/r/reva/www/daily/" -k -u $${USERNAME}:$${PASSWORD} + - curl --fail -X MKCOL "https://cernbox.cern.ch/cernbox/desktop/remote.php/webdav/eos/project/r/reva/www/daily/`date '+%Y-%m-%d'`" -k -u $${USERNAME}:$${PASSWORD} + - curl --fail -X MKCOL "https://cernbox.cern.ch/cernbox/desktop/remote.php/webdav/eos/project/r/reva/www/daily/`date '+%Y-%m-%d'`/${DRONE_COMMIT}" -k -u $${USERNAME}:$${PASSWORD} + - for i in $(ls /drone/src/dist);do curl --fail -X PUT -u $${USERNAME}:$${PASSWORD} https://cernbox.cern.ch/cernbox/desktop/remote.php/webdav/eos/project/r/reva/www/daily/`date '+%Y-%m-%d'`/${DRONE_COMMIT}/$${i} --data-binary @./dist/$${i} ; done - name: license-scan image: golang:1.13 diff --git a/changelog/unreleased/ci-fail-on-daily-upload.md b/changelog/unreleased/ci-fail-on-daily-upload.md new file mode 100644 index 0000000000..f427cf0384 --- /dev/null +++ b/changelog/unreleased/ci-fail-on-daily-upload.md @@ -0,0 +1,6 @@ +Enhancement: Mark 'store-dev-release' CI step as failed on 4XX/5XX errors + +Prevent the errors while storing new 'daily' releases from going unnoticed +on the CI. + +https://github.com/cs3org/reva/pull/1362