jenkinsci / docker-swarm-plugin

Jenkins plugin which allows to add a Docker Swarm as a cloud agent provider
https://plugins.jenkins.io/docker-swarm/
MIT License
55 stars 47 forks source link

Appending Environment Variables #84

Open jkao97 opened 4 years ago

jkao97 commented 4 years ago

Is there a way to append environment variables via Docker Agent Template? I've tried, for example, PATH=$PATH:abc/xyz but that seems to be an issue as the agent is starting up.

shailesh-vaidya commented 4 years ago

I am also facing same issue. I have npm installed in my container. Job was working fine when I use image with Docker plugin . When I try to use Docker Swarm plugin it gives error as npm: command not found

I tried to provide PATH="/root/.nvm/versions/node/v12.13.0/bin:/opt/rh/sclo-git212/root/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin" through Docker Agent templates configuration but then it does not start container itself.

Sherpard commented 3 years ago

I'm facing the same Issue here, I'm looking forward to be able to specify the tool location, so Jenkins use the pre-installed tools instead of providing the auto-installable version