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

Update .gitlab-ci.yml

parent ceac964d
No related branches found
No related tags found
No related merge requests found
......@@ -17,6 +17,7 @@ default:
stages:
- generate
- build
- deploy
# UHEI spack version and branch
variables:
......@@ -55,3 +56,30 @@ build-jobs:
- artifact: "jobs_scratch_dir/pipeline.yml"
job: generate-pipeline
strategy: depend
artifacts:
paths:
- "${CI_PROJECT_DIR}/binary_artifacts.tar.gz
deploy-artifacts:
stage: deploy
before_script:
- oc login "$OPENSHIFT_SERVER" --token="$OPENSHIFT_TOKEN"
script:
# create job description file
- chmod a+x create_job.sh
- ./create_job.sh $CAT_URL $CAT_ART_NAME $CAT_SRC_DIR $CAT_DEST_DIR
- cat simplejob.yml
# select the project in openshift
- oc project jupyterhub-dev
# delete the job (if exist)
- oc delete job simplejob || true
# start the deploy job
- oc create -f simplejob.yml
# wait for job to finish https://stackoverflow.com/questions/5073453wait-for-kubernetes-job-to-complete-on-either-failure-success-using-command-line
- oc get job/simplejob -o=jsonpath='{.status}' -w
- oc get job/simplejob -o=jsonpath='{.status.conditions[*].type}' | grep -i -E 'failed|complete' || echo 'Failed'
tags:
- shell-runner
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