diff --git a/templates/gitlab-ci-helm.yml b/templates/gitlab-ci-helm.yml index 596f64f49786080aa7c223d89f9f2e678ed8389d..7214dbafe7bc457d57810fa39b8392a1950db5d1 100644 --- a/templates/gitlab-ci-helm.yml +++ b/templates/gitlab-ci-helm.yml @@ -663,15 +663,16 @@ helm-publish: stage: publish script: - helm ${TRACE+--debug} $(get_helm_config_opt) repo index $HELM_PUBLISH_DIR --url $HELM_PUBLISH_URL $HELM_PUBLISH_ARGS - rules: - - if: $CI_MERGE_REQUEST_ID || $HELM_PUBLISH_URL == null || $CI_COMMIT_REF_NAME !~ $PROD_REF - when: never - - exists: - - $HELM_CHART_DIR/Chart.yaml artifacts: expire_in: 1 week paths: - $HELM_PUBLISH_DIR + rules: + - if: $CI_MERGE_REQUEST_ID || $HELM_PUBLISH_URL == null || $CI_COMMIT_REF_NAME !~ $PROD_REF + when: never + # /!\ variables can't be used in rules:exists + - exists: + - "**/Chart.yaml" # Deploy job prototype # Can be extended to define a concrete environment