In this lab you will create a new Multibranch Pipeline job from the Maven Pipeline Template provided by a Pipeline Template Catalog. And just by filling in a few parameters of a Pipeline template, you will quickly have a complete continuous integration pipeline for your application that meets the required standards of your organization.
simple-java-maven-app
repository, creating a Pipeline job for each branch where there is a marker file that matches cloudbees-ci.yml
(or in this case, just the main
branch). Click on the Scan Repository Log link in the left menu to see the results of the branch indexing scan. markerFile
(for details see Using a custom marker file with templates) with a value of cloudbees-ci.yml
in its template.yaml
configuration (excerpt below taken from the templates/maven/template.yaml
file you can find in your copy of the pipeline-template-catalog
repository in your workshop GitHub Organization):version: 1
type: pipeline-template
name: Maven Pipeline Template
templateType: MULTIBRANCH
description: Provides a pipeline template for maven builds.
parameters:
...
multibranch:
markerFile: cloudbees-ci.yml
branchSource:
github:
...
simple-java-maven-app
repository in the GitHub Organization you created for this workshop, click on the example.cloudbees-ci.yml
file, then click pencil icon to edit the file and then rename the file by deleting example.
from the beginning of the file name, leaving just cloudbees-ci.yml
. main
branch) button to commit the renamed cloudbees-ci.yml
to the main branch of your simple-java-maven-app
repository.The job will fail and that is expected. We will fix the error in a subsequent lab.
For instructor led workshops please return to the workshop slides