Jenkins Kata 2: Build Steps
Explore how to configure Jenkins build steps by adding and customizing shell scripts to automate tasks. Understand the role of exit codes in signaling job success or failure, enabling efficient continuous integration feedback and error handling in your workflows.
We'll cover the following...
We'll cover the following...
Jenkins jobs execute build steps. Build steps can be general-purpose scripts or custom steps designed for a specific purpose. This kata will show us how to configure the basic steps in a job.
Step 1: Add a build step
To execute a build step that writes the build number to a file.
- Click “Configure.”
- Click the “Build Steps” tab.
- Click “Add build step.”
- Click “Execute shell.”
- Enter the following code into the “Command” field:
- Click “Save.”
Commands
Command / Parameter | Description |
| This writes text to standard output. |
| This is the text to write out.
|
This script simply appends a new line, including the build number and the ...