Setting Jenkins Job for Beginners - Part 4

Setting Jenkins Job - Understanding Build Environment

In the last section, we covered the Source Code Management. If you want to go through again here is the link. Setting Jenkins Job - Understanding SCM

In this post we will cover the details about the Build Environment.

Delete Workspace before build starts

This covers mostly setting up the build environment, like deleting the workspace before starting the builds. We can add the pattern of the files to be deleted.

Provide Configuration Files


In this section, you can manage any external files and the target on which you want to run. These files type is added by your Administrator.

Send files or execute commands over SSH before/after build starts/runs


This is very useful when you want to send files over SSH. The files details, the remote directory and the execute command is mentioned. You can specify the server over which the files transfer is required. You can send files or execute command either before the builds starts or after the build execution is completed. 

You can abort the build if it is stuck and add timestamp in the build console logs by checking the respective checkbox.

Create a formatted version number


You can specify the format of the build name. You can add the build number, build version and any prefix to the build name which get generated with the new build. With this section, you can restrict the number of builds generated in a day, a week, a month, or a year.

It also allows multiple other features like injecting any environment variables/password to the build process, or adding SSH agent or set Jenkins user build variables or set the Ant version as well.

This concludes the Build Environment section. 

In the next section, we will look into the Build section, where you can call multiple other Jenkins job, execute commands etc. 

Comments