Re: Sourcing environment variables on node

2017-11-02 Thread Christoph Ruepprich
Thanks ichymuzzle. It worked with a minor change. So the problem is that each sh looses it's environment. Is there a way to set it globally? node ('remote-server') { sh (''' . /home/cmr/myenv echo "My Variables: $FOO $BAR" ''') } On Thursday, 2 November 2017 14:01:04

Sourcing environment variables on node

2017-11-02 Thread Christoph Ruepprich
Hi all, on a remote node I have a file that exports some variables: $ cat myenv export FOO=Hello export BAR=World My pipeline script tries to source that file, but the variables don't seem to stick: node ('remote-server') { sh ('. /home/cmr/myenv') echo "My Variables: ${env.FOO}

Re: Best way to develop pipeline groovy

2017-11-01 Thread Christoph Ruepprich
Beck wrote: > > > > On 31. Oct 2017, at 22:51, Christoph Ruepprich <cruep...@gmail.com > > wrote: > > > > This gets pretty tedious and time consuming. Is there a better way to > develop scripts without having to either develop them in the web UI or copy >

Re: Best way to develop pipeline groovy

2017-11-01 Thread Christoph Ruepprich
nd make small > modifications to the script that was used to test things out, then you can > incorporate those changes into your Jenkinsfile. > > Hope those things help > > Alex > > On Tue, Oct 31, 2017 at 2:51 PM Christoph Ruepprich <cruep...@gmail.com > &g

Best way to develop pipeline groovy

2017-10-31 Thread Christoph Ruepprich
I'm new to Jenkins and am learning how to write groovy scripts for pipelines. Right now I write my code in VS Code and copy & paste it into the Jenkins' project, save and build. This gets pretty tedious and time consuming. Is there a better way to develop scripts without having to either

Re: Newbie question: pipeline {} vs node {}

2017-10-31 Thread Christoph Ruepprich
he declarative framework and converting to a straight > groovy script. > > > On Tuesday, October 31, 2017 at 8:37:24 AM UTC-6, Christoph Ruepprich > wrote: >> >> Looking at some pipeline scripting examples, I see that there are two >> different ways to script

Newbie question: pipeline {} vs node {}

2017-10-31 Thread Christoph Ruepprich
Looking at some pipeline scripting examples, I see that there are two different ways to script a pipeline. One begins with pipeline {} the other with node {}. What is the difference between the two, and when would I use one or the other? thanks, C -- You received this message because you are