Commit aa156df7 authored by Enrique Garcia's avatar Enrique Garcia
Browse files

update readme-gitlabci, readme and add if conditions to Sing recipe and...

update readme-gitlabci, readme and add if conditions to Sing recipe and gitlabci in case there are no tags/new releases
parent 035cf7d6
Pipeline #78775 passed with stage
in 1 minute and 58 seconds
......@@ -60,11 +60,18 @@ deploy_zenodo:
- export LAST_RELEASE=`git ls-remote --tags --refs --sort="v:refname" $REPOSITORY_URL | tail -n1 | sed 's/.*\///'`
### 3 - Download the repository and move it to the build directory
- mkdir -p build
- >
wget -O $REPOSITORY_NAME-$LAST_RELEASE.zip
https://gitlab.in2p3.fr/escape2020/escape/"$REPOSITORY_NAME"/-/archive/"$LAST_RELEASE"/"$REPOSITORY_NAME"-"$LAST_RELEASE".zip
if [ -z "$LAST_RELEASE" ]; then
echo "No tag / new release found ! - Or error when parsing. Downloading last commit to the repository (master branch) ;"; \
wget -O $REPOSITORY_NAME-master.zip https://gitlab.in2p3.fr/escape2020/escape/"$REPOSITORY_NAME"/-/archive/master/"$REPOSITORY_NAME"-master.zip; \
mv $REPOSITORY_NAME-master.zip ./build
else
echo "$LAST_RELEASE tag / release found !"; \
wget -O $REPOSITORY_NAME-$LAST_RELEASE.zip https://gitlab.in2p3.fr/escape2020/escape/"$REPOSITORY_NAME"/-/archive/"$LAST_RELEASE"/"$REPOSITORY_NAME"-"$LAST_RELEASE".zip; \
mv $REPOSITORY_NAME-$LAST_RELEASE.zip ./build
fi
- mv $REPOSITORY_NAME-$LAST_RELEASE.zip ./build
- ls ./build
### 4 - To deploy a NEW DEPOSIT to ZENODO SANDBOX
......
......@@ -12,9 +12,9 @@ to implement this code [here](https://vsoch.github.io/2018/gitlab-singularity-ci
This software (composed of the files within this directory **AND** part of the the `.gitlab-ci.yml` file in the
root directory - the `build_image` stage) provide the necessary tools to:
- Use a Singularity image stored in the DockerHub site to create a Singularity Container of your repository
(thus no need of having installed the Singularity program), and uploaded it directly to your GitLab repository.
- The Singularity receipt must be provided, of course.
- Use a container image stored in the DockerHub site to create a Singularity container of your repository
(thus no need of having installed the Singularity source code), and upload it directly to your GitLab repository.
- The Singularity recipe must be provided, of course.
- In case the container is too large (10 Gb total storage limit for a single GitLab project), you must pass
through a cloud service (various examples of different services are shown in the tutorial and the original repository).
......
......@@ -4,6 +4,7 @@
https://gitlab.in2p3.fr/escape2020/escape/template_project_escape/-/commits/master)
[![Build Status](https://travis-ci.com/garciagenrique/template_project_escape.svg?branch=master)](
https://travis-ci.com/garciagenrique/template_project_escape)
[![License: MIT](https://img.shields.io/badge/License-MIT-indigo.svg)](https://opensource.org/licenses/MIT)
<p align="center">
......
......@@ -26,7 +26,11 @@ From: ubuntu:latest
cd template_project_escape
git fetch --tags
tag=$(git describe --tags `git rev-list --tags --max-count=1`)
git checkout $tag -b master_tag_$tag
if [ -z "$tag" ]; then
git pull origin master
else
git checkout $tag -b master_tag_$tag
fi
python setup.py install
conda clean -a
......
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