Which class does the method libraryResource() come from???

2017-04-26 Thread TInaTinaTian L
I know that Jenkinsfile pipeline DSL can resolve libraryResource() magically without explicitly providing any context (pardon my poor understanding of the pipeline DSL). But if I want to use libraryResource() as a regular groovy class, how do I use it??? Is it a static method? Which class does

How to compile pipeline steps as regular groovy file???

2017-04-26 Thread TInaTinaTian L
When invoked from Jenkinsfile, pipeline steps work fine and all. But when I want to compile a library with pipeline steps, compilation fails. > > package com.company; > > def read(fileName) { > return libraryResource(fileName) > } > > return this > > How to compile the above code as regular .gr

How to properly mixin libraryResource() pipeline task???

2017-04-26 Thread TInaTinaTian L
Hello, package com.mycompany; > import org.jenkinsci.plugins.workflow.libs.*; > > this.metaClass.mixin(ResourceStep) > def read(fileName) { > return libraryResource(fileName) > } > > return this > > I have the above LibraryResource.groovy file that basically just delegates to the libraryResourc

Re: What's the point of updating Jenkins UpdateCenter on fresh installation???

2016-12-02 Thread TInaTinaTian L
Thank you. On Friday, 2 December 2016 01:08:40 UTC-5, Baptiste Mathus wrote: > > Because that file always changes. It's like 'apt-get update'. You want to > run it to see an up-to-date list of plugins. > > Cheers > > Le 1 déc. 2016 10:51 PM, "TInaTinaTian

What's the point of updating Jenkins UpdateCenter on fresh installation???

2016-12-01 Thread TInaTinaTian L
Hello, I came across this script that updates jenkins UpdateCenter from command line: https://gist.github.com/jedi4ever/898114 > # Get the update center ourself > > $ wget -O default.json http://updates.jenkins-ci.org/update-center.json > > # Now push it to the update URL > > curl -X POST -H "A