Re: Any way to construct a url to a particular file in the jenkins workspace?

2021-09-22 Thread David Karr
On Wed, Sep 22, 2021 at 8:16 AM 'Björn Pedersen' via Jenkins Users < jenkinsci-users@googlegroups.com> wrote: > > >> I'm not familiar with the archive process. If you could provide me some >> quick links for information, that would be useful. I'll also ask our >> internal ops team. >> >> > >

Re: Any way to construct a url to a particular file in the jenkins workspace?

2021-09-22 Thread David Karr
On Wed, Sep 22, 2021 at 7:29 AM 'Björn Pedersen' via Jenkins Users < jenkinsci-users@googlegroups.com> wrote: > > > db...@cloudbees.com schrieb am Mittwoch, 22. September 2021 um 14:54:48 > UTC+2: > >> On Mon, Sep 13, 2021 at 5:49 PM Jerome Godbout >> wrote: >> >>> Humm, that would be hard and

Re: Can vars scripts reference variables defined in a higher scope?

2021-09-16 Thread David Karr
I've managed to implement something that is effectively the same. I realized that I can define a class in "src" that is just a static data container and can be accessed from any of the "vars" scripts. On Thursday, September 16, 2021 at 1:21:10 PM UTC-7 David Kar

Can vars scripts reference variables defined in a higher scope?

2021-09-16 Thread David Karr
I work on a somewhat complicated build process using Jenkins scripted pipeline, where the Jenkinsfile is very small, but it imports a large shared library, sets some application-specific properties, and then calls a top-level function in the "vars" section of the shared library. The top-level

Re: Any way to construct a url to a particular file in the jenkins workspace?

2021-09-13 Thread David Karr
Björn >> >> davidmic...@gmail.com schrieb am Freitag, 10. September 2021 um 22:09:36 >> UTC+2: >> >>> I do notice that my build has a "BUILD_URL" var in the environment, so >>> that gives me the "prefix" of the url, but the url to th

Re: Any way to construct a url to a particular file in the jenkins workspace?

2021-09-10 Thread David Karr
the environment that can help me construct that part of the url. On Friday, September 10, 2021 at 9:22:16 AM UTC-7 David Karr wrote: > When a Jenkins build completes, I can navigate to "Workspaces" to manually > inspect files in the workspace. While I'm navigating that

Any way to construct a url to a particular file in the jenkins workspace?

2021-09-10 Thread David Karr
When a Jenkins build completes, I can navigate to "Workspaces" to manually inspect files in the workspace. While I'm navigating that tree, and viewing specific files, I can see that the current browser url goes directly to that point in the tree, and to the specific file I am viewing. Is there a

Re: how can I iterate a json with a list of objects in a pipeline?

2021-04-19 Thread David Karr
You're missing the most important value of what JsonSlurper (and similar tools) provides. There is no reason to iterate maps, and it's important to realize that there is no ordering guarantee of map values. If you want to reference the "issues" property, just reference "json.issues". You will

Re: where do I have to set the sonar-project.properties file to make sonar work in Jenkins?

2020-11-12 Thread David Karr
:26:43.796 INFO: Sensor VB.NET Properties [vbnet] >>>> 00:00:04.783 11:26:43.797 DEBUG: Project 'Test': Property missing: >>>> 'sonar.vbnet.analyzer.projectOutPaths'. No protobuf files will be loaded >>>> for this project. >>>> 00:00:04.783 11:26:43.797 DEBUG:

Re: where do I have to set the sonar-project.properties file to make sonar work in Jenkins?

