[JIRA] (JENKINS-36089) Pipeline support for Promoted Builds Plugin

32 views
Skip to first unread message

smithgcovert@gmail.com (JIRA)

unread,
Jun 20, 2016, 12:00:01 PM6/20/16
to jenkinsc...@googlegroups.com
Greg Smith created an issue
 
Jenkins / New Feature JENKINS-36089
Pipeline support for Promoted Builds Plugin
Issue Type: New Feature New Feature
Assignee: Oleg Nenashev
Components: promoted-builds-plugin
Created: 2016/Jun/20 3:59 PM
Priority: Major Major
Reporter: Greg Smith

This enhancement request is for the Promoted Builds plugin to support Jenkins' 2.X style Pipelines.

Pipelines are the new paradigm that Jenkins 2.X is promoting heavily – with its ability to define the build process in code, automatic build discovery, and great integration with repository systems for automatic build / testing of pull requests.

There are many places within the new Pipeline style where the Promoted Plugin could be used to great effect:

  • builds could dynamically promote and save artifacts, pushing them into other pipeline jobs
  • Users could manually promote pipeline builds that have been through some kind of QA process
  • Permalinks provided by the Promoted Builds plugin could be used in pipeline builds

Basically, the same vast number of use cases that the Promoted Build Plugin provides today could be taken advantage of by builds defined via the Pipeline API and Jenkinsfile build definitions.

Reference here for the API changes that are required for a plugin to be available in a Pipeline build:
https://github.com/jenkinsci/pipeline-plugin/blob/master/COMPATIBILITY.md

Original reference bug:
https://issues.jenkins-ci.org/browse/JENKINS-35376

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
Atlassian logo

violas@intuilab.com (JIRA)

unread,
Jul 27, 2016, 11:30:01 AM7/27/16
to jenkinsc...@googlegroups.com
jeremie violas commented on New Feature JENKINS-36089
 
Re: Pipeline support for Promoted Builds Plugin

In the meantime, is there any workaround or best practice to have manual promotion on build with multibranch pipeline job ?

smithgcovert@gmail.com (JIRA)

unread,
Jul 28, 2016, 3:22:01 PM7/28/16
to jenkinsc...@googlegroups.com

I am waiting on this feature, which will give me something close to promotion, using pipeline input:

https://issues.jenkins-ci.org/browse/JENKINS-27039

tealcosmo@gmail.com (JIRA)

unread,
Aug 17, 2016, 12:59:02 PM8/17/16
to jenkinsc...@googlegroups.com

Yes Please. It's very hard to have build pipelines without some amount of manual promotion and testing before the next step.

tomasz.dudala@nsn.com (JIRA)

unread,
Sep 12, 2016, 6:15:02 AM9/12/16
to jenkinsc...@googlegroups.com
tdudala commented on New Feature JENKINS-36089

This support would be very useful. Currently this is our major blocking point for moving into pipelines.

winotu.email@gmail.com (JIRA)

unread,
Sep 12, 2016, 6:15:03 AM9/12/16
to jenkinsc...@googlegroups.com
Chris Z commented on New Feature JENKINS-36089

jeremie violas As a alternative you could try to add hyperlink in build description(with GET parameters) to some promotion job under certain statement that is needed for promotion.

violas@intuilab.com (JIRA)

unread,
Sep 12, 2016, 6:28:03 AM9/12/16
to jenkinsc...@googlegroups.com

Chris Z: Thanks for the tip. I'll try that.
Right now we didn't have to use promotion since we migrate to pipelines, but the time will come. If the plugin has not been updated then, I think we will create some jobs dedicated to promotion (publish artifacts and other specific actions) that will get all necessary artifacts from the main building jobs.

jglick@cloudbees.com (JIRA)

unread,
Oct 27, 2016, 2:14:07 PM10/27/16
to jenkinsc...@googlegroups.com

jglick@cloudbees.com (JIRA)

unread,
Oct 27, 2016, 2:15:04 PM10/27/16
to jenkinsc...@googlegroups.com
Jesse Glick commented on New Feature JENKINS-36089
 
Re: Pipeline support for Promoted Builds Plugin

-1 on this. The design of Promoted Builds is bad. There could be a separate plugin offering comparable functionality but done the right way.

robert.j.greig@gmail.com (JIRA)

unread,
Nov 13, 2016, 5:28:03 PM11/13/16
to jenkinsc...@googlegroups.com

Can you expand on why the design of promoted builds is bad?

I am using multibranch pipelines, and would like to be able to have automated deployments through different environments, but only with human approval. Is there a recommended approach for achieving this? I confess I did not understand the suggestion above of adding a hyperlink.

max@wwwahler.de (JIRA)

