Prerequisites :
Build jenkins online service, install gitee plug-in, registration code cloud account, create project (you can use the project to name), install Git
step:
- Log in to jenkins, code cloud
- New management credentials
- New Item (it is recommended to use the name of the item to name)
- Specific task configuration
- Build verification
1. Log in to Jenkins and Code Cloud
Note: Gitee must make sure that there are codes that need to be pulled above
2. Create new management credentials
Jenkins Homepage—Settings—Manage Credentials—Global Credentials
Click to add credentials
Enter Gitee account, password ID can be filled in arbitrarily, the description box can be written according to the project
Type item must be selected
3. Create a new item (it is recommended to name the item)
Jenkins Homepage—Item—New
You can also enter an existing Item and create a new item
Enter the project name, generally use the project name to name, then select the pipeline, confirm
4. Specific task configuration
Jenkins homepage—corresponding item—configuration—pipeline—clone address on gitee—generate pipeline script
#Go to gitee clone code address
Configured on Jenkins
Copy script
#Here is the configuration build script, note that Jenkins supports the construction of projects written in any language
Paste the link of the code to be built and the ssh command to be executed, it is recommended to add ls -l every time to build to verify whether it is successful, and save the application
5. Build verification
Enter the task, click Build Now, if it is successful, it will display green, you can verify the success in the Build History
Click the task, enter the task page, select the console output, you can see the detailed log of the build, if the build fails, you can view the failure reason in the log:
The above is the process of Jenkins software construction.