From 82ef58bafc21dae495ad55178bc9b8b5ebfe2b8d Mon Sep 17 00:00:00 2001 From: William Nolin Date: Fri, 12 Feb 2021 23:56:35 -0500 Subject: [PATCH] Update .gitlab-ci.yml --- .gitlab-ci.yml | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fc943aa..296ff24 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -9,13 +9,15 @@ before_script: stages: - build - package - - deploy + - + +.only-master: + only: + - master build: stage: build - only: - refs: - - master + extends: .only-master-and-develop script: - docker pull $CI_REGISTRY_IMAGE_NG || true - docker build --cache-from $CI_REGISTRY_IMAGE_NG -f ng.Dockerfile -t $CI_REGISTRY_IMAGE_NG . @@ -24,9 +26,7 @@ build: package: stage: package needs: ['build'] - only: - refs: - - master + extends: .only-master-and-develop variables: PACKAGE_CONTAINER_NAME: "cre_frontend_package" ARTIFACT_NAME: "ColorRecipesExplorer-frontend-$CI_PIPELINE_IID" @@ -51,9 +51,7 @@ deploy: stage: deploy image: alpine:latest needs: ['package'] - only: - refs: - - master + extends: .only-master-and-develop variables: DEPLOYED_CONTAINER_NAME: "cre_frontend" before_script: