Re: Working pipeline has stopped working...

2017-12-01 Thread Andreas Tscharner
On 29.11.2017 16:37, Peter Berghold wrote: the only error I'm seeing is this: [sendRPMS] touch: cannot touch '/data/staging/repos/released@tmp/durable-e537873f/jenkins-log.txt what would cause this to happen? Looks like it is either a permission problem, or your disk is out of space...

RE: How can I inject environment variables into my groovy class?

2017-12-01 Thread Daniel Butler
If you’re writing a groovy class that’s run from a library in the pipeline script then you’re not going to be able to use System.getEnv(). There’s a few approaches you can take that do work: - You can pass in the values you need as parameters to the methods/constructors you’re using. - In the pi

Restricting pipeline stage to single executor?

2017-12-01 Thread nk
I have a pipeline stage that does the following: * login to ECR (via groovy script in pipeline library) * docker build (via groovy script in pipeline library) * docker push to ECR (via groovy script in pipeline library) The problem I'm seeing is that any of these steps can run on a different exec

Trigger Specific Jenkins Job on Github Push to specific Directory

2017-12-01 Thread Rahul Kumar
I have several Jenkins Job running which Deploy's code to application server. These jobs run automatically whenever there is Commit in Github repository configured through Jenkins Plugin in Github and webhook. Jenkins is running on a Windows system. We have several applications in the repositor

Re: Restricting pipeline stage to single executor?

2017-12-01 Thread Slide
Do you have a node() {} around your stage? On Fri, Dec 1, 2017 at 8:40 AM nk wrote: > I have a pipeline stage that does the following: > > * login to ECR (via groovy script in pipeline library) > * docker build (via groovy script in pipeline library) > * docker push to ECR (via groovy script in

Re: Trigger Specific Jenkins Job on Github Push to specific Directory

2017-12-01 Thread Victor Martinez
What about using the Git - Additional behaviours - Polling ignores with commtits in certains paths? I used

Re: Environmental values from a Groovy Pipeline.

2017-12-01 Thread Peter Berghold
sounds like that was what bit me. I'm seeing bizarre behavior all over the place that now makes sense given what you said about node {} On Fri, Dec 1, 2017 at 1:19 AM 'Björn Pedersen' via Jenkins Users < jenkinsci-users@googlegroups.com> wrote: > Hi, > > it depends on where in your code you are

Define a class inside a groovy pipeline?

2017-12-01 Thread Peter Berghold
So I was playing around and tried something. Here's a class I defined: class MyClass implements Serializable { MyClass() { } def bark(){ sh 'echo WOOF!' } } and so I instantiate it def mc = new MyClass() and I access my method mc.bark() and I get hudson.remoting.ProxyExceptio

Env Inject failure "Couldn't find the right download for WINDOWS and i386 combination"

2017-12-01 Thread Steve K
Hello, Has anyone else been plagued with these fatal errors recently? Environment Inject bombs at the beginning of jobs running on i386 based OS's. In the stack dump, the message "Couldn't find the right download for WINDOWS and i386 combination" is seen. My Windows Jenkins server is v 2.46.2. I

RE: Define a class inside a groovy pipeline?

2017-12-01 Thread Daniel Butler
This is my preferred as it’s nice and explicit: class MyClass implements Serializable {  def ctx   MyClass(ctx) { this.ctx=ctx   }   def bark(){      ctx.sh 'echo WOOF!'  } } You’d then construct it: def mc = new MyClass(this) If you remove the class definition so you end up with a gr

Re: Env Inject failure "Couldn't find the right download for WINDOWS and i386 combination"

2017-12-01 Thread Devin Nusbaum
I suspect the error is being thrown by the JDK installer tool and is unrelated to EnvInject. Do you have a full stack trace, and are you using a JDK tool in your build configured with the “Install from java.sun.com ” method to install JDK 9? if so, it looks like Oracle has

Re: Define a class inside a groovy pipeline?

2017-12-01 Thread Peter Berghold
going to give it a shot Daniel. Thank! On Fri, Dec 1, 2017 at 1:56 PM Daniel Butler wrote: > This is my preferred as it’s nice and explicit: > > class MyClass implements Serializable { > > > > def ctx > > > > MyClass(ctx) { > > this.ctx=ctx > > } > > > > def bark(){ > > ctx.sh

Re: Define a class inside a groovy pipeline?

2017-12-01 Thread Peter Berghold
Yep! That's the ticket. Thannks again Daniel! On Fri, Dec 1, 2017 at 2:06 PM Peter Berghold wrote: > going to give it a shot Daniel. Thank! > > On Fri, Dec 1, 2017 at 1:56 PM Daniel Butler > wrote: > >> This is my preferred as it’s nice and explicit: >> >> class MyClass implements Serializa