[Swarm Plugin] Set `Environment variables` in `Node Properties`

83 views
Skip to first unread message

Patrick Jonathan Cadeliña

unread,
Sep 3, 2015, 4:29:44 AM9/3/15
to Jenkins Users
I would like to set environment variables in node properties (Jenkins > Nodes > Configure) and I'm doing this via puppet. This puppet module's `jenkins::slave.pp` configures the swarm plugin. However, there doesn't seem to be an option to do this when I look at the docs (Available Options). In particular, I'm expecting an option similiar to something like:

--environmentVariables 'key1:value1, key2:value2, ...'

Is there a way to do this?

Victor Martinez

unread,
Sep 3, 2015, 6:18:14 AM9/3/15
to Jenkins Users
I'm afraid that Jenkins puppet module doesn't support that functionality AFAIK. You can use Chef instead:


# Create a slave with a full environment
jenkins_jnlp_slave
'integration' do
  description
'Runs the high-level integration suite'
  remote_fs  
'/home/jenkins'
  labels      
['integration', 'rails', 'ruby']
  environment
(
   
RAILS_ENV: 'test',
   
GCC:       '1_000_000_000',
 
)
end
Reply all
Reply to author
Forward
0 new messages