unread,
Nov 15, 2016, 4:43:02 AM11/15/16
to jenkinsc...@googlegroups.com

I just wanted to explain my approach for promoting pipeline builds, maybe it helps others.

I have several components and each has a separate build job. All jobs are orchestrated by a build chain job which triggers the other jobs, runs integration tests, etc.

After the build chain completed successfully, I use GroovyPostbuildAction.createBadge() to add a badge to the builds that were used during the integration tests.

Then I created a promotion job, in which I can select the component and the build number to promote. It then checks if that specific build contains the badge that was previously added (i.e. all tests were successful) and does some action (deploy on production server, upload artifacts, ...).

In the promotion job, I also included mechanisms to implement multi-level promotion by using different badges, so that, for example, a release first has to be deployed on the testing servers before it may be deployed to production systems.

jglick@cloudbees.com (JIRA)

unread,
Nov 15, 2016, 9:36:01 AM11/15/16
to jenkinsc...@googlegroups.com

I am using multibranch pipelines, and would like to be able to have automated deployments through different environments, but only with human approval. Is there a recommended approach for achieving this?

input step generally, assuming only the last build to pass tests is eligible for approval. Otherwise there is no equivalent currently. No plans to use the Promoted Builds plugin as is; needs to be redesigned from scratch.

violas@intuilab.com (JIRA)

unread,
Nov 15, 2016, 10:15:02 AM11/15/16
to jenkinsc...@googlegroups.com

In my case, I have some jobs building/testing various applications for different platform. I created one job specific for promotion. This job has parameters that let user choose the build for each job he wants to promote. The job then copy the artifacts of each build, do some checking to be sure the selected build is a valid one to be promoted and then publish the artifacts. This jobs also archive the artifacts as its own, so I can find promoted artifacts easily.

The only thing I lost comparing to before with the Promoted builds Plugin is the badge in the description of the promoted build that helps finding the last promoted build, but now I can find then in my promotion job, in which I have only the promoted artifacts.

o.v.nenashev@gmail.com (JIRA)

unread,
Dec 20, 2016, 3:27:03 AM12/20/16
to jenkinsc...@googlegroups.com
Oleg Nenashev assigned an issue to Unassigned
 
Change By: Oleg Nenashev
Assignee: Oleg Nenashev

o.v.nenashev@gmail.com (JIRA)

unread,
Dec 20, 2016, 3:36:02 AM12/20/16
to jenkinsc...@googlegroups.com
Oleg Nenashev commented on New Feature JENKINS-36089
 
Re: Pipeline support for Promoted Builds Plugin

I still disagree with Jesse Glick regarding the Promoted Builds feasibility for Pipeline. Honestly conditional promotion of releases is a PITA in Pipeline now, but I agree that the Promoted builds plugin ideally needs some redesign before adding the Pipeline support.

My vision:

  • Get rid of the built-in promotion job, use standalone one (of any time, not just Freestyle-alike)
  • In standalone jobs introduce the "Environment" entity to indicate where the build results are being deployed
  • Get rid of the access to workspaces, allow promoting only artifacts (with some flexibility via build steps, of-course)
  • Use Fingerprinting to trace artifacts between original and promotion jobs
  • Retain the promotion functionality for cross-referencing builds and for triggering promotions from jobs
  • Actually retain almost all existing UIs...

That's how I see it, the implementation would be more or less close to what is implemented in AppVeyor.

Bad news is that I won't have personal time to work on it in middle-term. Any contributions will be appreciated

jglick@cloudbees.com (JIRA)

unread,
Dec 20, 2016, 11:39:02 AM12/20/16
to jenkinsc...@googlegroups.com

Get rid of the built-in promotion job, use standalone one

Yes this is the key. The number of the upstream build being “promoted” should simply be passed as a build parameter to the downstream build. Of course you can do this today without the UI.

I do not think other concepts of the existing plugin are particularly problematic (though, as mentioned, certain common use cases are done more simply in a single Pipeline job).

smithgcovert@gmail.com (JIRA)

unread,
Jan 9, 2017, 9:36:10 AM1/9/17
to jenkinsc...@googlegroups.com

Today, I am using "Keep this build forever" as a "poor man's" promotion button.

I have a pipeline script that runs every 15 minutes, and searches for builds that have been marked "Keep Forever" and then passes their information / build number to the next build in the promotion.

Its not as flexible as the Promoted Builds plugin was originally, but its working well.

My only wish is that I could trigger that build off new builds being marked "Keep Forever" instead of requiring that it run polling every 15 minutes.

This is just FYI – as I thought it might be interesting to someone else who finds this jira issue.

jeffrey.ang@us.daiwacm.com (JIRA)

