diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7ad251f..c77f175 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,11 +4,12 @@ stages: - build - push - deploy - -before_script: - - echo -n $CI_REGISTRY_TOKEN | docker login -u "$CI_REGISTRY_USER" --password-stdin $CI_REGISTRY +.before_script + before_script: + - echo -n $CI_REGISTRY_TOKEN | docker login -u "$CI_REGISTRY_USER" --password-stdin $CI_REGISTRY build: + extends: .before_script stage: build tags: - docker @@ -19,6 +20,7 @@ build: # Tag the "master" branch as "latest" push latest: + extends: .before_script stage: push tags: - docker @@ -31,6 +33,7 @@ push latest: # Docker tag any Git tag push tag: + extends: .before_script stage: push tags: - docker @@ -43,6 +46,7 @@ push tag: # Docker Deploy # deploy: +# extends: .before_script # stage: deploy # tags: # - docker @@ -62,8 +66,6 @@ push tag: deploy: stage: deploy - bofore_script: - - '' image: name: alpine/helm:latest entrypoint: [""] @@ -73,6 +75,6 @@ deploy: --wait --set image.tag=${CI_COMMIT_SHA} simple-blog-api-${CI_COMMIT_REF_SLUG} - devops + devops/simple-blog-api environment: name: production