Skip to content
Snippets Groups Projects
Commit ee2d66fb authored by Athanasios Karmas's avatar Athanasios Karmas
Browse files

Make pipeline fail if there is not a valid token for accessing SWIFT

parent 20602b18
No related branches found
No related tags found
No related merge requests found
Pipeline #3308 failed with stages
in 3 seconds
......@@ -14,7 +14,8 @@ variables:
copy-files-to-swift:
stage: upload
script:
- 'curl -H "X-Auth-Token: ${OS_TOKEN}" -X DELETE ${OBJSTORE}ebrains-spack-builds.tar.gz'
- 'curl -H "X-Auth-Token: ${OS_TOKEN}" -X DELETE ${OBJSTORE}ebrains-spack-builds.tar.gz > curl_log.txt'
- if [ $(cat curl_log.txt | grep "Unauthorized" |wc -l) -gt 0 ]; then echo "You need to refresh OpenStack token"; exit 1;fi;
- tar czf ${SWIFT_FILE} packages/ repo.yaml spack.yaml
- 'curl -H "X-Auth-Token: ${OS_TOKEN}" -i ${OBJSTORE} -X PUT -T ${SWIFT_FILE}'
tags:
......@@ -22,6 +23,7 @@ copy-files-to-swift:
deploy-build-environment:
stage: deploy
needs: [copy-files-to-swift]
before_script:
- oc login "$OPENSHIFT_SERVER" --token="$OPENSHIFT_TOKEN"
script:
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment