Update CI script for release-branch workflow
This commit is contained in:
parent
4581af5e9f
commit
08b5af7511
|
@ -40,19 +40,26 @@ build:
|
||||||
DOCKER_TLS_CERTDIR: ''
|
DOCKER_TLS_CERTDIR: ''
|
||||||
services:
|
services:
|
||||||
- docker:dind
|
- docker:dind
|
||||||
|
rules:
|
||||||
|
- if: $CI_COMMIT_TAG
|
||||||
|
variables:
|
||||||
|
VERSION: $CI_COMMIT_TAG
|
||||||
|
- if: $CI_COMMIT_BRANCH =~ /^release/ || $CI_PIPELINE_SOURCE == "web"
|
||||||
|
variables:
|
||||||
|
VERSION: $CI_COMMIT_BRANCH
|
||||||
before_script:
|
before_script:
|
||||||
- echo -n $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER --password-stdin $CI_REGISTRY
|
- echo -n $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER --password-stdin $CI_REGISTRY
|
||||||
script:
|
script:
|
||||||
- export VERSION=$(docker run --rm -v "$PWD":/usr/src/app:ro -w /usr/src/app node:slim node -p "require('./package.json').version")
|
|
||||||
- docker pull $CI_REGISTRY_IMAGE:latest || true
|
- docker pull $CI_REGISTRY_IMAGE:latest || true
|
||||||
- >
|
- >
|
||||||
docker build
|
docker build
|
||||||
--pull
|
--pull
|
||||||
--cache-from $CI_REGISTRY_IMAGE:latest
|
--cache-from $CI_REGISTRY_IMAGE:latest
|
||||||
--tag $CI_REGISTRY_IMAGE:$VERSION
|
--tag $CI_REGISTRY_IMAGE:$VERSION
|
||||||
--tag $CI_REGISTRY_IMAGE:latest
|
|
||||||
.
|
.
|
||||||
- docker push $CI_REGISTRY_IMAGE:$VERSION
|
- docker push $CI_REGISTRY_IMAGE:$VERSION
|
||||||
- docker push $CI_REGISTRY_IMAGE:latest
|
- >
|
||||||
only:
|
if [ $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH ]; then
|
||||||
- main
|
docker tag $CI_REGISTRY_IMAGE:$VERSION $CI_REGISTRY_IMAGE:latest
|
||||||
|
docker push $CI_REGISTRY_IMAGE:latest
|
||||||
|
fi
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@mobicoop/matcher",
|
"name": "@mobicoop/matcher",
|
||||||
"version": "1.5.5",
|
"version": "1.6.0",
|
||||||
"description": "Mobicoop V3 Matcher",
|
"description": "Mobicoop V3 Matcher",
|
||||||
"author": "sbriat",
|
"author": "sbriat",
|
||||||
"private": true,
|
"private": true,
|
||||||
|
|
Loading…
Reference in New Issue