unread,
Jan 27, 2017, 12:13:11 PM1/27/17
to jenkinsc...@googlegroups.com
quickbrownfox updated an issue
 
Change By: quickbrownfox

This enhancement request is for the Promoted Builds plugin to support Jenkins' 2.X style Pipelines.

Pipelines are the new paradigm that Jenkins 2.X is promoting heavily -- with its ability to define the build process in code, automatic build discovery, and great integration with repository systems for automatic build / testing of pull requests.


There are many places within the new Pipeline style where the Promoted Plugin could be used to great effect:
- builds could dynamically https://issues.jenkins-ci.org/browse/JENKINS-36089# promote and save artifacts, pushing them into other pipeline jobs
- Users could manually promote pipeline builds that have been through some kind of QA process
- Permalinks provided by the Promoted Builds plugin could be used in pipeline builds


Basically, the same vast number of use cases that the Promoted Build Plugin provides today could be taken advantage of by builds defined via the Pipeline API and Jenkinsfile build definitions.

Reference here for the API changes that are required for a plugin to be available in a Pipeline build:
https://github.com/jenkinsci/pipeline-plugin/blob/master/COMPATIBILITY.md

Original reference bug:
https://issues.jenkins-ci.org/browse/JENKINS-35376

steven.9.armstrong@gmail.com (JIRA)

unread,
Jan 29, 2017, 1:22:02 PM1/29/17
to jenkinsc...@googlegroups.com
steven armstrong commented on New Feature JENKINS-36089
 
Re: Pipeline support for Promoted Builds Plugin

To give a use case, we have common ci builds for the following:
networking ci build (governs acl rules)
load balancing ci build (governs load balancer config)
platform image ci build (governs centos/ windows images)
developer specific ci build (code compilation).

Each of these ci builds have an associated promoted build parameter which when they are successful increments without teams having to manually update dependencies when a check-ins occur to networking, platform or load balancing versions.

These ci builds then roll up into a "package build" which generates the build artifact used at deployment time (we build a manifest json file using the artifacts linked to the latest promoted build parameter versions). This is generated every developer check-in and deployment pipelines are then invoked by the new manifest release candidate.
This manifest json then consumes the latest networking, load balancing, platform image using promoted build parameters to pull all the necessary artifacts from each ci build and arrange them as the 1st deployment step in the deployment pipeline.

Currently not having the promoted build parameter plugin integrated with the pipeline job type means we cant currently make the package build, currently a freestyle job, the 1st step of the jenkinsfile pipeline job and then trigger other jenkinsfile pipeline jobs from it using promotion stars, as it traverses environments.

With the promoted build parameter missing from the pipeline job we are missing the ability to:

1) Associate the promoted build parameters with the pipeline job type as part of the jenkinsfile meaning the pipeline jenkinsfile cant be stored in the code repository and used as the trigger event for the quality assurance pipeline.
2) Trigger a pipeline based on a state change to an artifact repository or another build. Currently we use thoughtworks go for pipelines, which allows us to push the manifest file to artifactory and then poll the repository for changes. The urltrigger plugin could provide this feature as well but it also hasnt been converted to the pipeline job type either meaning we currently have no way to trigger pipelines based on an artifact change. An updated promoted build number could be used to act as that trigger rather than the external artifact.
3) We will want to have a jenkinsfile for each pipeline stage so qa, integration, perf and prod by having association between multiple jenkinsfiles is necessary, the promoted build plugin could potentially do this link, so each pipeline promotes a package (promoted build number) that is allowed to be deployed to the next environment by users. This is particularly useful in continuous delivery when in production environments teams can select a promoted build number to deploy the latest build or trigger a previous promoted build number to roll back by selecting it from the dropdown list.

The above points are currently blocking us from moving to jenkins 2.x for pipelines from thoughtworks go and probably preventing many others too.

chengpingru@gmail.com (JIRA)

unread,
Mar 22, 2018, 10:34:03 PM3/22/18
to jenkinsc...@googlegroups.com

Recently we are trying Jenkins 2.X with declarative pipeline. If Promotions plug-in can support it, that would be great!

This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)
Atlassian logo

lsbwant@gmail.com (JIRA)

unread,
Apr 11, 2018, 1:17:10 AM4/11/18
to jenkinsc...@googlegroups.com
lsb want commented on Epic JENKINS-36089

Jesse Glick

 

Only if you put input inside node, which generally you should not. An input paused at top level can sit there for days without occupying any resources on Jenkins (not even a native Thread).

The workspace of next stage will be reallocated if I put directive input into a standalone stage and set up agent as none, but my next stage need use the same workspace with the previous stage. this is my difficulty, otherwise, I need set up a pipeline global agent, then directive input will occupy executor.

juan.barisich@gmail.com (JIRA)

