My First Jenkins Python Unittest Pipeline
Overview
- Start Jenkins Server
- Create new Jenkins Job
- Run Job and View Build Output
- Convert Job to Pipeline
- Run Pipeline and View Build Output
Part 1 - Start Jenkins Server
- Execute the commands below to start the Jenkins server
start chrome http://localhost:8080/
start jenkins start
Part 2 - Create New Job
- Name project
- Select
Freestyle Project
Source Control Management
- From the source control management section, select
Git
- Paste the URL to your your repository
- Set the
Branches to build
field to have the following value:*/master
Build
- From the
Build
section, selectadd build step
- In the
command
field, enter the text below to ensure python runs all the unittests in the project upon building.python -m unittest discover -s ./src/test/ -p '*_test.py'