Newer
Older
.junit_template: &junit_definition
artifacts:
reports:
junit: "junit*.xml"
- eossr-codemeta2zenodo --help
- eossr-codemeta2zenodo --input_codemeta_file ./codemeta.json
- cat .zenodo.json
only:
- branches
script:
- apt-get -y update
- pip install pytest pytest-cov
- pytest eossr/
--junitxml=junit_py37.xml
--color=yes
--verbose
--cov=eossr
--cov-report=xml
--cov-report=term
- apt update --yes && apt install --yes pandoc
- pip install -U -r docs/doc_requirements.txt
- sphinx-build docs _public
artifacts:
when: always
paths:
- junit_py37.xml
reports:
junit: junit_py37.xml
test_ci_eossr:
stage: test
trigger: escape2020/wp3/test_eossr
build_docker:
stage: build_containers
image: docker:19.03.12
services:
- docker:19.03.12-dind
before_script:
- cat /etc/os-release # "Alpine Linux v3.12"
- export LAST_RELEASE=`git ls-remote --tags --refs --sort="v:refname" $CI_PROJECT_URL.git | tail -n1 | sed 's/.*\///'`
- echo $LAST_RELEASE
script:
- cd Docker
- echo "$CI_REGISTRY_PASSWORD" | docker login -u "$CI_REGISTRY_USER" "$CI_REGISTRY" --password-stdin
- docker build -t $CI_REGISTRY_IMAGE:$LAST_RELEASE .
- docker push $CI_REGISTRY_IMAGE:$LAST_RELEASE
- docker tag $CI_REGISTRY_IMAGE:$LAST_RELEASE $CI_REGISTRY_IMAGE:latest
- docker push $CI_REGISTRY_IMAGE:latest
# Save docker image into a tar file to be uploaded in next stage
- docker save -o Docker_${CI_PROJECT_NAME}_$LAST_RELEASE.tar $CI_REGISTRY_IMAGE:$LAST_RELEASE
- cd .. && mkdir -p container_build && cp Docker/*.tar container_build
- ls container_build
build_docker_main:
stage: build_containers
image: docker:19.03.12
services:
- docker:19.03.12-dind
before_script:
- cat /etc/os-release # "Alpine Linux v3.12"
script:
- echo "$CI_REGISTRY_PASSWORD" | docker login -u "$CI_REGISTRY_USER" "$CI_REGISTRY" --password-stdin
- docker build -t $CI_REGISTRY_IMAGE:dev Docker
- docker push $CI_REGISTRY_IMAGE:dev
only:
- master
image: gitlab-registry.in2p3.fr/escape2020/wp3/eossr:latest
before_script:
- eossr-check-connection-zenodo --token $ZENODO_TOKEN --sandbox False -p $CI_PROJECT_DIR
- mkdir -p /zenodo_build && cp container_build/* /zenodo_build
- rm -rf container_build
- gitlab_prepare_upload_zenodo.sh $CI_PROJECT_NAME $CI_PROJECT_DIR /zenodo_build
- ls /zenodo_build
- eossr-upload-repository -t $ZENODO_TOKEN -s False -i /zenodo_build -id $ZENODO_RECORD_ID
- apt update --yes && apt install --yes pandoc pip git
- sphinx-multiversion docs _public
- mv _public public # make sure we overwrite public dir
- for t in `git tag`; do echo $t; sed -i -e "s~../$t/index.html~$t/index.html~" "index.html" ; done
- cd -