Creating a Jenkins Pipeline Task
Creating a Task
Do not perform the operation on the master node.
- On the Jenkins home page, click New Item in the navigation tree on the left.Figure 1 Creating a task
- On the task creation page, enter a task name, select a pipeline option, and click OK to create a task.Figure 2 Creating a pipeline task
- Go to the newly created pipeline task. Click Configuration in the navigation tree on the left. On the configuration page that is displayed, configure the pipeline script based on the pipeline script example and click Save.
- For details about the gated check-in sample code, see Sample Code for Jenkins Pipeline Gated Check-in Scanning. To add more functions and features, see the sample code of other functions and features in gated check-in.
- For details about the compilation sample code, see Jenkins Pipeline Compilation Sample Code.
- For details about the test sample code, see Sample Code for Jenkins Pipeline Compatibility Testing and Sample Code for Jenkins Pipeline Java Performance Testing.
- For details about the virus scan sample code, see Sample Code for Jenkins Pipeline Virus Scanning.
- Click Build Now in the navigation tree on the left to execute the task.Figure 3 Executing a task
- After creation, you can view the task execution status. When the status becomes
, the task has been executed successfully. Once the execution is complete, you can view the report.
Parent topic: Creating a Pipeline Task