Skip to content
Snippets Groups Projects
Commit d3d33983 authored by Pierre Smeyers's avatar Pierre Smeyers
Browse files

chore: use workflow rules

parent b91e936e
Branches
Tags
No related merge requests found
...@@ -13,6 +13,14 @@ ...@@ -13,6 +13,14 @@
# program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth # program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
# Floor, Boston, MA 02110-1301, USA. # Floor, Boston, MA 02110-1301, USA.
# ========================================================================================= # =========================================================================================
# default workflow rules
workflow:
rules:
# exclude merge requests
- if: $CI_MERGE_REQUEST_ID
when: never
- when: always
variables: variables:
# variabilized tracking image # variabilized tracking image
TBC_TRACKING_IMAGE: "$CI_REGISTRY/to-be-continuous/tools/tracking:master" TBC_TRACKING_IMAGE: "$CI_REGISTRY/to-be-continuous/tools/tracking:master"
...@@ -422,9 +430,6 @@ docker-lint: ...@@ -422,9 +430,6 @@ docker-lint:
script: script:
- dockerfile_lint -f $DOCKER_FILE $DOCKER_LINT_ARGS - dockerfile_lint -f $DOCKER_FILE $DOCKER_LINT_ARGS
rules: rules:
# exclude merge requests
- if: $CI_MERGE_REQUEST_ID
when: never
# execute if DOCKER_LINT_ENABLED set # execute if DOCKER_LINT_ENABLED set
# on production or integration branches: # on production or integration branches:
- if: '$DOCKER_LINT_ENABLED == "true" && ($CI_COMMIT_REF_NAME =~ $PROD_REF || $CI_COMMIT_REF_NAME =~ $INTEG_REF)' - if: '$DOCKER_LINT_ENABLED == "true" && ($CI_COMMIT_REF_NAME =~ $PROD_REF || $CI_COMMIT_REF_NAME =~ $INTEG_REF)'
...@@ -460,9 +465,6 @@ docker-hadolint: ...@@ -460,9 +465,6 @@ docker-hadolint:
paths: paths:
- "reports/hadolint-*.json" - "reports/hadolint-*.json"
rules: rules:
# exclude merge requests
- if: $CI_MERGE_REQUEST_ID
when: never
# exclude if DOCKER_HADOLINT_DISABLED set # exclude if DOCKER_HADOLINT_DISABLED set
- if: '$DOCKER_HADOLINT_DISABLED == "true"' - if: '$DOCKER_HADOLINT_DISABLED == "true"'
when: never when: never
...@@ -495,9 +497,6 @@ docker-kaniko-build: ...@@ -495,9 +497,6 @@ docker-kaniko-build:
dotenv: dotenv:
- docker.env - docker.env
rules: rules:
# exclude merge requests
- if: $CI_MERGE_REQUEST_ID
when: never
# execute if $DOCKER_DIND_BUILD not set # execute if $DOCKER_DIND_BUILD not set
- if: '$DOCKER_DIND_BUILD == null || $DOCKER_DIND_BUILD == ""' - if: '$DOCKER_DIND_BUILD == null || $DOCKER_DIND_BUILD == ""'
...@@ -528,9 +527,6 @@ docker-dind-build: ...@@ -528,9 +527,6 @@ docker-dind-build:
dotenv: dotenv:
- docker.env - docker.env
rules: rules:
# exclude merge requests
- if: $CI_MERGE_REQUEST_ID
when: never
- if: $DOCKER_DIND_BUILD - if: $DOCKER_DIND_BUILD
# ================================================== # ==================================================
...@@ -595,9 +591,6 @@ docker-healthcheck: ...@@ -595,9 +591,6 @@ docker-healthcheck:
exit 1 exit 1
fi fi
rules: rules:
# exclude merge requests
- if: $CI_MERGE_REQUEST_ID
when: never
- if: '$DOCKER_HEALTHCHECK_DISABLED == "true"' - if: '$DOCKER_HEALTHCHECK_DISABLED == "true"'
when: never when: never
- if: $DOCKER_DIND_BUILD - if: $DOCKER_DIND_BUILD
...@@ -628,9 +621,6 @@ docker-trivy: ...@@ -628,9 +621,6 @@ docker-trivy:
reports: reports:
junit: "trivy/*.xml" junit: "trivy/*.xml"
rules: rules:
# exclude merge requests
- if: $CI_MERGE_REQUEST_ID
when: never
- if: '$DOCKER_TRIVY_DISABLED == "true"' - if: '$DOCKER_TRIVY_DISABLED == "true"'
when: never when: never
- if: '$DOCKER_TRIVY_ADDR && ($CI_COMMIT_REF_NAME =~ $PROD_REF || $CI_COMMIT_REF_NAME =~ $INTEG_REF)' - if: '$DOCKER_TRIVY_ADDR && ($CI_COMMIT_REF_NAME =~ $PROD_REF || $CI_COMMIT_REF_NAME =~ $INTEG_REF)'
...@@ -676,9 +666,6 @@ docker-publish: ...@@ -676,9 +666,6 @@ docker-publish:
dotenv: dotenv:
- docker.env - docker.env
rules: rules:
# exclude merge requests
- if: $CI_MERGE_REQUEST_ID
when: never
# on tag: always # on tag: always
- if: $CI_COMMIT_TAG - if: $CI_COMMIT_TAG
# exclude non-production branches # exclude non-production branches
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment