Re: How to refer to an object in a shared library?

2020-09-17 Thread Ven H
Hi, Even if you are importing the namespace, use the full name for the class and try. For example, com.company.deployment.common.MyClass obj = new com.company.deployment.common.MyClass() Regards, Venkatesh On Fri, Sep 18, 2020 at 12:56 AM zil...@gmail.com wrote: > I use this extensibly in my

Groovy output from println statements, where is it?

2020-09-17 Thread Kenny Cason
I have some groovy code in a Jenkins pipeline that populates a dropdown chooser, *sometimes*. The code calls a shell script which outputs a JSON string which is then parsed by Groovy to return just a list found in the JSON. When I run it standalone outside of Jenkins it *always *produces the c

Unable to trigger Jenkins job using API Token command-line curl

2020-09-17 Thread Mohtashim S
My requirement is to trigger(build) a jenkins job using command-line which I will invoke using ansible. I'm following the instructions on this stackoverflow link . I followed the

Re: Suppressing certain builds

2020-09-17 Thread jeremy mordkoff
node { stage("checkout") { checkout scm result = sh (script: "git log -1 | grep bump", returnStatus: true) if (result == 0) { println("CI bump commit...skipping build") currentBuild.result = 'NOT_BUILT' # can I just return here ? exit 0? } } stage("build") {

Re: how to build on branch creation but not build on other scm event/commit?

2020-09-17 Thread Tim Black
Thanks Jeremy. Our developers already have control of their projects' branches' Jenkinsfiles so they can define whatever triggers/schedule they want. If I were going to hack this, I'd probably prefer to do the opposite of what you're recommending. Since git scanning is a wheel already invented

Re: Suppressing certain builds

2020-09-17 Thread zil...@gmail.com
Can you give a simple example? On Thursday, September 17, 2020 at 12:17:36 PM UTC-4 jeremy@riftio.com wrote: > I use scripted pipelines > > I would like certain builds to abort early. (1) if it is just a branch > creation event, (2) if the commit message is "bump" and (3) if the only > cha

Re: How to refer to an object in a shared library?

2020-09-17 Thread zil...@gmail.com
I use this extensibly in my pipelines https://www.jenkins.io/doc/book/pipeline/shared-libraries/ For example, I can have the following files /path/src/com/company/deployment/script1.groovy /path/src/com/company/deployment/script2.groovy Now I want both scripts to refer to a common object in /path

How to refer to an object in a shared library?

2020-09-17 Thread zil...@gmail.com
I use this extensibly in my pipelines https://www.jenkins.io/doc/book/pipeline/shared-libraries/ For example, I can have the following files /path/src/com/company/deployment/script1.groovy /path/src/com/company/deployment/script2.groovy Now I want both scripts to refer to a common object in /path

FIXED: Re: How to restore Safe HTML for Parameter Separator descriptions?

2020-09-17 Thread G Dameron
JENKINS-56277 was opened in Feb 2019 and fixed in version 1.3 (released August 2020). Many thanks to Piotr PaczyƄski. On Wednesday, January 16, 2019 at 12:42:55 PM UTC-7 G Dameron wrote: > Back in 1.596, I used Safe HTML for all build paramet

Suppressing certain builds

2020-09-17 Thread jeremy mordkoff
I use scripted pipelines I would like certain builds to abort early. (1) if it is just a branch creation event, (2) if the commit message is "bump" and (3) if the only change was in certain submodules. I think I know all the pieces to make this work -- I can write a tool that could determine

Re: how to build on branch creation but not build on other scm event/commit?

2020-09-17 Thread jeremy mordkoff
You could leave the Automatic triggering suppressed and write a tool to scan your GIT repo looking for new branches and trigger the build via an API call when a new branch is found. Sounds like you might need such a tool anyway so that developers could schedule builds. On Thursday, September 1