Article Overview:
This article will cover how you can achieve the following:
Fix the jq: not found
error during Jenkins setup and run a pipeline script successfully.
Problem Statement:
While setting up Jenkins, the error jq: not found
was encountered, causing issues in executing the pipeline.
Solution:
-
Download and Install jq:
- Visit the jq Download Page (link) and download the jq executable for your system. For Windows (AMD64), select the jq 1.7.1 or any latest executable.
- Rename the downloaded file from
jq-windows-amd64
tojq
.
- Place the
jq
file in the Git Bash repository directory, typically:C:\Program Files\Git\usr\bin
.
-
Restart Jenkins:
- Open Command Prompt as Administrator.
- Navigate to the Jenkins directory:
cd C:\tools\Jenkins
- Run the command to restart Jenkins:
jenkins.exe restart
-
Pipeline Execution:
- Once Jenkins is restarted and the pipeline script is updated, run the pipeline. The error should be resolved, and the script should trigger the goal as expected.
- Once Jenkins is restarted and the pipeline script is updated, run the pipeline. The error should be resolved, and the script should trigger the goal as expected.
Examples:
-
Scenario: Encountered
jq: not found
error during Jenkins setup. - Solution: Installed jq in the Git Bash directory and restarted Jenkins. Updated the pipeline script, resulting in successful execution.
Comments
0 comments
Please sign in to leave a comment.