Skip to content
Snippets Groups Projects
Commit eb218267 authored by Konstantinos Evangelou's avatar Konstantinos Evangelou
Browse files

Update .gitlab-ci.yml file

parent c810c4fd
Branches master-bak
No related tags found
No related merge requests found
Pipeline #7798284 passed
...@@ -12,7 +12,7 @@ workflow: ...@@ -12,7 +12,7 @@ workflow:
DOCKER_IMAGE: ${CI_REGISTRY_IMAGE}:${CI_COMMIT_TAG} DOCKER_IMAGE: ${CI_REGISTRY_IMAGE}:${CI_COMMIT_TAG}
when: always when: always
- variables: - variables:
DOCKER_IMAGE: ${CI_REGISTRY_IMAGE}:${CI_COMMIT_REF_NAME} DOCKER_IMAGE: ${CI_REGISTRY_IMAGE}:${CI_COMMIT_BRANCH}
when: always when: always
Run CodiMD tests: Run CodiMD tests:
...@@ -74,7 +74,7 @@ Remove dangling Docker image: ...@@ -74,7 +74,7 @@ Remove dangling Docker image:
- curl -L https://github.com/genuinetools/reg/releases/download/v0.13.0/reg-linux-amd64 > /bin/reg - curl -L https://github.com/genuinetools/reg/releases/download/v0.13.0/reg-linux-amd64 > /bin/reg
- chmod +x /bin/reg - chmod +x /bin/reg
script: script:
- /bin/reg -d -r $CI_REGISTRY -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD rm "$CI_PROJECT_PATH:$CI_COMMIT_REF_NAME" - /bin/reg -d -r $CI_REGISTRY -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD rm "$CI_PROJECT_PATH:$CI_COMMIT_BRANCH"
rules: rules:
- if: $CI_MERGE_REQUEST_ID - if: $CI_MERGE_REQUEST_ID
when: manual when: manual
...@@ -86,7 +86,7 @@ Build CodiMD image: ...@@ -86,7 +86,7 @@ Build CodiMD image:
extends: extends:
- .build_base - .build_base
rules: rules:
- if: '$CI_COMMIT_TAG || $CI_COMMIT_REF_NAME == "cernbox-integration"' - if: '$CI_COMMIT_TAG || $CI_COMMIT_BRANCH == "cernbox-integration" || $CI_COMMIT_BRANCH == "dev"'
when: on_success when: on_success
.deploy_base: .deploy_base:
...@@ -118,7 +118,6 @@ Deploy (DEV): ...@@ -118,7 +118,6 @@ Deploy (DEV):
rules: rules:
- if: $CI_COMMIT_BRANCH == "dev" - if: $CI_COMMIT_BRANCH == "dev"
when: on_success when: on_success
- if: $CI_COMMIT_BRANCH
Deploy (PROD): Deploy (PROD):
stage: deploy stage: deploy
...@@ -134,11 +133,8 @@ Deploy (PROD): ...@@ -134,11 +133,8 @@ Deploy (PROD):
extends: extends:
- .deploy_base - .deploy_base
rules: rules:
- if: '$CI_COMMIT_TAG && $CI_COMMIT_TAG =~ /^cern-.*-prod$/' - if: '$CI_COMMIT_TAG && $CI_COMMIT_TAG =~ /^cern-.*-prod$/ && $CI_COMMIT_BRANCH == "master"'
when: manual when: manual
- if: $CI_COMMIT_BRANCH == "master"
when: manual
- if: $CI_COMMIT_BRANCH
Deploy (CERNBox integration): Deploy (CERNBox integration):
stage: deploy stage: deploy
...@@ -154,5 +150,5 @@ Deploy (CERNBox integration): ...@@ -154,5 +150,5 @@ Deploy (CERNBox integration):
extends: extends:
- .deploy_base - .deploy_base
rules: rules:
- if: '$CI_COMMIT_REF_NAME == "cernbox-integration"' - if: '$CI_COMMIT_BRANCH == "cernbox-integration"'
when: manual when: manual
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment