Commit bf8f8268 authored by Aleksandra Mnich's avatar Aleksandra Mnich
Browse files

[SIGMON-369] install git

parent 1d36a298
Pipeline #4152290 failed with stage
in 51 seconds
......@@ -10,206 +10,206 @@ variables:
project_name: lhcsmapi
stages:
- syntax_check_test_dev
- build
- pages
- deploy
# - syntax_check_test_dev
# - build
# - pages
# - deploy
- deploy_analysis
- notebooks_exec
doc:
variables:
GIT_SUBMODULE_STRATEGY: recursive
MKDOCS_VERSION: '1.2.1'
MATERIAL_VERSION: '7.1.10'
I18NSTATIC_VERSION: '0.17'
stage: build
script:
- pip install --upgrade pip setuptools wheel
- pip install mkdocs==${MKDOCS_VERSION} mkdocs-material==${MATERIAL_VERSION} mkdocs-static-i18n==${I18NSTATIC_VERSION}
- pip install sphinx sphinx-rtd-theme recommonmark sphinx-markdown-tables
- pip install -r requirements.txt
- mkdocs build -d mkdocs/
- sphinx-build -b html documentation_api/source documentation_api/build/html/
- mkdir -p doc/ && cp -r mkdocs/* doc/
- mkdir -p doc/api/ && cp -r documentation_api/build/html/* doc/api/
artifacts:
paths:
- doc
expire_in: 3 days
only:
- branches
- tags
pages:
stage: pages
script:
- mv doc/ public/
artifacts:
paths:
- public
expire_in: 1 hour
only:
- tags
doctest:
stage: syntax_check_test_dev
extends: .acc_py_dev_test
artifacts:
untracked: true
paths:
- doctest.xml
expire_in: 1 day
script:
- pytest --doctest-report only_first_failure --doctest-modules --doctest-continue-on-failure --capture=tee-sys
allow_failure: true
test_dev:
stage: syntax_check_test_dev
extends: .acc_py_dev_test
image: registry.cern.ch/docker.io/library/python:3.8
artifacts:
untracked: true
paths:
- cov.xml
expire_in: 1 day
script:
- apt-get -y update
- apt install -y openjdk-11-jdk
- pip install -r test-requirements.txt
- pip list
- pytest ${project_root}/${test_folder} --cov=${project_name} --junitxml=report.xml
- pytest --cov-report xml:coverage-reports/coverage-lhcsmapi.xml --cov=${project_name} ${project_root}/${test_folder}
type_checking:
stage: syntax_check_test_dev
script:
- pip3 install mypy
- mypy --ignore-missing-imports lhcsmapi
allow_failure: true
sonar:
image: registry.cern.ch/docker.io/library/java:8
stage: build
script:
- bash CI/sonar.sh
deploy_production_eos:
stage: deploy
variables:
"EOS_PROJECT_PATH": "/eos/project/l/lhcsm"
"EOS_PUBLIC_PATH": "/eos/project/l/lhcsm/public/"
"VENV_PATH": "/eos/project/l/lhcsm/venv_${CI_COMMIT_REF_NAME}"
"EOS_PATH": "/eos/project/l/lhcsm/venv_${CI_COMMIT_REF_NAME}/lhcsmapi"
"CI_OUTPUT_DIR": "lhcsmapi"
"METHOD": "rsync"
"SPARK3_REQUIREMENTS_FILE": swan-nxcals-spark3-requirements.txt
"SCRIPT_FILENAME": "${CI_COMMIT_REF_NAME}.sh"
"SCRIPT_PATH": "/eos/project/l/lhcsm/public/packages_notebooks.sh"
"DEPLOY_PRO": "true"
# Only when pushed with tags
only:
- tags
image: gitlab-registry.cern.ch/ci-tools/ci-web-deployer
script:
- bash CI/eos_setup.sh
- deploy-eos
before_script: []
after_script: []
deploy_development_eos:
stage: deploy
variables:
"EOS_PUBLIC_PATH": "/eos/project/l/lhcsm/public/"
"VENV_PATH": "/eos/project/l/lhcsm/venv_${CI_COMMIT_BRANCH}"
"EOS_PATH": "/eos/project/l/lhcsm/venv_${CI_COMMIT_BRANCH}/lhcsmapi"
"CI_OUTPUT_DIR": "lhcsmapi"
"METHOD": "rsync"
"SPARK3_REQUIREMENTS_FILE": swan-nxcals-spark3-requirements.txt
"SCRIPT_FILENAME": "${CI_COMMIT_BRANCH}.sh"
"SCRIPT_PATH": "/eos/project/l/lhcsm/public/packages_notebooks_dev.sh"
# Only when pushed on a branch
only:
- branches
image: gitlab-registry.cern.ch/ci-tools/ci-web-deployer
script:
- bash CI/eos_setup.sh
- deploy-eos
before_script: []
after_script: []
environment:
name: ${CI_COMMIT_BRANCH}
on_stop: delete_venv
deployment_tier: development
delete_venv:
stage: deploy
image: gitlab-registry.cern.ch/ci-tools/ci-worker:cc7
variables:
GIT_STRATEGY: none
# EOS_MGM_URL: eosproject.cern.ch
environment:
name: ${CI_COMMIT_BRANCH}
action: stop
when: manual
script:
# - bash CI/delete_venv.sh
- SSH_OPTIONS="-o StrictHostKeyChecking=no -o GSSAPIAuthentication=yes -o GSSAPITrustDNS=yes -o GSSAPIDelegateCredentials=yes"
- echo "${EOS_ACCOUNT_PASSWORD}" | kinit "${EOS_ACCOUNT_USERNAME}@CERN.CH"
- |
ssh ${SSH_OPTIONS} ${EOS_ACCOUNT_USERNAME}@lxplus <<EOF
export EOS_MGM_URL=eosproject.cern.ch
eos rm -rf /eos/project/l/lhcsm/venv_${CI_COMMIT_BRANCH}
eos rm /eos/project/l/lhcsm/public/${CI_COMMIT_BRANCH}.sh
EOF
only:
- branches
dependencies: [] # this is needed because otherwise this job would fail when artifacts from previous job have expired
deploy_dev_lhcsmnb_eos:
stage: deploy
variables:
"EOS_PATH": "/eos/project/l/lhcsm/venv_${CI_COMMIT_BRANCH}/lhcsmnb"
"CI_OUTPUT_DIR": "lhc-sm-notebook/lhcsmnb"
"NB_BRANCH": "${CI_COMMIT_BRANCH}"
"METHOD": "rsync"
only:
- branches
image: gitlab-registry.cern.ch/ci-tools/ci-web-deployer
script:
- bash CI/commons_deployment_setup.sh
- deploy-eos
before_script: [ ]
after_script: [ ]
deploy_pro_lhcsmnb_eos:
stage: deploy
variables:
"EOS_PATH": "/eos/project/l/lhcsm/venv_${CI_COMMIT_REF_NAME}/lhcsmnb"
"CI_OUTPUT_DIR": "lhc-sm-notebook/lhcsmnb"
"NB_BRANCH": "master"
"METHOD": "rsync"
only:
- tags
image: gitlab-registry.cern.ch/ci-tools/ci-web-deployer
script:
- bash CI/commons_deployment_setup.sh
- deploy-eos
before_script: [ ]
after_script: [ ]
build_wheel:
stage: build
extends: .acc_py_build_wheel
only:
- tags
deploy_accpy:
stage: deploy
extends: .acc_py_release_wheel
dependencies:
- build_wheel
# - notebooks_exec
#doc:
# variables:
# GIT_SUBMODULE_STRATEGY: recursive
# MKDOCS_VERSION: '1.2.1'
# MATERIAL_VERSION: '7.1.10'
# I18NSTATIC_VERSION: '0.17'
# stage: build
# script:
# - pip install --upgrade pip setuptools wheel
# - pip install mkdocs==${MKDOCS_VERSION} mkdocs-material==${MATERIAL_VERSION} mkdocs-static-i18n==${I18NSTATIC_VERSION}
# - pip install sphinx sphinx-rtd-theme recommonmark sphinx-markdown-tables
# - pip install -r requirements.txt
# - mkdocs build -d mkdocs/
# - sphinx-build -b html documentation_api/source documentation_api/build/html/
# - mkdir -p doc/ && cp -r mkdocs/* doc/
# - mkdir -p doc/api/ && cp -r documentation_api/build/html/* doc/api/
# artifacts:
# paths:
# - doc
# expire_in: 3 days
# only:
# - branches
# - tags
#
#pages:
# stage: pages
# script:
# - mv doc/ public/
# artifacts:
# paths:
# - public
# expire_in: 1 hour
# only:
# - tags
#
#doctest:
# stage: syntax_check_test_dev
# extends: .acc_py_dev_test
# artifacts:
# untracked: true
# paths:
# - doctest.xml
# expire_in: 1 day
# script:
# - pytest --doctest-report only_first_failure --doctest-modules --doctest-continue-on-failure --capture=tee-sys
# allow_failure: true
#
#test_dev:
# stage: syntax_check_test_dev
# extends: .acc_py_dev_test
# image: registry.cern.ch/docker.io/library/python:3.8
# artifacts:
# untracked: true
# paths:
# - cov.xml
# expire_in: 1 day
# script:
# - apt-get -y update
# - apt install -y openjdk-11-jdk
# - pip install -r test-requirements.txt
# - pip list
# - pytest ${project_root}/${test_folder} --cov=${project_name} --junitxml=report.xml
# - pytest --cov-report xml:coverage-reports/coverage-lhcsmapi.xml --cov=${project_name} ${project_root}/${test_folder}
#
#type_checking:
# stage: syntax_check_test_dev
# script:
# - pip3 install mypy
# - mypy --ignore-missing-imports lhcsmapi
# allow_failure: true
#
#sonar:
# image: registry.cern.ch/docker.io/library/java:8
# stage: build
# script:
# - bash CI/sonar.sh
#
#deploy_production_eos:
# stage: deploy
# variables:
# "EOS_PROJECT_PATH": "/eos/project/l/lhcsm"
# "EOS_PUBLIC_PATH": "/eos/project/l/lhcsm/public/"
# "VENV_PATH": "/eos/project/l/lhcsm/venv_${CI_COMMIT_REF_NAME}"
# "EOS_PATH": "/eos/project/l/lhcsm/venv_${CI_COMMIT_REF_NAME}/lhcsmapi"
# "CI_OUTPUT_DIR": "lhcsmapi"
# "METHOD": "rsync"
# "SPARK3_REQUIREMENTS_FILE": swan-nxcals-spark3-requirements.txt
# "SCRIPT_FILENAME": "${CI_COMMIT_REF_NAME}.sh"
# "SCRIPT_PATH": "/eos/project/l/lhcsm/public/packages_notebooks.sh"
# "DEPLOY_PRO": "true"
# # Only when pushed with tags
# only:
# - tags
# image: gitlab-registry.cern.ch/ci-tools/ci-web-deployer
# script:
# - bash CI/eos_setup.sh
# - deploy-eos
# before_script: []
# after_script: []
#deploy_development_eos:
# stage: deploy
# variables:
# "EOS_PUBLIC_PATH": "/eos/project/l/lhcsm/public/"
# "VENV_PATH": "/eos/project/l/lhcsm/venv_${CI_COMMIT_BRANCH}"
# "EOS_PATH": "/eos/project/l/lhcsm/venv_${CI_COMMIT_BRANCH}/lhcsmapi"
# "CI_OUTPUT_DIR": "lhcsmapi"
# "METHOD": "rsync"
# "SPARK3_REQUIREMENTS_FILE": swan-nxcals-spark3-requirements.txt
# "SCRIPT_FILENAME": "${CI_COMMIT_BRANCH}.sh"
# "SCRIPT_PATH": "/eos/project/l/lhcsm/public/packages_notebooks_dev.sh"
# # Only when pushed on a branch
# only:
# - branches
# image: gitlab-registry.cern.ch/ci-tools/ci-web-deployer
# script:
# - bash CI/eos_setup.sh
# - deploy-eos
# before_script: []
# after_script: []
# environment:
# name: ${CI_COMMIT_BRANCH}
# on_stop: delete_venv
# deployment_tier: development
#delete_venv:
# stage: deploy
# image: gitlab-registry.cern.ch/ci-tools/ci-worker:cc7
# variables:
# GIT_STRATEGY: none
# # EOS_MGM_URL: eosproject.cern.ch
# environment:
# name: ${CI_COMMIT_BRANCH}
# action: stop
# when: manual
# script:
# # - bash CI/delete_venv.sh
# - SSH_OPTIONS="-o StrictHostKeyChecking=no -o GSSAPIAuthentication=yes -o GSSAPITrustDNS=yes -o GSSAPIDelegateCredentials=yes"
# - echo "${EOS_ACCOUNT_PASSWORD}" | kinit "${EOS_ACCOUNT_USERNAME}@CERN.CH"
# - |
# ssh ${SSH_OPTIONS} ${EOS_ACCOUNT_USERNAME}@lxplus <<EOF
# export EOS_MGM_URL=eosproject.cern.ch
# eos rm -rf /eos/project/l/lhcsm/venv_${CI_COMMIT_BRANCH}
# eos rm /eos/project/l/lhcsm/public/${CI_COMMIT_BRANCH}.sh
# EOF
# only:
# - branches
# dependencies: [] # this is needed because otherwise this job would fail when artifacts from previous job have expired
#deploy_dev_lhcsmnb_eos:
# stage: deploy
# variables:
# "EOS_PATH": "/eos/project/l/lhcsm/venv_${CI_COMMIT_BRANCH}/lhcsmnb"
# "CI_OUTPUT_DIR": "lhc-sm-notebook/lhcsmnb"
# "NB_BRANCH": "${CI_COMMIT_BRANCH}"
# "METHOD": "rsync"
# only:
# - branches
# image: gitlab-registry.cern.ch/ci-tools/ci-web-deployer
# script:
# - bash CI/commons_deployment_setup.sh
# - deploy-eos
# before_script: [ ]
# after_script: [ ]
#deploy_pro_lhcsmnb_eos:
# stage: deploy
# variables:
# "EOS_PATH": "/eos/project/l/lhcsm/venv_${CI_COMMIT_REF_NAME}/lhcsmnb"
# "CI_OUTPUT_DIR": "lhc-sm-notebook/lhcsmnb"
# "NB_BRANCH": "master"
# "METHOD": "rsync"
# only:
# - tags
# image: gitlab-registry.cern.ch/ci-tools/ci-web-deployer
# script:
# - bash CI/commons_deployment_setup.sh
# - deploy-eos
# before_script: [ ]
# after_script: [ ]
#build_wheel:
# stage: build
# extends: .acc_py_build_wheel
# only:
# - tags
#
#deploy_accpy:
# stage: deploy
# extends: .acc_py_release_wheel
# dependencies:
# - build_wheel
deploy_lhcsmanalysis_eos:
stage: deploy_analysis
......@@ -223,23 +223,22 @@ deploy_lhcsmanalysis_eos:
- branches
image: gitlab-registry.cern.ch/ci-tools/ci-web-deployer
script:
- yum install -y jq
- bash CI/deploy_analysis.sh
before_script: [ ]
after_script: [ ]
notebooks_exec:
only:
- dev
- master
except:
- schedules
variables:
API_BRANCH: $CI_COMMIT_BRANCH
NB_BRANCH: $CI_COMMIT_BRANCH
ANALYSIS_BRANCH: $CI_COMMIT_BRANCH
stage: notebooks_exec
trigger:
project: LHCData/lhc-sm-hwc
branch: $CI_COMMIT_BRANCH
strategy: depend
#notebooks_exec:
# only:
# - dev
# - master
# except:
# - schedules
# variables:
# API_BRANCH: $CI_COMMIT_BRANCH
# NB_BRANCH: $CI_COMMIT_BRANCH
# ANALYSIS_BRANCH: $CI_COMMIT_BRANCH
# stage: notebooks_exec
# trigger:
# project: LHCData/lhc-sm-hwc
# branch: $CI_COMMIT_BRANCH
# strategy: depend
......@@ -6,6 +6,9 @@
# set ANALYSIS_BRANCH if not set
export ANALYSIS_BRANCH="${ANALYSIS_BRANCH:-$CI_COMMIT_BRANCH}"
yum install git -y
yum install jq -y
echo "${EOS_ACCOUNT_PASSWORD}" | kinit "${EOS_ACCOUNT_USERNAME}@CERN.CH"
REPOS=($(curl -s https://gitlab.cern.ch/api/v4/groups/152156 | jq -r ".projects[].http_url_to_repo"))
......
Supports Markdown
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