Creating a GitLab Pipeline Task
Creating a Task
Do not perform the operation on the master node.
- Create a pipeline. Go to the GitLab home page, click
in the upper left corner, and select New project/repository.Figure 1 Creating a GitLab project (1)
- On the Create new project page, click Create blank project. On the Create blank project page that is displayed, enter a project name, select the root user, and click Create project.Figure 2 Creating a GitLab project (2)
Figure 3 Creating a GitLab project (3)
- Open the created project, and choose Build > Pipeline editor in the navigation tree on the left. On the page that is displayed, click the Edit tab, copy the sample script to the pipeline editing box, modify the script based on your requirements, and click Commit changes.Figure 4 Editing the sample script
- For details about the gated check-in sample code, see Sample Code for GitLab 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 GitLab Pipeline Compilation Sample Code.
- For details about the test sample code, see Sample Code for GitLab Pipeline Compatibility Testing and Sample Code for GitLab Pipeline Java Performance Testing.
- For details about the virus scan sample code, see Sample Code for GitLab Pipeline Virus Scanning.
- In the navigation tree on the left, choose Build > Pipelines. In the upper right corner of the page that is displayed, click Run pipeline.
- Set the branch and run variables to run the pipeline. After the execution is successful, choose Build > Jobs in the navigation tree on the left to view the pipeline output.
- On the pipeline page, 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