Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS has been phased out. To see alternatives please check here

Skip to content
Snippets Groups Projects

Removing some duplicated code.

1 open thread
1 file
+ 8
18
Compare changes
  • Side-by-side
  • Inline
+ 8
18
@@ -49,24 +49,6 @@ run-test:
@@ -49,24 +49,6 @@ run-test:
# Create 'resource_group', to avoid collision when executing many pipelines at the same time.
# Create 'resource_group', to avoid collision when executing many pipelines at the same time.
resource_group: test-group
resource_group: test-group
deliver-latest-job:
stage: deliver
variables:
IMAGE_TAG: "latest"
script:
- ansible-playbook ansible/deliver.yml
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
deliver-tagged-job:
stage: deliver
variables:
IMAGE_TAG: $CI_COMMIT_TAG
script:
- ansible-playbook ansible/deliver.yml
rules:
- if: $CI_COMMIT_TAG
deliver-testing-branch-job:
deliver-testing-branch-job:
    • Change the name of the job to a more general one since you are using it to deliver everything, testing branch, latest or tagged. If possible move the logic for for the "tagged deliver" to the rules part so that we have everything in the same place

Please register or sign in to reply
stage: deliver
stage: deliver
variables:
variables:
@@ -74,6 +56,14 @@ deliver-testing-branch-job:
@@ -74,6 +56,14 @@ deliver-testing-branch-job:
script:
script:
- ansible-playbook ansible/deliver.yml
- ansible-playbook ansible/deliver.yml
rules:
rules:
 
# deliver latest
 
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
 
variables: # Override IMAGE_TAG variable
 
IMAGE_TAG: "latest"
 
# deliver tagged image
 
- if: $CI_COMMIT_TAG
 
variables: # Override IMAGE_TAG variable
 
IMAGE_TAG: $CI_COMMIT_TAG
# For custom Testing images, keep standard, naming your branch as v4.1someSquadNameRef
# For custom Testing images, keep standard, naming your branch as v4.1someSquadNameRef
- if: $CI_COMMIT_BRANCH == 'develop'
- if: $CI_COMMIT_BRANCH == 'develop'
- if: $CI_COMMIT_BRANCH =~ /^v3*/
- if: $CI_COMMIT_BRANCH =~ /^v3*/
Loading