Sunday, September 4, 2022

[SOLVED] wget command not found in jenkins but runs Ok from unix

Issue

I put this PATH=$PATH:/bin:/opt/swe/bin on jenkins and wget command works fine but when I remove this or commented out, it doesn't work and generated the following error:

/var/jenkins/workspace/ORANGE_HOST_ATT/ORANGE_HOST_ATT.sh: line 119: wget: command not found

I am using solaris 10 machine for build and when I "type wget" in unix it says wget is an alias for /opt/swe/bin/wget. How can I set this wget command so that I don't have to use PATH=$PATH:/bin:/opt/swe/bin in each and every jenkins configuration.

Thanks for any help !!


Solution

You can configure environment variables for master in $JENKINS_URL/configure or for a slave in $JENKINS_URL/computer/SLAVENAME/configure. Check the box "Environment variables" and fill in key-value pairs.



Answered By - sti
Answer Checked By - Dawn Plyler (WPSolving Volunteer)