Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Helm
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
to be continuous...
Helm
Commits
e110fd37
Commit
e110fd37
authored
2 years ago
by
Pierre Smeyers
Browse files
Options
Downloads
Patches
Plain Diff
chore: use workflow rules
parent
27d34066
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
templates/gitlab-ci-helm.yml
+24
-33
24 additions, 33 deletions
templates/gitlab-ci-helm.yml
with
24 additions
and
33 deletions
templates/gitlab-ci-helm.yml
+
24
−
33
View file @
e110fd37
...
...
@@ -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"
...
...
@@ -513,7 +521,7 @@ helm-lint:
-
helm $HELM_DEPENDENCY_ARGS $HELM_CHART_DIR
-
helm ${TRACE+--debug} $HELM_LINT_ARGS $HELM_CHART_DIR
rules
:
-
if
:
'
$CI_MERGE_REQUEST_ID
||
$HELM_LINT_DISABLED
==
"true"'
-
if
:
'
$HELM_LINT_DISABLED
==
"true"'
when
:
never
-
exists
:
-
"
**/Chart.yaml"
...
...
@@ -525,7 +533,7 @@ helm-values-common-lint:
-
awkenvsubst < "$HELM_COMMON_VALUES" > generated-values-common.yml
-
yamllint -d "$HELM_YAMLLINT_CONFIG" $HELM_YAMLLINT_ARGS generated-values-common.yml
rules
:
-
if
:
'
$CI_MERGE_REQUEST_ID
||
$HELM_YAMLLINT_DISABLED
==
"true"'
-
if
:
'
$HELM_YAMLLINT_DISABLED
==
"true"'
when
:
never
-
if
:
'
$HELM_COMMON_VALUES'
...
...
@@ -536,7 +544,7 @@ helm-values-review-lint:
-
awkenvsubst < "$HELM_REVIEW_VALUES" > generated-values-review.yml
-
yamllint -d "$HELM_YAMLLINT_CONFIG" $HELM_YAMLLINT_ARGS generated-values-review.yml
rules
:
-
if
:
'
$CI_MERGE_REQUEST_ID
||
$HELM_YAMLLINT_DISABLED
==
"true"'
-
if
:
'
$HELM_YAMLLINT_DISABLED
==
"true"'
when
:
never
# only on non-production, non-integration branches
-
if
:
'
$HELM_REVIEW_VALUES
&&
$CI_COMMIT_REF_NAME
!~
$PROD_REF
&&
$CI_COMMIT_REF_NAME
!~
$INTEG_REF'
...
...
@@ -547,7 +555,7 @@ helm-values-integration-lint:
-
awkenvsubst < "$HELM_INTEG_VALUES" > generated-values-integration.yml
-
yamllint -d "$HELM_YAMLLINT_CONFIG" $HELM_YAMLLINT_ARGS generated-values-integration.yml
rules
:
-
if
:
'
$CI_MERGE_REQUEST_ID
||
$HELM_YAMLLINT_DISABLED
==
"true"'
-
if
:
'
$HELM_YAMLLINT_DISABLED
==
"true"'
when
:
never
# only on integration branch(es)
-
if
:
'
$HELM_INTEG_VALUES
&&
$CI_COMMIT_REF_NAME
=~
$INTEG_REF'
...
...
@@ -558,7 +566,7 @@ helm-values-staging-lint:
-
awkenvsubst < "$HELM_STAGING_VALUES" > generated-values-staging.yml
-
yamllint -d "$HELM_YAMLLINT_CONFIG" $HELM_YAMLLINT_ARGS generated-values-staging.yml
rules
:
-
if
:
'
$CI_MERGE_REQUEST_ID
||
$HELM_YAMLLINT_DISABLED
==
"true"'
-
if
:
'
$HELM_YAMLLINT_DISABLED
==
"true"'
when
:
never
# only on production branch(es)
-
if
:
'
$HELM_STAGING_VALUES
&&
$CI_COMMIT_REF_NAME
=~
$PROD_REF'
...
...
@@ -569,7 +577,7 @@ helm-values-prod-lint:
-
awkenvsubst < "$HELM_PROD_VALUES" > generated-values-prod.yml
-
yamllint -d "$HELM_YAMLLINT_CONFIG" $HELM_YAMLLINT_ARGS generated-values-prod.yml
rules
:
-
if
:
'
$CI_MERGE_REQUEST_ID
||
$HELM_YAMLLINT_DISABLED
==
"true"'
-
if
:
'
$HELM_YAMLLINT_DISABLED
==
"true"'
when
:
never
# only on production branch(es)
-
if
:
'
$HELM_PROD_VALUES
&&
$CI_COMMIT_REF_NAME
=~
$PROD_REF'
...
...
@@ -582,9 +590,6 @@ helm-review-score:
-
awkenvsubst < "$HELM_REVIEW_VALUES" > generated-values-review.yml
-
helm template $HELM_CHART_DIR --values generated-values-common.yml --values generated-values-review.yml | kube-score score ${HELM_KUBE_SCORE_ARGS} -
rules
:
# exclude merge requests
-
if
:
$CI_MERGE_REQUEST_ID
when
:
never
# exclude when $HELM_KUBE_SCORE_DISABLED is set
-
if
:
'
$HELM_KUBE_SCORE_DISABLED
==
"true"'
when
:
never
...
...
@@ -602,9 +607,6 @@ helm-integration-score:
-
awkenvsubst < "$HELM_INTEG_VALUES" > generated-values-integration.yml
-
helm template $HELM_CHART_DIR --values generated-values-common.yml --values generated-values-integration.yml | kube-score score ${HELM_KUBE_SCORE_ARGS} -
rules
:
# exclude merge requests
-
if
:
$CI_MERGE_REQUEST_ID
when
:
never
# exclude when $K8S_SCORE_DISABLED is set
-
if
:
'
$HELM_KUBE_SCORE_DISABLED
==
"true"'
when
:
never
...
...
@@ -622,9 +624,6 @@ helm-staging-score:
-
awkenvsubst < "$HELM_STAGING_VALUES" > generated-values-staging.yml
-
helm template $HELM_CHART_DIR --values generated-values-common.yml --values generated-values-staging.yml | kube-score score ${HELM_KUBE_SCORE_ARGS} -
rules
:
# exclude merge requests
-
if
:
$CI_MERGE_REQUEST_ID
when
:
never
# exclude when $K8S_SCORE_DISABLED is set
-
if
:
'
$HELM_KUBE_SCORE_DISABLED
==
"true"'
when
:
never
...
...
@@ -642,9 +641,6 @@ helm-prod-score:
-
awkenvsubst < "$HELM_PROD_VALUES" > generated-values-prod.yml
-
helm template $HELM_CHART_DIR --values generated-values-common.yml --values generated-values-prod.yml | kube-score score ${HELM_KUBE_SCORE_ARGS} -
rules
:
# exclude merge requests
-
if
:
$CI_MERGE_REQUEST_ID
when
:
never
# exclude when $K8S_SCORE_DISABLED is set
-
if
:
'
$HELM_KUBE_SCORE_DISABLED
==
"true"'
when
:
never
...
...
@@ -690,8 +686,6 @@ helm-package:
fi
fi
rules
:
-
if
:
$CI_MERGE_REQUEST_ID
when
:
never
-
exists
:
-
"
**/Chart.yaml"
artifacts
:
...
...
@@ -726,7 +720,7 @@ helm-publish:
log_error "No Chart to deploy! url is: $HELM_PUBLISH_URL, and package found is: ${package}"
fi
rules
:
-
if
:
$CI_MERGE_REQUEST_ID ||
$HELM_PUBLISH_URL ==
null
|| $CI_COMMIT_REF_NAME !~ $PROD_REF
-
if
:
$HELM_PUBLISH_URL ==
null
|| $CI_COMMIT_REF_NAME !~ $PROD_REF
when
:
never
-
if
:
$AUTODEPLOY_TO_PROD
# else: manual + blocking
...
...
@@ -831,7 +825,7 @@ helm-review:
resource_group
:
review/$CI_COMMIT_REF_NAME
rules
:
# exclude merge requests, tags and on $HELM_REVIEW_DISABLED set
-
if
:
'
$HELM_REVIEW_DISABLED
==
"true"
||
$CI_MERGE_REQUEST_ID
||
$CI_COMMIT_TAG'
-
if
:
'
$HELM_REVIEW_DISABLED
==
"true"
||
$CI_COMMIT_TAG'
when
:
never
# only on non-production, non-integration branches
-
if
:
'
$CI_COMMIT_REF_NAME
!~
$PROD_REF
&&
$CI_COMMIT_REF_NAME
!~
$INTEG_REF'
...
...
@@ -850,7 +844,7 @@ helm-cleanup-review:
resource_group
:
review/$CI_COMMIT_REF_NAME
rules
:
# exclude merge requests, tags and on $HELM_REVIEW_DISABLED set
-
if
:
'
$HELM_REVIEW_DISABLED
==
"true"
||
$CI_MERGE_REQUEST_ID
||
$CI_COMMIT_TAG'
-
if
:
'
$HELM_REVIEW_DISABLED
==
"true"
||
$CI_COMMIT_TAG'
when
:
never
# only on non-production, non-integration branches
-
if
:
'
$CI_COMMIT_REF_NAME
!~
$PROD_REF
&&
$CI_COMMIT_REF_NAME
!~
$INTEG_REF'
...
...
@@ -867,7 +861,7 @@ helm-test-review:
ENV_NAMESPACE
:
"
$HELM_REVIEW_NAMESPACE"
rules
:
# exclude merge requests, tags and on $HELM_REVIEW_DISABLED set
-
if
:
'
$HELM_REVIEW_DISABLED
==
"true"
||
$CI_MERGE_REQUEST_ID
||
$CI_COMMIT_TAG'
-
if
:
'
$HELM_REVIEW_DISABLED
==
"true"
||
$CI_COMMIT_TAG'
when
:
never
# only on non-production, non-integration branches
-
if
:
'
$CI_COMMIT_REF_NAME
!~
$PROD_REF
&&
$CI_COMMIT_REF_NAME
!~
$INTEG_REF
&&
$HELM_TEST_ENABLED
==
"true"'
...
...
@@ -893,7 +887,7 @@ helm-integration:
resource_group
:
integration
rules
:
# exclude merge requests and on $HELM_INTEG_DISABLED set
-
if
:
'
$HELM_INTEG_DISABLED
==
"true"
||
$CI_MERGE_REQUEST_ID
'
-
if
:
'
$HELM_INTEG_DISABLED
==
"true"'
when
:
never
# only on integration branch(es)
-
if
:
'
$CI_COMMIT_REF_NAME
=~
$INTEG_REF'
...
...
@@ -912,7 +906,7 @@ helm-cleanup-integration:
resource_group
:
integration
rules
:
# exclude merge requests and on $HELM_INTEG_DISABLED set
-
if
:
'
$HELM_INTEG_DISABLED
==
"true"
||
$CI_MERGE_REQUEST_ID
'
-
if
:
'
$HELM_INTEG_DISABLED
==
"true"'
when
:
never
# only on integration branch(es)
-
if
:
'
$CI_COMMIT_REF_NAME
=~
$INTEG_REF'
...
...
@@ -930,7 +924,7 @@ helm-test-integration:
ENV_VALUES
:
"
$HELM_INTEG_VALUES"
rules
:
# exclude merge requests and on $HELM_INTEG_DISABLED set
-
if
:
'
$HELM_INTEG_DISABLED
==
"true"
||
$CI_MERGE_REQUEST_ID
'
-
if
:
'
$HELM_INTEG_DISABLED
==
"true"'
when
:
never
# only on integration branch(es)
-
if
:
'
$CI_COMMIT_REF_NAME
=~
$INTEG_REF
&&
$HELM_TEST_ENABLED
==
"true"'
...
...
@@ -954,7 +948,7 @@ helm-staging:
resource_group
:
staging
rules
:
# exclude merge requests and on $HELM_STAGING_DISABLED set
-
if
:
'
$HELM_STAGING_DISABLED
==
"true"
||
$CI_MERGE_REQUEST_ID
'
-
if
:
'
$HELM_STAGING_DISABLED
==
"true"'
when
:
never
# only on production branch(es)
-
if
:
'
$CI_COMMIT_REF_NAME
=~
$PROD_REF'
...
...
@@ -973,7 +967,7 @@ helm-cleanup-staging:
resource_group
:
staging
rules
:
# exclude merge requests and on $HELM_STAGING_DISABLED set
-
if
:
'
$HELM_STAGING_DISABLED
==
"true"
||
$CI_MERGE_REQUEST_ID
'
-
if
:
'
$HELM_STAGING_DISABLED
==
"true"'
when
:
never
# only on production branch(es)
-
if
:
'
$CI_COMMIT_REF_NAME
=~
$PROD_REF'
...
...
@@ -990,7 +984,7 @@ helm-test-staging:
ENV_VALUES
:
"
$HELM_STAGING_VALUES"
rules
:
# exclude merge requests and on $HELM_STAGING_DISABLED set
-
if
:
'
$HELM_STAGING_DISABLED
==
"true"
||
$CI_MERGE_REQUEST_ID
'
-
if
:
'
$HELM_STAGING_DISABLED
==
"true"'
when
:
never
# only on production branch(es)
-
if
:
'
$CI_COMMIT_REF_NAME
=~
$PROD_REF
&&
$HELM_TEST_ENABLED
==
"true"
'
...
...
@@ -1013,9 +1007,6 @@ helm-production:
url
:
"
${HELM_PROD_ENVIRONMENT_URL}"
resource_group
:
production
rules
:
# exclude merge requests
-
if
:
$CI_MERGE_REQUEST_ID
when
:
never
# exclude non-production branches
-
if
:
'
$CI_COMMIT_REF_NAME
!~
$PROD_REF'
when
:
never
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment