2
votes

I have different Jenkins pipeline jobs for Build, Deploy, QA Automation tests and Release to Production. I am building a Jenkins Delivery pipeline to run these jobs in a single pipeline. The pipeline should be like once QA certification is done, a build job should be triggered for approval and then Release preparation jobs can run further. Flow should be like:

  • Run the Build, Junit and SonarQube Analysis in single pipeline job using Jenkinsfile on Develop branch
  • Run the QA Deployment job after the above job is stable or success.
  • Run the QA Automation job on QA environment
  • Here, I want a promote a build for approval before start the Release process on Release branch
  • Once the promotion is approved, release versioning/tagging job is triggered
  • Run the Production release job.

All above jobs need to be shown in a View (pipeline).

I am using Jenkins View "Delivery Pipeline View for Jenkins Pipelines" from the Delivery Pipeline plugin. But, the issue is that promote build is a FreeStyle job and it is not listed under this View type.

Actually, I tried the end to end pipeline with Jenkinsfile using multibranch pipeline, but due to the limitation https://issues.jenkins-ci.org/browse/JENKINS-36089 I have to switch back to normal Pipeline.

Please share your thoughts.

1

1 Answers

0
votes

You can achieve what you are trying to build without Jenkins pipelines and Jenkinsfiles if that is a viable option? In such case, define each of your steps in the pipeline (Build, QA, Production etc) as separate Jenkins freestyle jobs. Chain these together as downstream dependencies with the "trigger parameterized build on other projects" post-build action. You can then use the Delivery Pipeline plugin by creating a view of the type "Delivery Pipeline View" to visualize your whole pipeline. It supports showing manual triggers as well.

You can find examples of how to create such pipelines in the Delivery Pipeline plugin source code repository: https://github.com/Diabol/delivery-pipeline-plugin/blob/master/examples/. The demo.groovy creates a skeleton for the type of pipeline you are looking for using Jenkins JobDSL.

Unfortunately, the "Delivery Pipeline View for Jenkins Pipelines" do not support visualization of multiple Jenkins pipelines chained together, it currently just visualize one pipeline per component. The latest current release being Delivery Pipeline plugin 1.3.1.