Reputation: 415
How to create build pipeline view in Jenkins using Jenkins CLI or through scripting? I would prefer CLI if possible.
Right now I create a Bunch of jobs including downstream. So would prefer a way to automate pipeline view.
Upvotes: 0
Views: 14771
Reputation: 181
Step 1: For creating a build pipeline, First create a set of jobs.
Step 2: Now create a build pipeline view and in the configure section add the first job that you want to run in the pipeline
Step 3:Now for every job, add a post build action, which can be modified many ways, for example manual trigger or automatic trigger on successful of the build.
step 4: Once all the downstream jobs are configured, just build the p1 job. and go to the new pipeline view that you have created.
Note: You won't see a pipeline untill first job is started. In this example, after p1 job is started you will start seeing a pipeline
Upvotes: 3
Reputation: 8194
You can use the Job DSL Plugin to define a Build Pipeline View and any jobs for the pipeline.
If you want to run the DSL from CLI, you can checkout the REST API Runner.
Upvotes: 0
Reputation: 1258
Use BUILD FLOW plugin, in which you can use simple DSL scripts.
By using this plugin you can build both pipeline & parallel jobs
Upvotes: 0