jenkins: clean legacy quality-gate job
This commit is contained in:
parent
b8d8240383
commit
36ae49f1fc
@ -41,7 +41,7 @@ spec:
|
||||
{{ with secret "kv/data/atlas/jenkins/webhook-tokens" }}
|
||||
TITAN_IAC_WEBHOOK_TOKEN={{ .Data.data.titan_iac_quality_gate }}
|
||||
{{ end }}
|
||||
bstein.dev/restarted-at: "2026-01-20T13:10:00Z"
|
||||
bstein.dev/restarted-at: "2026-01-20T13:45:00Z"
|
||||
spec:
|
||||
serviceAccountName: jenkins
|
||||
nodeSelector:
|
||||
|
||||
@ -16,6 +16,7 @@ configMapGenerator:
|
||||
- name: jenkins-init-scripts
|
||||
namespace: jenkins
|
||||
files:
|
||||
- job_cleanup.groovy=scripts/job_cleanup.groovy
|
||||
- theme.groovy=scripts/theme.groovy
|
||||
options:
|
||||
disableNameSuffixHash: true
|
||||
|
||||
13
services/jenkins/scripts/job_cleanup.groovy
Normal file
13
services/jenkins/scripts/job_cleanup.groovy
Normal file
@ -0,0 +1,13 @@
|
||||
import jenkins.branch.MultiBranchProject
|
||||
import jenkins.model.Jenkins
|
||||
|
||||
def jenkins = Jenkins.instance
|
||||
if (jenkins == null) {
|
||||
return
|
||||
}
|
||||
|
||||
def legacy = jenkins.getItemByFullName('titan-iac-quality-gate')
|
||||
if (legacy != null && !(legacy instanceof MultiBranchProject)) {
|
||||
legacy.delete()
|
||||
println("Deleted legacy job titan-iac-quality-gate (non-multibranch)")
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user