Skip to content

Commit

Permalink
Merge pull request #797 from dduportal/feat/jenkins-jobs/allow-disabl…
Browse files Browse the repository at this point in the history
…ing-tagdiscovery

feat(jenkins-jobs) allow disabling git tag discovery
  • Loading branch information
dduportal authored Sep 25, 2023
2 parents a6ea7d8 + 93d8c87 commit 28b2ebd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion charts/jenkins-jobs/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ icon: https://jenkins.io/images/logos/plumber/256.png
maintainers:
- name: Damien Duportal <damien.duportal@gmail.com>
name: jenkins-jobs
version: 0.4.0
version: 0.5.0
appVersion: "1.0" # unused
4 changes: 4 additions & 0 deletions charts/jenkins-jobs/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,9 @@ multibranchPipelineJob('{{ .fullId | default .id }}') {
strategyId(1) // 1-Merging the pull request with the current target branch revision
}
pruneStaleBranchTrait()
{{- if not .disableTagDiscovery }}
gitHubTagDiscovery()
{{- end }}
pullRequestLabelsBlackListFilterTrait {
labels('on-hold,ci-skip,skip-ci')
}
Expand All @@ -177,10 +179,12 @@ multibranchPipelineJob('{{ .fullId | default .id }}') {
{{- end }}
}
buildRegularBranches()
{{- if not .disableTagDiscovery }}
buildTags {
atLeastDays('-1')
atMostDays('3')
}
{{- end }}
}
}
}
Expand Down
6 changes: 1 addition & 5 deletions charts/jenkins-jobs/tests/multibranch_job_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,7 @@ tests:
allowUntrustedChanges: true
jenkinsfilePath: Jenkinsfile
branchIncludes: "prod dev MR-*"
disableTagDiscovery: true
asserts:
- equal:
path: data["jobs-definition.yaml"]
Expand Down Expand Up @@ -386,7 +387,6 @@ tests:
strategyId(1) // 1-Merging the pull request with the current target branch revision
}
pruneStaleBranchTrait()
gitHubTagDiscovery()
pullRequestLabelsBlackListFilterTrait {
labels('on-hold,ci-skip,skip-ci')
}
Expand All @@ -407,10 +407,6 @@ tests:
ignoreUntrustedChanges(false)
}
buildRegularBranches()
buildTags {
atLeastDays('-1')
atMostDays('3')
}
}
}
}
Expand Down

0 comments on commit 28b2ebd

Please sign in to comment.