From 0c05c17dc9e9e6534cd12d9a09ae8df1ad14c69c 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 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.drone.yml b/.drone.yml index 49fc258dbcf..20efebed086 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