unread,
Sep 3, 2018, 2:47:03 PM9/3/18
to jenkinsc...@googlegroups.com

Most of the Jenkins users (and users of another platforms like gitlab) are using the pipeline way because its simplicity and flexibility. If this plugin does not support pipelines, it becomes useless. Thanks for your understanding and support.

This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

o.v.nenashev@gmail.com (JIRA)

unread,
Sep 3, 2018, 3:09:21 PM9/3/18
to jenkinsc...@googlegroups.com

I totally agree with you, but I am not ready to implement it during my spare time anytime soon. It is a big chunk of work requiring several weekends to be done properly. I cannot dedicate time due to the personal stuff and other commitments in the Jenkins project. I'd guess the same applies to Devin Nusbaum who is a new maintainer.

I have provided my vision here: https://issues.jenkins-ci.org/browse/JENKINS-36089?focusedCommentId=280959&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-280959 . If somebody is interested, please feel free to contribute. It is not that difficult to implement this functionality even for those ones who are not experts in Jenkins development, just requires time and some basic Java knowledge. If you do not have personal time, ask your employers to dedicate some time. It may be possible in many cases. This is how open-source works sometimes, fortunately or not

 

 

o.v.nenashev@gmail.com (JIRA)

unread,
Sep 3, 2018, 3:14:03 PM9/3/18
to jenkinsc...@googlegroups.com

But, again, I am happy to provide reviews and help with delivering changes if somebody proposes a pull request

 

o.v.nenashev@gmail.com (JIRA)

unread,
Dec 8, 2018, 10:31:05 AM12/8/18
to jenkinsc...@googlegroups.com

Hello, I I have added this project to the list of Google Summer of Code 2019 project ideas: https://docs.google.com/document/d/1UYi0jIYsKHE5IGS84B5W0XBoeMyF4yY_exu-21O99U8/edit?usp=sharing , so it may be implemented by one of the students this year.

We are also looking for mentors who would be interested in this project. If you would like to join the project, please let me know

 

o.v.nenashev@gmail.com (JIRA)

unread,
Dec 30, 2018, 7:06:19 AM12/30/18
to jenkinsc...@googlegroups.com
Oleg Nenashev updated an issue
 
Jenkins / Epic JENKINS-36089
Change By: Oleg Nenashev
Labels: gsoc-2019-project-idea pipeline

o.v.nenashev@gmail.com (JIRA)

unread,
May 13, 2019, 5:34:07 AM5/13/19
to jenkinsc...@googlegroups.com
Oleg Nenashev updated an issue
Change By: Oleg Nenashev
Labels: gsoc-2019-project-idea gsoc2019-artifact-promotion-in- pipeline pipeline

ironchamp@gmail.com (JIRA)

unread,
Oct 25, 2019, 1:31:05 PM10/25/19
to jenkinsc...@googlegroups.com
Alan Champion commented on Epic JENKINS-36089
 
Re: Pipeline support for Promoted Builds Plugin

I am not sure if this is the feature I am after but essentially, it is a cross between CopyArtifact and what this might offer.

Currently, I am publishing in htmlreports for a non-pipeline job and I want to promote that to the parent DSL pipeline.

I tried CopyArtifact but it cannot see the htmlreports directory (i.e. linked from lastSuccessfulBuild).

Perhaps by forcing a shared WORKSPACE is the simplest solution but generally, I wanted it to work without changing the legacy build jobs and cannot rely on the same WORKSPACE being used.

Any tips for an easily maintained solution welcome.

This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

o.v.nenashev@gmail.com (JIRA)

unread,
Dec 16, 2019, 7:26:37 AM12/16/19
to jenkinsc...@googlegroups.com
Oleg Nenashev started work on Epic JENKINS-36089
 
Change By: Oleg Nenashev
Status: Open In Progress

o.v.nenashev@gmail.com (JIRA)

unread,
Dec 16, 2019, 7:26:38 AM12/16/19
to jenkinsc...@googlegroups.com

o.v.nenashev@gmail.com (JIRA)

unread,
Dec 16, 2019, 7:26:59 AM12/16/19
to jenkinsc...@googlegroups.com
Oleg Nenashev commented on Epic JENKINS-36089
 
Re: Pipeline support for Promoted Builds Plugin

I am marking it as "In progress", because I am working on some bits as my Christmas hack

o.v.nenashev@gmail.com (JIRA)

unread,
Apr 10, 2020, 6:08:07 PM4/10/20
to jenkinsc...@googlegroups.com
Oleg Nenashev updated an issue
Change By: Oleg Nenashev
Labels: gsoc-2019-project-idea gsoc2019-artifact-promotion-in-pipeline pipeline roadmap
This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages