diff --git a/services/jenkins/deployment.yaml b/services/jenkins/deployment.yaml index c82a6af..c71812a 100644 --- a/services/jenkins/deployment.yaml +++ b/services/jenkins/deployment.yaml @@ -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: diff --git a/services/jenkins/kustomization.yaml b/services/jenkins/kustomization.yaml index acb6fb4..987e842 100644 --- a/services/jenkins/kustomization.yaml +++ b/services/jenkins/kustomization.yaml @@ -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 diff --git a/services/jenkins/scripts/job_cleanup.groovy b/services/jenkins/scripts/job_cleanup.groovy new file mode 100644 index 0000000..f123c6b --- /dev/null +++ b/services/jenkins/scripts/job_cleanup.groovy @@ -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)") +}