Skip to content
Snippets Groups Projects
Commit e17311ea authored by (INACTIVE) Marcel Bajdel (new marcel.bajdel)'s avatar (INACTIVE) Marcel Bajdel (new marcel.bajdel) :rocket:
Browse files

Adding rules

parent 49968af5
No related branches found
No related tags found
2 merge requests!20Release,!14Adding rules
......@@ -25,6 +25,12 @@ build_branch: # Creating tarball for the each branch in the repository
when: on_success
expire_in: 10 minutes
rules:
- if: '$CI_COMMIT_BRANCH == "develop"'
when: never
- if: '$CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop"'
when: never
- if: '$CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "main" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "release"'
when: never
- exists:
- $CI_COMMIT_BRANCH
- changes:
......@@ -46,7 +52,20 @@ branch_scan: # Scan the tarball with trivy
- scan_result # scan results
when: on_success
expire_in: 10 minutes
rules:
- if: '$CI_COMMIT_BRANCH == "develop"'
when: never
- if: '$CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop"'
when: never
- if: '$CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "main" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "release"'
when: never
- exists:
- $CI_COMMIT_BRANCH
- changes:
- README.md
when: never
- changes:
- '*'
check_branch_image: # check for vulnerabilities and validate with crane
stage: check_branch_image
image:
......@@ -71,7 +90,21 @@ check_branch_image: # check for vulnerabilities and validate with crane
artifacts:
paths: # save the results
- tar_images
rules:
- if: '$CI_COMMIT_BRANCH == "develop"'
when: never
- if: '$CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop"'
when: never
- if: '$CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "main" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "release"'
when: never
- exists:
- $CI_COMMIT_BRANCH
- changes:
- README.md
when: never
- changes:
- '*'
build_develop: # This build will run at the merge to develop
stage: build_develop
image:
......@@ -85,6 +118,8 @@ build_develop: # This build will run at the merge to develop
rules:
- if: '$CI_COMMIT_BRANCH == "develop"'
- if: '$CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop"'
- if: '$CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "main" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "release"'
when: never
- changes:
- README.md
when: never
......@@ -102,14 +137,14 @@ test_latest: # This test will run only for tag latest
artifacts:
paths:
- test_latest.log
rules:
rules:
- if: '$CI_COMMIT_BRANCH == "develop"'
- if: '$CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop"'
- if: '$CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "main" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "release"'
when: never
- changes:
- README.md
when: never
after_script:
- 'curl --request POST --form "token=glptt-eb00396b920d3a6043997b78714990b1fa0063ea" --form ref=pipeline_branch https://codebase.helmholtz.cloud/api/v4/projects/9922/trigger/pipeline'
build_tag: # This build will run only for tags
stage: build_tag
......@@ -139,4 +174,6 @@ test_tag: # This test will run only for tags
artifacts:
paths:
- test_tag.log
after_script:
- 'curl --request POST --form "token=glptt-eb00396b920d3a6043997b78714990b1fa0063ea" --form ref=pipeline_branch https://codebase.helmholtz.cloud/api/v4/projects/9922/trigger/pipeline'
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment