Promoted Build plugin change the promotion status

36 views
Skip to first unread message

avinash....@gmail.com

unread,
Nov 16, 2016, 10:44:11 AM11/16/16
to Jenkins Developers

I am using Promoted Build plugin to mark the stable build. 


I have a scenario where i need to unmark the build from promotion. Any suggestion to achieve this ?


The idea is having am multiple builds with the promotion flag will make the deploy team confuse. So as soon as we get a new stable build, i want to unmark the build from promotion.

avinash....@gmail.com

unread,
Nov 16, 2016, 1:08:03 PM11/16/16
to Jenkins Developers
On successful promotion, build metadata file (build.xml) will gets updated with following status.

<statuses>
       
<hudson.plugins.promoted__builds.Status>
         
<name>Promotion</name>
         
<badges>
           
<hudson.plugins.promoted__builds.conditions.GroovyCondition_-Badge>
             
<displayLabel>Custom Groovy script condition</displayLabel>
             
<variables class="empty-map"/>
           
</hudson.plugins.promoted__builds.conditions.GroovyCondition_-Badge>
           
<hudson.plugins.promoted__builds.conditions.SelfPromotionBadge/>
         
</badges>
         
<timestamp>
           
<time>1479318413549</time>
           
<timezone>Asia/Calcutta</timezone>
         
</timestamp>
         
<promotion>16</promotion>
         
<promotionAttempts>
           
<int>15</int>
           
<int>16</int>
         
</promotionAttempts>
       
</hudson.plugins.promoted__builds.Status>
     
</statuses>



If i remove this section from xml and restart the jenkin promotion status will be unmarked. But i am exploring a programmatic option to do this meta data change without restarting the jenkins!  Any suggestions/clue ? 
Reply all
Reply to author
Forward
0 new messages