How to modify Jenkins pipeline on the go.

Purushottam Sinha
2 min readNov 5, 2024

--

In certain circumstances during the deployment of our code, the alteration of the pipeline for a single runtime may be necessary. In such cases, the practice of hard-coding the changes may prove detrimental to the process. Fortunately, Jenkins has provided a solution that enables modifications for a specific instance of the pipeline build.

To make such modifications follow the process outlined below:

  1. Click on the icon located to the left of the Logout button.

2. Proceed to open the Replay window by clicking on the Replay option that is displayed in the Navigation Bar on the left-hand side of the screen.

3. The Jenkinsfile, which is attached to the repository, will be showcased as the main script. With it, you can proceed to replay the pipeline build with the modified code as required.

4. Next, modify the script as necessary. For example, you may consider commenting on one of the stages such as the Whitelist Check.

5. Finally, click on the Run button to execute the pipeline with the altered script. You can verify the new running instance by clicking on Open Blue Ocean.

--

--

No responses yet