Commit 6fb2e973 authored by Enrique Garcia's avatar Enrique Garcia
Browse files

CI does not like docker info

parent 301ab7c1
Pipeline #106251 failed with stages
in 1 minute and 44 seconds
stages:
- test
- test_container
- deploy
test_install:
......@@ -12,101 +11,6 @@ test_install:
only:
- branches
deploy_zenodo:
stage: deploy
image: python:3.6-buster
#dependencies:
### Ideally to be used within a ci pipeline in where a container of the source code is build in a previous stage.
### You can have a look into https://gitlab.in2p3.fr/escape2020/wp3/template_project_escape/-/blob/master/.gitlab-ci.yml
# - build_image
before_script:
### 1 - Install dependencies in the image and upload the files to Zenodo
- apt-get -y update
### INFORMATION FOR THE USER; Python, pip and wget are already installed in the container
#- cat /etc/os-release # Debian GNU/Linux 10 (buster)
#- pip3 --version # pip 20.1.1
#- python3 --version # 3.6 as expected
- pip install requests numpy
- pip install . # Install ZenodoCI
- which parse_last_release_git.sh
### 2 - Test the communication to Zenodo - Uncomment if needed, or if already done it manually.
- test_connection_zenodo --token $SANDBOX_ZENODO_TOKEN --sandbox True -p $CI_PROJECT_DIR
#- test_connection_zenodo -t $ZENODO_TOKEN -s False --project_dir $CI_PROJECT_DIR
script:
### 3 - Get the last tag/release of the repository,
### 4 - Download the repository and move it to the build directory
### If no release is found/correctly parsed, the script will download the last commit pushed to the master branch
- mkdir -p build
- parse_last_release_git.sh $CI_PROJECT_NAME $CI_PROJECT_URL
- ls ./build
### 5 - To deploy a NEW DEPOSIT to ZENODO SANDBOX
- upload_new_deposit --token $SANDBOX_ZENODO_TOKEN --sandbox True --input-dir ./build
### 5 - To deploy a NEW DEPOSIT to ZENODO
#- >
# upload_new_deposit
# --token $ZENODO_TOKEN
# --sandbox False
# --input-dir ./build
### 5 - To deploy a NEW VERSION to ZENODO: The deposit_id of the entry to be `new_versioned` MUST be provided.
- >
upload_new_version_deposit
--token $SANDBOX_ZENODO_TOKEN
--sandbox True
--input-dir ./build
--deposit_id $ZENODO_PROJECT_ID
# --token $ZENODO_TOKEN
# --sandbox False
only:
### Ideally this stage should be run only when a new release / tag of the source code is created, i.e., (- tags).
# The script is changed to check that the both `upload_new_deposit` and `upload_new_version_deposit` works nicely.
- branches # For testing
#deploy_from_container:
# stage: deploy
# image: gitlab-registry.in2p3.fr/escape2020/wp3/zenodoci:v1.1
# before_script:
# - test_connection_zenodo --token $ZENODO_TOKEN --sandbox False -p $CI_PROJECT_DIR
# script:
# - mkdir -p build
# - parse_last_release_git.sh $CI_PROJECT_NAME $CI_PROJECT_URL
# - ls ./build
#
# - upload_new_deposit --token $ZENODO_TOKEN --sandbox False --input-dir ./build
# only:
# - tags
test_deploy_from_container:
stage: test_container
image: gitlab-registry.in2p3.fr/escape2020/wp3/zenodoci:v1.1
before_script:
- which parse_last_release_git.sh
- test_connection_zenodo --token $SANDBOX_ZENODO_TOKEN --sandbox True -p $CI_PROJECT_DIR
script:
- pwd # testing/debugging
- ls # testing/debugging
- env # testing/debugging
- upload_new_deposit -h
- upload_new_version_deposit -h
- codemeta2zenodo -h
- mkdir -p build
- parse_last_release_git.sh $CI_PROJECT_NAME $CI_PROJECT_URL
- ls ./build
- upload_new_deposit --token $SANDBOX_ZENODO_TOKEN --sandbox True --input-dir ./build
- upload_new_version_deposit -t $SANDBOX_ZENODO_TOKEN -s True -i ./build -id $ZENODO_PROJECT_ID
only:
- branches # testing/debugging
test_docker_auto_update:
stage: deploy
......@@ -114,7 +18,6 @@ test_docker_auto_update:
before_script:
- export LAST_RELEASE=`git ls-remote --tags --refs --sort="v:refname" $CI_PROJECT_URL.git | tail -n1 | sed 's/.*\///'`
- echo $LAST_RELEASE
- docker info
script:
- cd Docker
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
......
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