CloudBees CI - Pipeline Policies
Create a Pipeline Policy
In this lab you will create a Pipeline Policy to ensure that all Pipeline jobs that run on your Team Master have a 30 minute global
Instructor led video of lab.
- Navigate to the top-level of your Team Master and click on Pipeline Policies in the left menu.
- Click on New Policy
- Fill out the Pipeline Policy parameters:
- Name: Timeout policy
- Action: Fail
- Click on Add Rule button:
- Select Pipeline Timeout
- Timeout: 30 MINUTES
- Click the Save button
- Navigate back to the master branch job for the microblog-frontend Mutlibranch project and click the Build Now link in the left menu.
- Navigate to the logs for that build and you will see that the build failed due to Validation Errors
- To fix this we will have to update the
Jenkinsfile of the VueJS template in your forked copy of the pipeline-template-catalog repository - remember, even though we are building the code in the microblog-frontend repository the
Jenkinsfile is actually coming from the VueJS template. Navigate to that
Jenkinsfile and the click the pencil icon to open it in the GitHub editor.
- In the GitHub editor, uncomment the
option and then click the Commit changes button to commit the updated
Jenkinsfile to your master branch.
- Next, to ensure that we are using the updated VueJS template, we will re-import the Pipeline Template Catalog you just updated. Navigate to the top-level of your Team Master and click on Pipeline Template Catalogs in the left menu and then click the workshopCatalog link.
- On the next screen, click the Run Catalog Import Now link.
- After the import is complete, navigate back to the master branch job for the microblog-frontend Mutlibranch project and click the Build Now link in the left menu. The build will complete successfully and the logs for that build will show that the Pipeline policy validated successfully.
For instructor led workshops please return to the workshop slides.
You may proceed to the next lab: Cross Team Collaboration or choose another lab on the Main Lab Page.