Frage

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 !!

War es hilfreich?

Lösung

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.

Andere Tipps

Apart from using the full path for wget, you could in one the PATH directories setup a symbolic link to wget.

Whatever PATH directory suits your needs. Perhaps /usr/local/bin (I think this exists in Solaris but it's been a while).

ln -s /opt/swe/bin/wget /usr/local/bin/wget

You need to setup the Alias for the user that is used to run Jenkins, not for your user

But what do you do for built-in shell commands like this csh one?

% which unsetenv
unsetenv: shell built-in command.

In Jenkins log file I get:

/var/lib/jenkins/workspace/blah@tmp/durable-7c938f97/script.sh: line 2: unsetenv: command not found
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top