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

chore: use workflow rules

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