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: