Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Docker-in-Docker (DinD) capabilities of public runners deactivated.
More info
Open sidebar
ESCAPE2020
WP3
template_project_escape
Commits
7a5dd6e9
Commit
7a5dd6e9
authored
Oct 21, 2021
by
Vuillaume
Browse files
update CI with latest eossr one
parent
ec85e5c6
Pipeline
#143034
failed with stages
in 2 minutes and 27 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
21 deletions
+19
-21
.gitlab-ci.yml
.gitlab-ci.yml
+19
-21
No files found.
.gitlab-ci.yml
View file @
7a5dd6e9
stages
:
-
install
-
test
-
build
-
build
_container
-
deploy
install_project
:
...
...
@@ -40,13 +40,13 @@ test_docker_registry:
-
master
-
tags
build_singularity_image
:
# Example of Singularity image (of the project) built during the CI
stage
:
build
stage
:
build_container
image
:
singularityware/singularity:gitlab-2.6
script
:
#
Build the container!
-
/bin/bash .
singularity
ci/
build
.sh
Singularity/Singularity
#
You should have added before your Singularity recipe in a Singularity dir
-
singularity
build
$IMAGE_NAME.simg
Singularity/Singularity
-
mkdir -p build && cp Singularity/*.simg build
-
mkdir -p build && cp Singularity/Singularity* build
...
...
@@ -58,8 +58,7 @@ build_singularity_image:
-
tags
build_docker_image
:
# Example of Docker container (of the project) built - and uploaded to a registry - during the CI
stage
:
build
stage
:
build_container
image
:
docker:19.03.12
services
:
-
docker:19.03.12-dind
...
...
@@ -70,37 +69,36 @@ build_docker_image:
-
echo $LAST_RELEASE
script
:
-
cd Docker
-
docker login -u $CI_REGISTRY_USER -p
$CI_REGISTRY_
PASSWORD
$CI_REGISTRY
-
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
# --> The following code snippet IS just an exploratory / WIP section
# Save docker image into a file to be uploaded in next stage
-
docker save -o Docker_image_ESCAPE_template_project_$LAST_RELEASE.tar $CI_REGISTRY_IMAGE:$LAST_RELEASE
-
ls
-
cd .. && mkdir -p build && cp Docker/*.tar build
-
ls build
-
docker save -o Docker_${CI_PROJECT_NAME}_$LAST_RELEASE.tar $CI_REGISTRY_IMAGE:$LAST_RELEASE
-
cd .. && mkdir -p /docker_build && cp Docker/*.tar /docker_build
-
ls /docker_build
artifacts
:
paths
:
-
build/Docker_
image_ESCAPE_template_project_
*.tar
-
/docker_
build/Docker_*.tar
only
:
-
tags
deploy_zenodo
:
stage
:
deploy
image
:
gitlab-registry.in2p3.fr/escape2020/wp3/zenodoci:v1.2
# The `dependencies` key (and field) is added to this stage ONLY because we have created in a previous stage some other artifacts
image
:
gitlab-registry.in2p3.fr/escape2020/wp3/eossr:latest
# The `dependencies` key (and field) is added to this stage ONLY because we have created
# in previous stages some artifacts
dependencies
:
-
build_singularity_image
-
build_docker_image
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
-
if [[ -f ./codemeta.json ]]; then cp ./codemeta.json ./build; fi
-
ls ./build
-
gitlab_prepare_upload_zenodo.sh $CI_PROJECT_NAME $CI_PROJECT_DIR zenodo_build
-
cp /docker_build/* zenodo_build
-
ls zenodo_build
-
upload_new_version_d
eposit -t $ZENODO_TOKEN -s False -i
./
build -id $ZENODO_
PROJECT
_ID
-
eossr-upload-r
eposit
ory
-t $ZENODO_TOKEN -s False -i
zenodo_
build -id $ZENODO_
RECORD
_ID
only
:
-
tags
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment