Commit 3412cda4 authored by Marcel Rieger's avatar Marcel Rieger
Browse files

Merge branch 'ci_env' into 'master'

Ci env

See merge request hh/tools/inference!43
parents 145279d5 c943e480
stages:
# - formatting
- docs
# temporarily disabled
# black:
# stage: formatting
# tags:
# - docker
# image: python:3.7
# script:
# - pip install --no-cache-dir --upgrade pip
# - pip install --no-cache-dir black==20.8b1
# - black -l 100 --check --diff dhi
build_image:
stage: docs
when: manual
......@@ -30,12 +18,33 @@ deploy_docs:
tags:
- docker
image: ${CI_REGISTRY_IMAGE}:latest
environment:
name: inference-${CI_COMMIT_REF_SLUG}
url: ${PAGE_URL}${CI_ENVIRONMENT_SLUG}
on_stop: delete_docs
script:
- test ! -z "${PAGE_ROOT}"
- export FULL_PAGE_ROOT="${PAGE_ROOT}${CI_ENVIRONMENT_SLUG}"
- echo "FULL_PAGE_ROOT is ${FULL_PAGE_ROOT}"
- cd docs
- mkdocs build
- cd site
- tar -czf site.tgz *
- sshpass -v -p ${KRB_PASS} ssh -o "StrictHostKeyChecking=no" ${KRB_USER}@lxplus.cern.ch "rm -rf ${PAGE_ROOT}/*"
- sshpass -v -p ${KRB_PASS} scp -o "StrictHostKeyChecking=no" site.tgz ${KRB_USER}@lxplus.cern.ch:${PAGE_ROOT}
- sshpass -v -p ${KRB_PASS} ssh -o "StrictHostKeyChecking=no" ${KRB_USER}@lxplus.cern.ch "cd ${PAGE_ROOT}; tar -xzf site.tgz; rm site.tgz"
- sshpass -v -p ${KRB_PASS} ssh -o "StrictHostKeyChecking=no" ${KRB_USER}@lxplus.cern.ch "[ ! -d ${FULL_PAGE_ROOT} ] && mkdir ${FULL_PAGE_ROOT} || rm -rf ${FULL_PAGE_ROOT}/*"
- sshpass -v -p ${KRB_PASS} scp -o "StrictHostKeyChecking=no" site.tgz ${KRB_USER}@lxplus.cern.ch:${FULL_PAGE_ROOT}/site.tgz
- sshpass -v -p ${KRB_PASS} ssh -o "StrictHostKeyChecking=no" ${KRB_USER}@lxplus.cern.ch "cd ${FULL_PAGE_ROOT}; tar -xzf site.tgz; rm site.tgz"
delete_docs:
stage: docs
when: manual
tags:
- docker
image: ${CI_REGISTRY_IMAGE}:latest
environment:
name: inference-${CI_COMMIT_REF_SLUG}
action: stop
script:
- test ! -z "${PAGE_ROOT}"
- export FULL_PAGE_ROOT="${PAGE_ROOT}${CI_ENVIRONMENT_SLUG}"
- echo "FULL_PAGE_ROOT is ${FULL_PAGE_ROOT}"
- sshpass -v -p ${KRB_PASS} ssh -o "StrictHostKeyChecking=no" ${KRB_USER}@lxplus.cern.ch "rm -rf ${FULL_PAGE_ROOT}"
Markdown is supported
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