From 1576c4f97470aaf7c112763ec91b75754f22145f Mon Sep 17 00:00:00 2001 From: Steve Reis <stevereis93@gmail.com> Date: Tue, 21 Dec 2021 20:29:45 +0000 Subject: [PATCH] Update .gitlab-ci.yml --- .gitlab-ci.yml | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a99622b..b1709a0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -5,10 +5,6 @@ services: stages: - build - release - - deploy - -variables: - CONTAINER_BASE_IMAGE: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG before_script: - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY @@ -16,9 +12,27 @@ before_script: build: stage: build script: - - docker build -t $CONTAINER_BASE_IMAGE ./api - - docker push $CONTAINER_BASE_IMAGE + - docker build -t gateway-semantic ./api only: - main - develop - /^release-.*$/ + +release: + image: node:13 + stage: release + before_script: + - docker build -t gateway-semantic ./api + only: + refs: + - main + - develop + - rc + # This matches maintenance branches + - /^(([0-9]+)\.)?([0-9]+)\.x/ + # This matches pre-releases + - /^([0-9]+)\.([0-9]+)\.([0-9]+)(?:-([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?(?:\+[0-9A-Za-z-]+)?$/ + script: + - cd ./api + - npm install @semantic-release/gitlab @semantic-release/changelog @eclass/semantic-release-docker + - npx semantic-release -- GitLab