Skip to content

Commit

Permalink
CI: fail when the daily builds cannot be uploaded via WebDAV (#1362)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
SamuAlfageme authored Dec 9, 2020
1 parent 655c9ba commit 9c0049a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions changelog/unreleased/ci-fail-on-daily-upload.md
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 9c0049a

Please sign in to comment.