You've already forked gitlab-actions
mirror of
https://github.com/hegerdes/gitlab-actions.git
synced 2025-10-06 05:36:52 +02:00
feat: less duplicate pipelines
Signed-off-by: Henrik Gerdes <hegerdes@outlook.de>
This commit is contained in:
@@ -57,8 +57,9 @@ spec:
|
||||
# Don't add it to a *branch* pipeline if it's already in a merge request pipeline.
|
||||
- if: $CI_OPEN_MERGE_REQUESTS
|
||||
when: never
|
||||
# Add the job to branch pipelines.
|
||||
- if: $CI_COMMIT_BRANCH
|
||||
# Add the job to main branch pipelines.
|
||||
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
|
||||
- if: $CI_COMMIT_TAG
|
||||
---
|
||||
$[[ inputs.as_job ]]:
|
||||
stage: $[[ inputs.stage ]]
|
||||
|
@@ -26,12 +26,11 @@ spec:
|
||||
default:
|
||||
# Add the job to merge request pipelines if there's an open merge request.
|
||||
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
||||
when: manual
|
||||
# Don't add it to a *branch* pipeline if it's already in a merge request pipeline.
|
||||
- if: $CI_OPEN_MERGE_REQUESTS
|
||||
when: never
|
||||
# Add the job to main branch pipelines.
|
||||
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
||||
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
|
||||
---
|
||||
include:
|
||||
- local: .gitlab/ci/snippets.yml
|
||||
|
@@ -49,6 +49,7 @@ spec:
|
||||
when: never
|
||||
# Add the job to main branch pipelines.
|
||||
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
||||
# Add the job to tag pipelines.
|
||||
- if: $CI_COMMIT_TAG
|
||||
variables:
|
||||
HELM_CHART_VERSION: $CI_COMMIT_TAG
|
||||
@@ -82,7 +83,7 @@ $[[ inputs.job_name_prefix ]]:package:
|
||||
echo "Running helm lint..."
|
||||
helm lint $HELM_CHART_PATH
|
||||
if command -v kubeconform > /dev/null; then
|
||||
echo "Running kubeconform with args \$[[ inputs.kubeconform_args ]]\"..."
|
||||
echo "Running kubeconform with args: \"$[[ inputs.kubeconform_args ]]\"..."
|
||||
helm template demo $HELM_CHART_PATH | kubeconform $[[ inputs.kubeconform_args ]]
|
||||
fi
|
||||
fi
|
||||
|
@@ -57,8 +57,9 @@ spec:
|
||||
# Don't add it to a *branch* pipeline if it's already in a merge request pipeline.
|
||||
- if: $CI_OPEN_MERGE_REQUESTS
|
||||
when: never
|
||||
# Add the job to branch pipelines.
|
||||
- if: $CI_COMMIT_BRANCH
|
||||
# Add the job to main branch pipelines.
|
||||
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
|
||||
- if: $CI_COMMIT_TAG
|
||||
---
|
||||
$[[ inputs.as_job ]]:
|
||||
stage: $[[ inputs.stage ]]
|
||||
|
Reference in New Issue
Block a user