Re: Jenkins2 pipeline - Global methods in shared-library fails when invoked

2017-02-02 Thread David Karr
On Thursday, February 2, 2017 at 2:13:36 PM UTC-8, Daniel Beck wrote: > > > > On 02.02.2017, at 17:27, David Karr > wrote: > > > > Wow, and the documentation page doesn't even MENTION this fact? I'm > reading it now, and there's that underscore, completely without any

Re: Jenkins2 pipeline - Global methods in shared-library fails when invoked

2017-02-02 Thread Daniel Beck
> On 02.02.2017, at 17:27, David Karr wrote: > > Wow, and the documentation page doesn't even MENTION this fact? I'm reading > it now, and there's that underscore, completely without any statement like > YES, THIS REALLY NEEDS TO BE HERE. Seriously? Could you

Re: Jenkins2 pipeline - Global methods in shared-library fails when invoked

2017-02-02 Thread David Karr
On Thursday, February 2, 2017 at 3:30:05 AM UTC-8, R Tyler Croy wrote: > > (replies inline) > > On Thu, 02 Feb 2017, Tor Christian Solev?gseide wrote: > > > I was finally able to solve this myself. The problem was how I > referenced > > the shared library. Apparently, I need to add the

Re: Jenkins2 pipeline - Global methods in shared-library fails when invoked

2017-02-02 Thread R. Tyler Croy
(replies inline) On Thu, 02 Feb 2017, Tor Christian Solev?gseide wrote: > I was finally able to solve this myself. The problem was how I referenced > the shared library. Apparently, I need to add the underscore character to > the end if my @Library annotation like this: >

Re: Jenkins2 pipeline - Global methods in shared-library fails when invoked

2017-02-02 Thread Tor Christian Solevågseide
I was finally able to solve this myself. The problem was how I referenced the shared library. Apparently, I need to add the underscore character to the end if my @Library annotation like this: @Library('customized-portal-lib') _ Also, I must make sure to not import my global *acme *variable.

Jenkins2 pipeline - Global methods in shared-library fails when invoked

2017-01-20 Thread Tor Christian Solevågseide
As documented in https://jenkins.io/doc/book/pipeline/shared-libraries/, I've created the file vars/acme.groovy in a library project checked into our SVN. def setName(value) { this.name = value; } def getName() { return this.name; } def caution(message) { echo "Hello, ${this.name}!