2020-11-11 Thread David Karr
I have never seen the "-D" command-line option used with a space between the option and the provided value, and the documentation never shows that example. On Wed, Nov 11, 2020 at 1:13 PM jesus fernandez < jesusfernandez0...@gmail.com> wrote: > and this is the log: > ``` > *00:00:00.901*

Re: where do I have to set the sonar-project.properties file to make sonar work in Jenkins?

2020-11-10 Thread David Karr
I believe that the mistake that most people make with running the sonarqube scan from a CI build is TRYING to define a sonarqube properties file. It's best to simply provide all of the required options on the sonar-scanner command line, using "-D". On Tue, Nov 10, 2020 at 3:44 AM jesus fernandez

Re: How to get container logs in kubernetes if user has no admin access to execute kubectl commands

2020-10-29 Thread David Karr
In general, it would be pretty silly if anyone could get access to the internals of a pod if they didn't have the proper authentication. Is your enterprise using Jenkins to build the applications that you deploy to kubernetes? Are those builds using kubectl to do those deployments? If you

Re: Where is source for the "withSonarQubeEnv" and "waitForQualityGate" pipeline steps?

2020-08-12 Thread David Karr
narsource/scanner/jenkins/pipeline/WaitForQualityGateStep.java > is > probably what you are looking for. > > Richard. > > On Thu, 13 Aug 2020 at 11:27, David Karr > wrote: > >> I'm trying to troubleshoot a problem with our integration between Jenkins >> and our

Where is source for the "withSonarQubeEnv" and "waitForQualityGate" pipeline steps?

2020-08-12 Thread David Karr
I'm trying to troubleshoot a problem with our integration between Jenkins and our enterprise SonarQube instance. I need to see the source code for the "waitForQualityGate()" pipeline step. Is that available somewhere? We're using a SonarQube server definition that uses "http:", but the

Calling writeFile for every entry of a map requires somewhat ugly code

2020-07-18 Thread David Karr
I'm posting this mostly so people can find it. Perhaps it's already well-known, and perhaps I'm missing some simple thing that makes this easier to do, but I think not. In my Jenkinsfile, I need to iterate over a map created with Groovy, calling "writeFile" with the key as the file name, and

How to get graphical staging view of a particular build instance?

2020-04-23 Thread David Karr
In the classic view, when viewing a job with the list of recent builds on the left, the center area shows the "Stage View" that shows how long each stage of the most recent builds are taking. I often want to see this data for builds that are not currently showing in the staging view. I could

Re: Shared library function cannot call other shared library function in separate file if called function uses "writeFile"

2020-02-08 Thread David Karr
;vars" function that calls "writeFile", I get the seemingly generic error with no other information. If I instead call the inline function with contents identical to the "vars" function, it works fine. On Friday, February 7, 2020 at 12:51:42 PM UTC-8, David Karr wrote: > &g

Shared library function cannot call other shared library function in separate file if called function uses "writeFile"

2020-02-07 Thread David Karr
The statement I make in the subject doesn't make sense, but I don't know how else to describe it. I'm working on a set of builds using scripted pipelines. Our Jenkinsfiles are very short, all of the build logic is in the shared library. In the "main" shared library function, I'm trying to

Re: Jenkins job dsl- any way to dry run before affecting changes?

2019-12-30 Thread David Karr
It seems to me that the only reasonable way to "integration test" pipeline changes before deployment is simply to deploy the changes to a job that is not used for regular work, one that you can manually send events to, to make sure it does what it needs to do. This is sort of like a "canary

Re: Get stage name in pipeline

2019-08-25 Thread David Karr
On Fri, Aug 23, 2019 at 3:42 AM Sureshkumar Ramar < sureshkumar.ra...@gmail.com> wrote: > Hi, > i am using jenkins pipeline. i want to send the failed stage name to the > developer. is there a way to capture the failure stage in jenkins. it > should work in parallel stages also. > The basic idea

Difficult to softcode credential references in property scripts

2019-06-24 Thread David Karr
I'm working with someone who has defined a Jenkins job that does some sophisticated work to set up choice properties. Each property has a small script that computes the possible values. It attempts to get the values from the same git repository that the Jenkinsfile resides in.

Re: Can multibranch pipeline support user-selected branch?

2019-06-12 Thread David Karr
On Wed, Jun 12, 2019 at 12:15 PM Ivan Fernandez Calvo < kuisathave...@gmail.com> wrote: > I do not get your point, Multibranch pipeline creates a new job for each > branch that match with the criteria you specify, so you have a job for > every branch, I do not understand what do you mean with ’ I

Re: Can multibranch pipeline support user-selected branch?

2019-06-11 Thread David Karr
On Tue, Jun 11, 2019 at 1:47 PM Guy Knights wrote: > I've been looking into multibranch pipeline and I'm wondering, can it be > configured to support build parameters to specify which branches will be > built? > > I know the branch config can be setup with a regex to specify that certain >

How to have a scripted pipeline read POST data?

2019-06-10 Thread David Karr
I've worked on several scripted pipelines that read job parameters. I'm looking at writing one that takes POST data, from the BitBucket Webhook plugin. What do I have to do in a scripted pipeline to read POST data like this? -- You received this message because you are subscribed to the

Re: Opinions about aggressive reuse strategy for Jenkins pipelines

2019-04-19 Thread David Karr
problem. On Tuesday, April 9, 2019 at 9:37:32 AM UTC-7, David Karr wrote: > > I work for a very large organization, on a project with many teams, > working on many microservices, all of which were generated from a > home-grown application template system. Most of the Java-based > mi

Opinions about aggressive reuse strategy for Jenkins pipelines

2019-04-09 Thread David Karr
I work for a very large organization, on a project with many teams, working on many microservices, all of which were generated from a home-grown application template system. Most of the Java-based microservices have a very similar build process. In fact, most of the projects have an identical

Re: Pass the data thru variable using curl command

2019-01-22 Thread David Karr
I suggest you add "-v" to the curl command-line options and then print the "sresponse" variable. On Tue, Jan 22, 2019 at 11:15 AM N Panneerrselvam wrote: > Def sresponse = sh scripts: status, return srdout: true > > On Mon, Jan 21, 2019, 09:50 David Karr >>

Re: Pass the data thru variable using curl command

2019-01-22 Thread David Karr
e lines involved in making this call, then the answer is obvious. All you're doing is setting a string here with a command line to use. You're not actually executing this command. > Regards > Panneer > > > On Monday, January 21, 2019 at 9:50:19 AM UTC-7, David Karr wrote: >>

Re: Pass the data thru variable using curl command

2019-01-21 Thread David Karr
On Sun, Jan 20, 2019 at 8:55 PM panneerrselvam natarajan wrote: > Hi All, > > I am using Jenkins for API Testing in Pega Environment. I can send and > receive response thru PostMan and SOAPUI and working fine. > > But I want to automate using Jenkins Pipeline. > > Please do let me know, How do

Best way to say "never mind" in a pipeline script?

2018-12-21 Thread David Karr
First some background, although my actual question is likely pretty simple. I have a situation where there are two different jobs that could run for particular projects. I have a multibranch pipeline that runs for master and release branches, what I might call "target" branches,being the target

Re: Jenkins Pipeline code to run remote shell scripts

2018-09-17 Thread David Karr
On Mon, Sep 17, 2018 at 4:51 AM Arianrhod wrote: > Thanks David, I'm sure you're probably right but I've found so many > different versions of what the 'simple' answer is that I have no real idea > of the correct syntax for the command. Referencing credentials that are > already stored within

Re: Jenkins Pipeline code to run remote shell scripts

2018-09-15 Thread David Karr
On Fri, Sep 14, 2018 at 8:49 AM Arianrhod wrote: > Hi, I have to run two shell scripts on a remote server as part of a > pipeline job (scripted, not via the GUI). > > They're both run on the same remote server, but one has to run when the > first finishes, and they run as different users. There

How do you evaluate the risk of allowing a particular static method call in a pipeline?

2018-09-09 Thread David Karr
When I try to call a static method in a pipeline script that doesn't have an existing script approval, I get an exception, which requires a script approval. What exactly is the risk involved here? How does someone evaluate the risk of calling a particular static method? For instance, I

Why do I sometimes get impossible ClassNotFoundExceptions when running two instances of the same build job at once?

2018-08-16 Thread David Karr
Our Maven build run from Jenkins occasionally gets "impossible" errors from the Java compiler, saying that classes that must exist are not found (ClassNotFoundException). Rerunning the job always resolves it. I'm pretty sure this happens when more than one instance of the job is running at the

Re: How to make a plain pipeline (not multibranch) create a separate workspace for each instance?

2018-08-16 Thread David Karr
On Thursday, August 16, 2018 at 12:59:21 PM UTC-7, David Karr wrote: > > I've seen situations where Jenkins will create a separate workspace > directory for each instance of a job. I've seen other situations where it > does not. I think the difference is multibranch pipeli

How to make a plain pipeline (not multibranch) create a separate workspace for each instance?

2018-08-16 Thread David Karr
I've seen situations where Jenkins will create a separate workspace directory for each instance of a job. I've seen other situations where it does not. I think the difference is multibranch pipeline vs. plain pipeline. Is that what's going on here? I really need to figure out how to get a

Re: Serialization error moving @NonCPS method from pipeline script to shared library

2018-03-15 Thread David Karr
s-pipeline-shared-libraries-gradle-plugin/issues/17 > I added the necessary @NonCPS annotations above the methods in classes > located under src/, not in var/ (didn't work) > > > > > El lunes, 6 de febrero de 2017, 14:23:18 (UTC-3), David Karr escribió: >> >> I'm try

Re: Groovy code in Pipeline and CPS trouble

2017-12-30 Thread David Karr
On Thu, Dec 28, 2017 at 6:17 AM, Ramanathan Muthaiah wrote: > Hello All, > > I have tested the below snippet of code in myjenkinsurl/script and it works > fine. > > However, same code (embedded or loaded via external Groovy code) in Pipeline > workflow script fails, inspite

Re: Best way to get named parameter in a shared library function

2017-08-25 Thread David Karr
On Fri, Aug 25, 2017 at 12:59 PM, red 888 wrote: > I have this in my shared library in /vars/myLib.groovy: > > def call(Map args) { > > one = args.one > two = args.two > three = args.three > > somePlugin( > someParam: one, > otherParam:

Re: Method names for getters/setters in pipeline shared libraries

2017-08-25 Thread David Karr
You likely need to reference "myFunc.myDerp" instead. On Fri, Aug 25, 2017 at 10:33 AM, red 888 wrote: > Im not sure if this is a groovy thing or a jenkins shared library DSL thing > but I don't understand how this automatic getter setter stuff works. > > I have this

Re: How to pass parameters to Jenkins Pipeline?

2017-07-06 Thread David Karr
On Thu, Jul 6, 2017 at 10:23 AM, Kai wrote: > Hi, > > We are trying to setup a Jenkins pipeline and have a Deploy step to deploy a > specific version of the application. > > The pipeline job will be invoked programmatically by another system. > > Is there a way to pass in

Re: notifyCommit won't fire specific jobs, need help debugging

2017-06-30 Thread David Karr
d a single branch, not ALL of them. I've summarized these same details in https://issues.jenkins-ci.org/browse/JENKINS-45246 . > > > On Monday, June 26, 2017 at 1:51:21 PM UTC-4, David Karr wrote: >> >> For months now, I and the local Jenkins admins I work with, have been

notifyCommit won't fire specific jobs, need help debugging

2017-06-26 Thread David Karr
For months now, I and the local Jenkins admins I work with, have been struggling with a problem where my main jenkins job is not firing on a "notifyCommit" firing from a BitBucket instance. We actually were able to define another job in the same Jenkins instance, pointing to the same repo,

Re: repo auth problems in Jenkins v2.46 copied from working v2.19 instance

2017-06-20 Thread David Karr
On Monday, June 19, 2017 at 8:33:00 AM UTC-7, David Karr wrote: > > I have a working Jenkins v2.19 instance. I have a main pipeline job that > references a Jenkinsfile in a BitBucket repo, accessed through a ssh url. > The Jenkinsfile references a global shared library,

repo auth problems in Jenkins v2.46 copied from working v2.19 instance

2017-06-19 Thread David Karr
I have a working Jenkins v2.19 instance. I have a main pipeline job that references a Jenkinsfile in a BitBucket repo, accessed through a ssh url. The Jenkinsfile references a global shared library, also stored in BitBucket with a ssh url. I'm working with someone who's trying to upgrade me

Re: Request for simple pipeline example to do checkout, run shell script, email result

2017-04-27 Thread David Karr
On Thu, Apr 27, 2017 at 3:05 AM, David Aldrich wrote: > Hi > > > > Please can anyone point me to, or provide, a simple and complete pipeline > script example to do a checkout, run a shell script and email the result? > > > > I am using svn, but a git example would be

BitBucket Plugin for Jenkins doesn't fire release pipeline job likely because release pipeline script not in SCM, how to trick it?

2017-04-14 Thread David Karr
My enterprise uses BitBucket Server and Jenkins. For my project, I wrote a pipeline script that is fully parameterized, and can properly build PR branches, release branches, and the master branch. Several condition checks do different things depending on what the branch is. I store the

Re: How to call a function defined within my Jenkinsfile

2017-03-21 Thread David Karr
On Tue, Mar 21, 2017 at 10:02 AM, ishan jain wrote: > Probably i am being silly, but seriously i am not able to call a function > which i have defined in my Jenkinsfile from within a step. Here is a sample: > > def meta = "something" > > stage (build) { > >

Re: building multi module projects in jenkins

2017-03-10 Thread David Karr
On Fri, Mar 10, 2017 at 8:53 AM, paul b wrote: > I have several projects that are multi module projects that are like the > following > > Project1 > +-module1 > +-pom.xml > +-module2 > +-pom.xml > > Each project is configuration controlled in git as their own project > >

Re: Jenkins build says successful but no output is seen

2017-02-24 Thread David Karr
I'll say again, add braces around the body of the entire stage. Stage takes a closure. On Fri, Feb 24, 2017, 19:21 Sharan Basappa wrote: > David, > > I will remove everything and start with just pwd. I will update how it > goes. > Maybe it is not related but one thing

Re: Jenkins build says successful but no output is seen

2017-02-23 Thread David Karr
On Wed, Feb 22, 2017 at 9:36 AM, Sharan Basappa wrote: > folks, need some guidance here ... thanks > > On Tuesday, 21 February 2017 23:39:43 UTC+5:30, Sharan Basappa wrote: >> >> My Jenkins build job indicates success but none of the scripts I am >> executing seem to do

Re: Execute shell script on remote host using ssh - Jenkinsfile

2017-02-19 Thread David Karr
On Sat, Feb 18, 2017 at 9:10 AM, jequals5 wrote: > Hello all. First time poster, long time stalker. > I am trying to find an example of executing a shell script on a remote host > using ssh. There is the plugin for this but I want to convert that action in > to a

Re: Can't output clear text from secret text

2017-02-19 Thread David Karr
On Thu, Feb 16, 2017 at 7:45 AM, John Marks wrote: > I just wanted to test secret text, but the job always outputs "" when > I try to echo the bound variable from a shell script job. > > >

Re: Disable standard output from Jenkins pipeline:

2017-02-19 Thread David Karr
On Thu, Feb 16, 2017 at 8:23 AM, Geethalakshmi Ramachandran wrote: > A jenkins pipeline calls an API that returns metrics and prints it in the > console output with formatting. However, Jenkins pipeline prints standard > output for each command like

Re: Define parameters for a group of jobs

2017-02-13 Thread David Karr
On Monday, February 13, 2017 at 8:11:27 AM UTC-8, Richard Ginga wrote: > > Francesco, there are actually many ways to do this. > > 1. use Pipeline script or System groovy build step or post build - > "trigger parameterized builds on other projects" to pass in parameter x > > 2. with system

println in "call()" in "vars/xx.groovy" shows in console, but println in defed method in class in "vars/xx.groovy" is just ignored

2017-02-10 Thread David Karr
I'm seeing some odd behavior with "println" calls in shared library methods, and a perhaps related issue with printing a shared library object in a Jenkinsfile. I've been using https://jenkins.io/doc/book/pipeline/shared-libraries/ as my implementation guide. I've been working on evolving a

Re: Jenkins node selection

2017-02-07 Thread David Karr
On Tuesday, February 7, 2017 at 12:36:59 PM UTC-8, Tejinder Kaur Gill wrote: > > How can we specify the node on which Jenkins multibranch pipeline job will > run,by default it run on master nd creating space issue on master ,need to > configure on some slave . > I'm frankly not certain about

Re: Issue with pipeline

2017-02-07 Thread David Karr
On Tuesday, February 7, 2017 at 10:15:06 AM UTC-8, Sharan Basappa wrote: > > Hi All, > > I am having some trouble executing basic shell commands (highlighted in > red). I cant figure out the issue. Need some help. This is what I get: > > Branch indexing > > > git rev-parse --is-inside-work-tree #

Is there any way to get Jenkins to tell me about actual compile errors instead of just failing with an anonymous error?

2017-02-07 Thread David Karr
Today I've been iterating on changes in a shared library, and I find it very frustrating that trivial compile errors in the library source just result in "ErrorCollector" stacktraces, with no useful information. For instance, I had some iterations that failed because I was missing an import

Serialization error moving @NonCPS method from pipeline script to shared library

2017-02-06 Thread David Karr
I'm trying to move duplicated methods in several pipeline scripts to a shared library. My first attempt, moving an enum type, worked fine. My next test is moving a method annotated with "@NonCPS". I noticed in the doc about writing shared libraries

In a shared library, what is the "vars/foo.txt" file USED for?

2017-02-05 Thread David Karr
So I now have a handful of pipeline scripts all reusing some global methods, all of which I pasted into each script, so I've started to set up a shared library to avoid duplication. I'm using https://jenkins.io/doc/book/pipeline/shared-libraries/ as my implementation guide. My questions have

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 <davidmic...@gmail.com > > wrote: > > > > Wow, and the documentation page doesn't even MENTION this fact? I'm > reading it now, and there's tha

Re: Using pipeline shared library is failing with "I don't handle protocol 'git clone ssh'"

2017-02-02 Thread David Karr
On Thursday, February 2, 2017 at 9:15:57 AM UTC-8, David Karr wrote: > > In Jenkins 2.19.2, I now have three different pipeline jobs using a > variation of the same script components, including a bunch of methods that > I've pasted into each script. I'm storing each script in git,

Using pipeline shared library is failing with "I don't handle protocol 'git clone ssh'"

2017-02-02 Thread David Karr
In Jenkins 2.19.2, I now have three different pipeline jobs using a variation of the same script components, including a bunch of methods that I've pasted into each script. I'm storing each script in git, but I think it's now time to define a shared library so I can remove the duplicated

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: Pipeline: wildcard for branch name

2017-01-24 Thread David Karr
On Monday, January 23, 2017 at 9:37:01 AM UTC-8, Sharan Basappa wrote: > > Hi, > > I am trying to create pipeline script such that it only a certain branches > following a naming style are built. > However, pipeline bails out when I use the wildcard. > > The code snippet is below: > > stage

Re: [pipline] have jenkins to override default parameter's values

2017-01-19 Thread David Karr
The number of parameters is only a problem if they have to override most of the values. If most of the parameters can take their default values, then it's not that annoying. They could then define a parameterized pipeline job that calls your pipeline, so they can customize the behavior for their

Re: Docker Build & Publish using --force=true in Pipeline?

2017-01-19 Thread David Karr
The plugin just runs docker commands. If the version of docker you have installed on the box doesn't support a "--force" parameter, it will fail. I have no idea what the history is of that, but it seems likely this is the cause of your problem. On Tue, Jan 17, 2017 at 12:58 PM,

Re: Jenkins with a DB?

2017-01-10 Thread David Karr
On Tue, Jan 10, 2017 at 9:00 PM, Gauthami Thyagrajan wrote: > HI Veena, > > Even i am trying to do the same. Have you got any solution for this? > > If you got can u please let me know. > > Thanks, > Gauthami T > > On Monday, October 12, 2015 at 8:29:06 PM UTC+5:30,

Re: How to trigger Jenkins build with parameters from Gitlab webhook?

2017-01-09 Thread David Karr
I'm not sure if this matters, but did you define that parameter in the pipeline job? On Mon, Jan 9, 2017 at 3:02 AM, Mark Allison wrote: > I have GitLab Community Edition 8.15.2 successfully trigger pipeline > projects in Jenkins 2.32.1 using a webhook (but without any

Re: [Declarative Pipeline] params.xxx does not work for git

2017-01-04 Thread David Karr
On Tue, Jan 3, 2017 at 10:46 PM, Dan Tran wrote: > false alarm again, i need to double quote. Not sure if this is intended > > git url: "${params.gitUrl}", branch: "${params.branch}" That's a Groovy restriction. A single-quoted string is only a "string", but a

Re: [Pipeline] @NonCPS causes "sh" to hang with parallel steps

2017-01-04 Thread David Karr
In short, you can't execute "pipeline steps", and "sh" is a pipeline step, from a @NonCPS method. On Wed, Jan 4, 2017 at 3:40 AM, Jørgen Sølvernes Sandnes wrote: > Hi! > > I struggled for a long time trying to figure out why my parallel steps kept > hanging when

Re: What build variable will contain text like "commit notification ", "started by timer", or "started by user "?

2016-12-31 Thread David Karr
it will look like. I've at least added some debugging to print out these values when it comes in. I'll add more info when I have it. > > On Saturday, December 31, 2016 at 5:53:19 AM UTC+5:30, David Karr wrote: >> >> In the detail for a pipeline job, there are line

What build variable will contain text like "commit notification ", "started by timer", or "started by user "?

2016-12-30 Thread David Karr
In the detail for a pipeline job, there are lines like "commit notification ", "started by timer", or "started by user ". I'd like to get access to that text in the pipeline job, especially if it was the first one. I've looked through the list of variables provided in the context of the

Re: Condition in pipeline

2016-12-28 Thread David Karr
It might help to realize that a pipeline script is just Groovy code. If you need to make sure that something is only executed when the current time is between 1pm and 2pm, just get the current time, convert it to hour of day, and have an "if" block comparing that value against your constraint. You

Re: Jenkins pipeline build failing even though all steps/stages pass

2016-12-28 Thread David Karr
I'd say we would need to see all of the console output, even though you say it reports failure. On Tue, Dec 27, 2016 at 11:59 PM, Raj Sahae wrote: > Hi all, > > I have a pipeline that I consider to be pretty basic. Nothing complicated in > terms of the logic. Here is a gist >

Re: Jenkins pipeline with github organization folder, avoiding multiple checkouts

2016-12-23 Thread David Karr
On Thu, Dec 22, 2016 at 12:39 AM, Jordan Soet wrote: > I'm trying to set up Jenkins with the Github Organization Folder plugin but > I'm finding that it's checking out our entire repository twice, once in the > @script directory and once in the actual workspace directory.

Re: sshagent seems to cause serialization failure

2016-12-12 Thread David Karr
, December 12, 2016 at 4:08:02 PM UTC-8, David Karr wrote: > > In a Jenkinsfile, I'm trying to scp a zip file to a remote host, and ssh > some commands to unpack it when it gets there. > > I managed to add a "SSH username with private key" credential, and I can >

sshagent seems to cause serialization failure

2016-12-12 Thread David Karr
In a Jenkinsfile, I'm trying to scp a zip file to a remote host, and ssh some commands to unpack it when it gets there. I managed to add a "SSH username with private key" credential, and I can see it in the "Credentials" list. I'm referencing that uuid in my "sshagent" block. When I run the

Re: Techniques for managing an scp call to a remote box, with a specific principal

2016-12-11 Thread David Karr
either of these from a pipeline job. On Friday, December 9, 2016 at 11:57:00 PM UTC+1, David Karr wrote: > > This mostly isn't a Jenkins question, but I would think many people here > would have to deal with this kind of situation. > > I have a Jenkins pipeline job that pro

Techniques for managing an scp call to a remote box, with a specific principal

2016-12-09 Thread David Karr
This mostly isn't a Jenkins question, but I would think many people here would have to deal with this kind of situation. I have a Jenkins pipeline job that produces a javadoc jar (among other products). I'm going to need to deploy that content into a directory tree on a remote box (using some

Re: Parsing XML with Pipeline script

2016-12-01 Thread David Karr
The default security restrictions are very tight. There are many things you can't do that would severely restrict any reasonable scripting approach. If you control the scripts you run, there's little point to not removing restrictions for the methods you need to call. On Thu, Dec 1, 2016 at 8:26

Why isn't there a "Managed File Reference" parameter?

2016-11-25 Thread David Karr
I really don't like how I have to provide the Maven "settings.xml" file to my build job. I know I can override the default GUID value, but the whole mechanism just seems odd. What I would LIKE to see is exactly how a "Credential Parameter" works. In the job configuration, I just specify the

Re: How to generate "credentialsId" for stash notifier using principal and password

2016-11-25 Thread David Karr
separately. On Friday, November 25, 2016 at 1:10:39 PM UTC-8, David Karr wrote: > > I'm using Bitbucket server and Jenkins. > > I've defined a pipeline job that will be spawned from bitbucket when > commits are pushed to a branch, either from the main webhook or a pull > request no

How to generate "credentialsId" for stash notifier using principal and password

2016-11-25 Thread David Karr
I'm using Bitbucket server and Jenkins. I've defined a pipeline job that will be spawned from bitbucket when commits are pushed to a branch, either from the main webhook or a pull request notification. The pipeline job has to use the stash notifier plugin to notify bitbucket/stash of the

Difference between "echo" and "println" in Jenkinsfile, and clarification of "pipeline steps"

2016-11-18 Thread David Karr
I see in the "Pipeline Steps" there is "echo". I don't see "println". When I execute a Jenkinsfile with a "println" statement, I see "[Pipeline] echo" printed before the output line, as if "println" is just a synonym for "echo". If I change the statement to use "echo" instead, it appears to

Re: Confused about unexpected path through Jenkinsfile

2016-11-17 Thread David Karr
On Thursday, November 17, 2016 at 2:13:40 PM UTC-8, David Karr wrote: > > > On Thursday, November 17, 2016 at 12:39:26 PM UTC-8, Daniel Beck wrote: >> >> >> > On 17.11.2016, at 17:19, David Karr <davidmic...@gmail.com> wrote: >> > >> > What

Re: Confused about unexpected path through Jenkinsfile

2016-11-17 Thread David Karr
On Thursday, November 17, 2016 at 12:39:26 PM UTC-8, Daniel Beck wrote: > > > > On 17.11.2016, at 17:19, David Karr <davidmic...@gmail.com > > wrote: > > > > What I am unable to find any information on is what exactly a "pipeline > step&quo

Re: Confused about unexpected path through Jenkinsfile

2016-11-17 Thread David Karr
On Wednesday, November 16, 2016 at 7:45:39 PM UTC-8, Daniel Beck wrote: > > > > On 16.11.2016, at 22:20, David Karr <davidmic...@gmail.com > > wrote: > > > > I've determined that this behavior is caused by the "@NonCPS" > annotation. > >

Re: Confused about unexpected path through Jenkinsfile

2016-11-16 Thread David Karr
On Wednesday, November 16, 2016 at 9:43:39 AM UTC-8, David Karr wrote: > > Using Jenkins 2.19.2 on Linux. > > I'm perplexed by the behavior of my Jenkinsfile, or at least what it's > reporting to me. I had it basically working, but then I added some simple > additional li

Confused about unexpected path through Jenkinsfile

2016-11-16 Thread David Karr
Using Jenkins 2.19.2 on Linux. I'm perplexed by the behavior of my Jenkinsfile, or at least what it's reporting to me. I had it basically working, but then I added some simple additional lines to gather some additional information, and now it somehow just stops executing the script at some

Re: How to emit XML in Jenkinsfile, and documentation on all Jenkinsfile restrictions?

2016-11-15 Thread David Karr
On Tuesday, November 15, 2016 at 12:32:44 PM UTC-8, Daniel Beck wrote: > > > > On 15.11.2016, at 17:29, David Karr <davidmic...@gmail.com > > wrote: > > > > I also need better understanding of the overall restrictions in a > Jenkinsfile, and perhaps WHY tho

Re: Trouble using MarkupBuilder DSL within Pipeline DSL

2016-11-15 Thread David Karr
On Tuesday, November 15, 2016 at 9:24:48 AM UTC-8, David Karr wrote: > > In my Jenkinsfile, I'm trying to use MarkupBuilder to construct a simple > XML message. I first discovered that there are default security > restrictions preventing the use of this class, which I was able

Re: Trouble using MarkupBuilder DSL within Pipeline DSL

2016-11-15 Thread David Karr
On Tuesday, November 15, 2016 at 9:24:48 AM UTC-8, David Karr wrote: > > In my Jenkinsfile, I'm trying to use MarkupBuilder to construct a simple > XML message. I first discovered that there are default security > restrictions preventing the use of this class, which I was able

Trouble using MarkupBuilder DSL within Pipeline DSL

2016-11-15 Thread David Karr
In my Jenkinsfile, I'm trying to use MarkupBuilder to construct a simple XML message. I first discovered that there are default security restrictions preventing the use of this class, which I was able to override. Next, I'm seeing errors that make it seem like the "methodMissing" calls for XML

How to emit XML in Jenkinsfile, and documentation on all Jenkinsfile restrictions?

2016-11-15 Thread David Karr
I'm stepping through implementing required features for our build in a Pipeline job. I've been hitting restrictions on what I can do with Groovy in a Jenkinsfile. Right now, I can't figure out how to just emit valid XML. When I try to use MarkupBuilder, it tells me that I can't use "new

What does "Use Gradle Wrapper" do in Jenkins Gradle plugin?

2016-01-17 Thread David Karr
If I have a Gradle build that uses the Gradle Wrapper, I'm assuming that if I have Jenkins using the Jenkins Gradle plugin and the "Use Gradle Wrapper" checkbox is set for the job, then Jenkins will just execute the Gradle Wrapper script stored in the project. Is this correct? What exactly are

High level difference between workflow plugin and dsl plugin?

2015-02-12 Thread David Karr
As part of a high-level presentation on Groovy that I'm giving to my organization, I was looking for a short statement that explains the difference between the workflow plugin and the dsl plugin, and the relationships they have with each other. Could someone give me a short statement covering

Re: Weird rendering of Save and Apply buttons on at least the Global Security page

2015-01-15 Thread David Karr
On Thursday, January 15, 2015 at 12:47:45 PM UTC-8, David Karr wrote: Jenkins ver. 1.596 on Windows 7. I don't know how much of a general issue this is, but I'm trying to display the Global Security page in both Chrome and Firefox, and I'm seeing really weird rendering of the page, mostly