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

set up job for creating the experimental kernel in lab-int

parent 1222f345
No related branches found
No related tags found
No related merge requests found
......@@ -4,12 +4,11 @@ stages:
# start an OpenShift Job that will build the Spack environment
.deploy-build-environment:
stage: deploy
before_script:
script:
- oc login "$OPENSHIFT_SERVER" --token="$OPENSHIFT_TOKEN"
- tar czf ${SPACK_ENV_TAR_FILE} packages/ repo.yaml spack.yaml create_JupyterLab_kernel.sh
- mkdir copy_folder
- mv ${SPACK_ENV_TAR_FILE} copy_folder
script:
# create job description file
- chmod a+x create_job.sh
- ./create_job.sh $INSTALLATION_ROOT $SPACKIFIED_ENV $OP $SPACK_ENV_TAR_FILE $CI_PIPELINE_ID $BUILD_ENV_DOCKER_IMAGE $LAB_KERNEL_PATH $OKD_CLUSTER_UID
......@@ -35,9 +34,11 @@ stages:
tags:
- shell-runner
# Deploy in the lab-int environment the version of the tools to be
# tested before released to production (push pipeline)
# deploy on the dev environment of the okd dev cluster at CSCS
# runs on protected branches only as the token variable is protected
deploy-dev-environment-cscs:
deploy-int-release-dev-cscs:
extends: .deploy-build-environment
variables:
OPENSHIFT_SERVER: $CSCS_OPENSHIFT_DEV_SERVER
......@@ -55,9 +56,10 @@ deploy-dev-environment-cscs:
only:
- master
# Deploy the production release of tools (manual pipeline)
# deploy on the production environment of the okd prod cluster at CSCS
# runs on protected branches only as the token variable is protected
deploy-prod-environment-cscs:
deploy-prod-release-prod-cscs:
extends: .deploy-build-environment
variables:
OPENSHIFT_SERVER: $CSCS_OPENSHIFT_PROD_SERVER
......@@ -77,9 +79,10 @@ deploy-prod-environment-cscs:
when: manual
allow_failure: false
# Deploy the production release of tools (manual pipeline)
# deploy on the production environment of the okd prod cluster at JSC
# runs on protected branches only as the token variable is protected
deploy-prod-environment-jsc:
deploy-prod-release-prod-jsc:
extends: .deploy-build-environment
variables:
OPENSHIFT_SERVER: $JSC_OPENSHIFT_PROD_SERVER
......@@ -98,3 +101,42 @@ deploy-prod-environment-jsc:
- if: '$CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH && $CI_COMMIT_BRANCH =~ /release/'
when: manual
allow_failure: false
# Deploy the experimental release of tools (sheduled pipeline)
# once a week from integration release (master) to an experimental JupyterLab kernel
# deploy on the dev environment of the okd dev cluster at CSCS
# runs on protected branches only as the token variable is protected
deploy-exp-release-dev-cscs:
#extends: .deploy-build-environment
variables:
OPENSHIFT_SERVER: $CSCS_OPENSHIFT_DEV_SERVER
OPENSHIFT_TOKEN: $CSCS_OPENSHIFT_DEV_TOKEN
INSTALLATION_ROOT: $CSCS_INSTALLATION_ROOT_DEV
SPACKIFIED_ENV: experimental
OP: update
BUILD_ENV_DOCKER_IMAGE: $CSCS_BUILD_ENV_DOCKER_IMAGE_DEV
LAB_KERNEL_PATH: /srv/jupyterlab_kernels/int/experimental
OKD_CLUSTER_UID: $CSCS_OKD_DEV_UID
#SPACK_ENV_TAR_FILE: ebrains-spack-builds${CI_PIPELINE_ID}.tar.gz
SPACK_ENV_TAR_FILE: ebrains-spack-builds.tar.gz
OC_PROJECT: jupyterhub-int
before_script:
- |
head -n -9 create_JupyterLab_kernel.sh > tmp.txt && mv tmp.txt create_JupyterLab_kernel.sh
cat << EOS >> create_JupyterLab_kernel.sh
mkdir \$LAB_KERNEL_PATH/experimental_release
cat <<EOF >\$LAB_KERNEL_PATH/experimental_release/kernel.json
{
"argv": ["\$LAB_KERNEL_PATH/bin/env.sh", "{connection_file}", "--profile=default"],
"display_name": "EBRAINS_experimental_release",
"name": "experimental_release",
"language": "python"
}
EOF
EOS
- cat create_JupyterLab_kernel.sh
resource_group: shared-NFS-mount-dev-cscs
only:
refs:
- schedules
allow_failure: false
# release_v0.1_202109
# release_v0.1_202109_hotfix
Spack upstream commit sha -> 9853fd50e2dc6253a2c80b38fc3bad8f226ce94e
"display_name": "EBRAINS_release_v0.1_202109"
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