Commit e427a667 authored by Philip ABBET's avatar Philip ABBET

[ci] Change the versioning scheme

parent 524beae5
Pipeline #13240 passed with stage
in 6 minutes and 36 seconds
......@@ -15,7 +15,7 @@ before_script:
build:
stage: build
only:
- /^v\d+\.\d+\.\d+([abc]\d*)?$/ # PEP-440 compliant version (tags)
- /^v\d+\.\d+\.\d+r\d+$/
variables:
CONTAINER_NAME: $DOCKER_REGISTRY/$CI_PROJECT_PATH:$CI_BUILD_REF_NAME
script:
......@@ -26,7 +26,7 @@ build:
- docker-build
# Deploys 'push*' tags, using an existing 'vX.Y.Z' tag on the same commit
# Deploys 'push*' tags, using an existing 'vX.Y.ZrR' tag on the same commit
deploy_version:
stage: deploy
only:
......@@ -35,7 +35,7 @@ deploy_version:
- ALL_TAGS=`git tag --contains $CI_BUILD_REF`
- for TAG in $ALL_TAGS;
do
if [[ $TAG =~ ^v[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+([abc][[:digit:]]*)?$ ]]; then
if [[ $TAG =~ ^v[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+r\.[[:digit:]]$ ]]; then
CONTAINER_NAME=$DOCKER_REGISTRY/$CI_PROJECT_PATH:$TAG;
break;
fi;
......
......@@ -9,7 +9,7 @@ example databases of the BEAT platform.
To test the creation of a container on your machine, run the following command:
```sh
$ docker build --rm=true -t docker.idiap.ch/beat/beat.env.db.examples:latest .
$ docker build --rm=true -t docker.idiap.ch/beat/beat.env.db.examples:1.3.0r0 .
```
......@@ -18,12 +18,16 @@ $ docker build --rm=true -t docker.idiap.ch/beat/beat.env.db.examples:latest .
By default, nothing is done on the CI when commits are pushed to the Gitlab
repository.
To trigger the build of a docker image, push a tag of the form *vX.Y.Z*. This
will create an image with the name *docker.idiap.ch/beat/beat.env.db.examples:X.Y.Z*.
To trigger the build of a docker image, push a tag of the form *vX.Y.ZrR*. This
will create an image with the name *docker.idiap.ch/beat/beat.env.db.examples:X.Y.ZrR*.
In this versioning scheme, *X.Y.Z* represents the **version of the environment**
(ie. the same than the one returned by the *describe* script). *R* indicates the
revision of this environment.
To trigger the upload of the image to the *docker.idiap.ch* registry, you can push
a special tag (see below). Note that the commit you are tagging **must** also have
a *vX.Y.Z* tag, and that this build must have successfully passed.
a *vX.Y.ZrR* tag, and that this build must have successfully passed.
The special tag must start with *push* (examples: *push*, *push_thisversion*).
This will upload the image with the name *docker.idiap.ch/beat/beat.env.db.examples:X.Y.Z*
This will upload the image with the name *docker.idiap.ch/beat/beat.env.db.examples:X.Y.ZrR*
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