Best Practices for Pipeline Global Function Args (Maps vs Closures)

2016-09-19 Thread Kenneth Baltrinic
Trying to get my head around what is the best way to implement some custom pipeline DLS commands using global functions . I am looking at the examples given under Defining a more structured DSL

Job Parameters No Longer Displayed for Queued Builds?

2015-07-29 Thread Kenneth Baltrinic
Greetings, We recently upgraded our Jenkins infrastructure from v 1.552 to 1.609.1. For the most part everything went smoothly. Kudos to the Jenkins team for that. One issue that has presented itself however is this: Previously, when multiple instances of a job are queued, waiting to run,

[workflow plugin] CPS groovy member declaration bug in intended behavior?

2015-02-08 Thread Kenneth Baltrinic
I have the following script in by global cps library. Cookbook.groovy: package chef Throwable exception = null boolean validate() { validated = false try { sh 'validate' validated = true } catch (Throwable ex) { exception = ex } return (boolean)val

[workflow plugin] Access current "build" instance from within script?

2015-02-05 Thread Kenneth Baltrinic
I am just reposting with a new subject since I did not notice the [workflow plugin] convention previously. Hoping this will get the right peoples eyes on the problem. On Wednesday, February 4, 2015 at 2:59:02 PM UTC-5, Kenneth Baltrinic wrote: > > I feel like I have read how to d

Re: Access current "build" instance from within Workflow Script?

2015-02-05 Thread Kenneth Baltrinic
Wednesday, February 4, 2015 at 3:01:17 PM UTC-5, slide wrote: > > Doesn't workflow support using Mailer directly? I thought there was a way > to use Mailer in the workflow. > > On Wed Feb 04 2015 at 12:59:05 PM Kenneth Baltrinic > wrote: > >> I feel like I have read

Access current "build" instance from within Workflow Script?

2015-02-04 Thread Kenneth Baltrinic
I feel like I have read how to do this somewhere already but now that I need it I can't find it. I am trying to duplication the behavior of the mailer within a workflow script. Namely if the build failed send an e-mail. If it succeed but the previous build failed, send a different email. In

Re: 500 Error invoking git-hook with Workflow plugin?

2015-02-03 Thread Kenneth Baltrinic
ks are broken until all workflow job have been run once since the restart. On Tuesday, February 3, 2015 at 10:03:50 AM UTC-5, Kenneth Baltrinic wrote: > > This is with Jenkins v 1.598 and Git plugin v 2.3.4. When I invoke the > https://jenkins-01.mydomain.com/git/notifyCommit url with

Re: Using git hook with Workflow Plugin with 'computed' repository url?

2015-02-03 Thread Kenneth Baltrinic
? On Tuesday, February 3, 2015 at 12:04:01 PM UTC-5, Kenneth Baltrinic wrote: > > We are using a function in our cps global library to perform our git > fetch. This function looks something like: > > def getFromStash(stashProject, stashRepo) { > checkout changelog: tru

Using git hook with Workflow Plugin with 'computed' repository url?

2015-02-03 Thread Kenneth Baltrinic
We are using a function in our cps global library to perform our git fetch. This function looks something like: def getFromStash(stashProject, stashRepo) { checkout changelog: true, poll: true, scm: [ $class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmodu

Re: 500 Error invoking git-hook with Workflow plugin?

2015-02-03 Thread Kenneth Baltrinic
I still do not know the root cause of this, however, deleting and recreating all of the workflow projects on the server solved the problem. Fortunately it was a new server with just three jobs. On Tuesday, February 3, 2015 at 10:03:50 AM UTC-5, Kenneth Baltrinic wrote: > > This is with J

500 Error invoking git-hook with Workflow plugin?

2015-02-03 Thread Kenneth Baltrinic
This is with Jenkins v 1.598 and Git plugin v 2.3.4. When I invoke the https://jenkins-01.mydomain.com/git/notifyCommit url with an appropriate ?url argument, either via get or post, I am getting a 500 error with the following stack trace. Yesterday I was able to "successfully" invoke this ur

Re: Automating Jenkins Deployments with Chef

2015-01-27 Thread Kenneth Baltrinic
g an xml template as the solution. In the latter case, I have not go there yet as there does seem to be hope of getting the API to work. (fingers crossed). --Ken On Monday, January 12, 2015 at 7:46:06 AM UTC-5, Kenneth Baltrinic wrote: > > I am working on creating a chef cookbook

Create UserPrivateKeySource Credential via Groovy?

2015-01-27 Thread Kenneth Baltrinic
Its me again--still trying to configure Jenkins via Chef. In this case I have extracted from the opscode Jenkins cookbook their script for creating ssh credentials and have attempted to modify it to create a credential from a UserPrivateKeySource instead of the DirectEntryPrivateKeySource that

Automating Jenkins Deployments with Chef

2015-01-12 Thread Kenneth Baltrinic
I am working on creating a chef cookbook to automate our Jenkins infrastructure. I am using the opscode Jenkins cookbook as my starting point but it only has a few basic resources. I can see I am going to need use the cookbook's jenkins_script resource to configure Jenkins via groovy. That w

How to configure Maven Installation via Groovy

2015-01-08 Thread Kenneth Baltrinic
I am trying to build a chef recipe to deploy/manage our Jenkins instances. Things are going reasonably well but the ops-code Jenkin cookbook only provides some basic configuration recipes. It does give you a resource by which to run groovy scripts though and with that and the help of a few blo

Re: Groovy collection.find() returning boolean in Workflow scripts?!

2015-01-06 Thread Kenneth Baltrinic
alse'), and this is plain wrong. Yes, I would file a bug. > Either this should work, or 'find' shouldn't be part of CPS. > > Best, > Thomas > > On Tuesday, January 6, 2015 2:10:15 AM UTC+1, Kenneth Baltrinic wrote: >> >> I am trying to do a very simple

Groovy collection.find() returning boolean in Workflow scripts?!

2015-01-05 Thread Kenneth Baltrinic
I am trying to do a very simple file parse operation within a Jenkins workflow script and getting some very bizarre results. This is with the workflow 1.1 set of plugins and Jenkins 1.596. To demonstrate the issue I created a new workflow job with the following script: *def str="1:one|

Re: Grape support in Worflow Plugin and JAR support in cps-global-lib?

2014-12-22 Thread Kenneth Baltrinic
eir own plugins. So, if no such request exists > yet, just file a new issue against `workflow-plugin` on that site. > > For reference: > https://wiki.jenkins-ci.org/display/JENKINS/How+to+report+an+issue#Howtoreportanissue-Beforerequestinganimprovementorfeature > > >

Grape support in Worflow Plugin and JAR support in cps-global-lib?

2014-12-20 Thread Kenneth Baltrinic
I am not sure if this is the right place to put feature requests but I have two closely related ones. The first is to implement support for grape in the workflow plug-in so that external groovy libraries like http-builder can be @grab-ed. Perhaps implementing grape support would obviate the ne

Re: Failed to serialize org.jenkinsci.plugins.workflow.actions.ErrorAction when declaring classes in csp-global-lib

2014-12-20 Thread Kenneth Baltrinic
Kahsuke, The fast turnaround on the fix is much appreciated. Jesse, Thanks for pursuing this even further. I sat this aside to work on some other aspects of the project and oddly enough, just before checking back in on this thread this evening, I ran smack into the method not available problem

Re: fatal: repository 'http://jenkins:8080/jenkins/workflowLibs.git/' not found

2014-12-17 Thread Kenneth Baltrinic
I am slaying other dragons right now but will circle back and investigate the possibility at some point. Good tip though. Thanks. On Monday, December 15, 2014 9:55:01 AM UTC-5, Mark Waite wrote: > > > > On Mon, Dec 15, 2014 at 7:48 AM, Kenneth Baltrinic > wrote: >> >&g

Failed to serialize org.jenkinsci.plugins.workflow.actions.ErrorAction when declaring classes in csp-global-lib

2014-12-15 Thread Kenneth Baltrinic
I have a basic workflow script that is performing some validation on a chef cookbook before publishing it.Most of the script code is in the csp-global-lib library because I am ultimately going to be validating a lot of cookbooks. my workflow-lib repo looks like this: src +- chef +- Co

Re: fatal: repository 'http://jenkins:8080/jenkins/workflowLibs.git/' not found

2014-12-15 Thread Kenneth Baltrinic
me such. Anyway the initial issue is resolved. I'll look into the empty-repo business later. On Friday, December 12, 2014 2:08:51 PM UTC-5, Kenneth Baltrinic wrote: > > I feel I am missing something obvious here. I have a test bed Jenkins > server v 1.592 with workflow 1.0 plug

Re: fatal: repository 'http://jenkins:8080/jenkins/workflowLibs.git/' not found

2014-12-15 Thread Kenneth Baltrinic
Is there anyone out there successfully using the Global Shared Library? On Friday, December 12, 2014 2:08:51 PM UTC-5, Kenneth Baltrinic wrote: > > I feel I am missing something obvious here. I have a test bed Jenkins > server v 1.592 with workflow 1.0 plugins installed, this inc

fatal: repository 'http://jenkins:8080/jenkins/workflowLibs.git/' not found

2014-12-12 Thread Kenneth Baltrinic
I feel I am missing something obvious here. I have a test bed Jenkins server v 1.592 with workflow 1.0 plugins installed, this includes the Workflow: Global Shared Library for CPS workflow plugin. All the workflow plugins are installed and enabled. Given that, attempting to do *git clone htt

Re: Best way to re-configure Jobs on-the-fly

2014-12-03 Thread Kenneth Baltrinic
I want to thank everyone for their input. At this time we have decided to pursue the workflow plug-in and its "load" step as the best way forward. Given that we are dealing with trying to configure complex build flows, the workflow plugins other features should prove useful well beyond the sc

Re: Best way to re-configure Jobs on-the-fly

2014-12-02 Thread Kenneth Baltrinic
onnolly wrote: > > Your effort might be best placed helping us beef up the (stub) > > travis.yaml parser to one that is more useable. > > > > On Tuesday, December 2, 2014, James Nord > > <mailto:te...@teilo.net >> wrote: > > > > Hi > &g

Best way to re-configure Jobs on-the-fly

2014-12-02 Thread Kenneth Baltrinic
I have been tasked to look at how we can set up a self service CI system for a large development shop, much along the lines of how travis CI works. There are big differences between what we need and what Travis CI provides but the basic idea of having a yaml file within the repository itself s