I have a Jenkins pipeline which is responsible for about 5 stages (build and several different tests). I'm migrating from Jenkins 1.XX (with no pipelines) to Jenkins 2 and I'd like to replicate my process as closely as possible. The pipeline job I have set up on J2 handles everything exactly the same except it's using a JenkinsFile. The only issue is that the pipeline plugin does not appear to support Promotion of particular builds like you can do with Freestyle Jobs. Has anyone found a way around this?
To do this, you can create a new job, adding a "Copy artifacts from another job" (available through Copy Artifact plugin") for each item you want to aggregate. To get a certain promotion, select "Use permalink" in the copy artifact step, then your promoted build should show up in the list of items to copy.
Here is how to setup the promotion on build job: You will need these plugins: Parameterized Trigger Plugin, Promoted Builds Plugin. You will also need to setup default Archive the Artifacts post-build action on this build job. Check mark Promote builds when. Define Name "Deploy to DEV"
Promotion pipelines are composed by a set of related CI jobs that are executed for each supported OpenStack release to test the content of a specific RDO repository.
Build Promotion allows you to change the status of a build, optionally moving or copying the build's artifacts and its dependencies to a target repository, and setting properties on the promoted artifacts.
Seems like Promoted Builds Plugin doesn't support pipelines yet. If you check the issue there is also some good pros and cons about supporting it for pipelines.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With