Setting Jenkins Job for Beginners - Part 5

Setting Jenkins Job - Understanding Build

In the last post we covered the Build Environment part where you can create the build name and delete workspace or send files over SSH. You can revisit the post here. Setting Jenkins Job - Understanding Build Environment

In this post, we will cover the Build section of the Jenkins job.

We will start with adding the build step.


In this section, you can execute any scripts, executed commands on shell or windows batch command, or you can trigger a parameterized job or trigger builds on other project. 

We will discuss following aspects here:
  • Execute windows batch command
  • Execute Shell
  • Trigger/call builds on other projects

Execute Windows Batch Command


You can run commands which you can run on your windows cmd. The variables can be called using "%%". You can add this build step only once under the Build section.

Execute Shell


Similar to Execute windows batch command, we can execute the commands on the Unix shell. The variables can be called using '$'. You can add this build step only once under the Build section.

Trigger/call builds on other projects


In the project to build, you can add the other Jenkins job. The above image is making the pipeline fail if this Jenkin job is failed. You can pass parameter to the Jenkin job triggered from main job using Predefined parameters.

We are concluding it here with the Build section. There are other build steps which can be used as per your usage.

In the next section, we will cover Post Build Action.

Comments