From 2a33fc613bc74a4cdaca88c1c352b9d79ce7678a Mon Sep 17 00:00:00 2001 From: Benjamin Heiskell Date: Wed, 11 Nov 2015 11:45:05 -0500 Subject: [PATCH] [FIXED JENKINS-27716] - Disable archived promotion jobs Since 1.585, the promotion must explicitly indicate that it can be disabled. Otherwise, promotions which trigger automatically upon build completion will execute, even if they're archived. See hudson.model.AbstractProject#makeDisabled(boolean) for additional details. --- .../hudson/plugins/promoted_builds/PromotionProcess.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/main/java/hudson/plugins/promoted_builds/PromotionProcess.java b/src/main/java/hudson/plugins/promoted_builds/PromotionProcess.java index 731322e6..120af9c4 100644 --- a/src/main/java/hudson/plugins/promoted_builds/PromotionProcess.java +++ b/src/main/java/hudson/plugins/promoted_builds/PromotionProcess.java @@ -153,6 +153,15 @@ public AbstractProject getOwner() { return getOwner().getACL(); } + /** + * JENKINS-27716: Since 1.585, the promotion must explicitly indicate that + * it can be disabled. Otherwise, promotions which trigger automatically + * upon build completion will execute, even if they're archived. + */ + @Override public boolean supportsMakeDisabled() { + return true; + } + /** * Get the promotion condition by referencing it fully qualified class name */