Using StaplerRequest to configure a plugin?

2018-03-06 Thread Guy Matz
Hi!  Does anyone know how to automate the configuration of a plugin using a
StaplerRequest object?  I'm trying to configure scm-sync-configuration with:

import net.sf.json.JSONObject
import org.kohsuke.stapler.StaplerRequest
import hudson.plugins.scm_sync_configuration.ScmSyncConfigurationPlugin

def params = [
noUserCommitMessage: false,
displayStatus: true,
scm:
'hudson.plugins.scm_sync_configuration.scms.ScmSyncGitSCM',
gitRepositoryUrl: 'g...@github.com:GroupM-mPlatform/ci.git',
commitMessagePattern: '[message]',
manualSynchronizationIncludes: 'asdfasdf'
]

def JSONObject formData = [ params ] as JSONObject

scm = new ScmSyncConfigurationPlugin().getInstance()
println("SCMs? ${scm.getScms()}")

StaplerRequest req = [
  getParameter: { name ->
// println(params[name])
params[name]
  }
] as org.kohsuke.stapler.StaplerRequest

scm.configure(req, formData)

It seems to almost work a little - uncommenting "println(params[name])"
tells me that it's getting processed a bit - but then it bombs with:

java.lang.UnsupportedOperationException
at
org.codehaus.groovy.runtime.ConvertedMap.invokeCustom(ConvertedMap.java:52)
at
org.codehaus.groovy.runtime.ConversionHandler.invoke(ConversionHandler.java:124)
at com.sun.proxy.$Proxy51.getParameterValues(Unknown Source)
at
hudson.plugins.scm_sync_configuration.ScmSyncConfigurationPlugin.configure(ScmSyncConfigurationPlugin.java:218)
at
hudson.plugins.scm_sync_configuration.ScmSyncConfigurationPlugin$configure.call(Unknown
Source)

The source at line 218 of ScmSyncConfigurationPlugin is:
if(req.getParameterValues("manualSynchronizationIncludes") != null){
...
}

Any thoughts out there?  :-(

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CABnTgtXd7uT69Qyhg1Qdtw1G5WAyqTeO5y61wfOQwFy%2Bo8dp9Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: how to return a failure from scriptler ?

2017-07-16 Thread Guy Matz
So I think a false return from scriptler is supposed to fail the build.
 anyone know why this syntax does not work in scriptler  Better yet, does
anyone know what doe work?

Thanks!

On Thu, Jul 13, 2017 at 10:06 AM, Guy Matz <guym...@gmail.com> wrote:

> Hello!
> I'm trying to have a build fail when something goes wrong in scriptler,
> but I can't get this to work.  I'm trying something like this:
> doSomething() || return false
>
> This fails in scripler with:
>
> Execution of script [promoteBuild.groovy] failed - 
> org.codehaus.groovy.control.MultipleCompilationErrorsException: startup 
> failed:
> Script1.groovy: 51: unexpected token: return @ line 51, column 85.
>doSomething() || return fal
>
>
> Anyone know how to fail a build from scriptler?
>
>
> Thanks!
>
> Guy
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CABnTgtXfG3wrBDRvdOG8FXFM2-QKR80eHdVSUQb2QwXr4oH9-A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


how to return a failure from scriptler ?

2017-07-13 Thread Guy Matz
Hello!
I'm trying to have a build fail when something goes wrong in scriptler, but
I can't get this to work.  I'm trying something like this:
doSomething() || return false

This fails in scripler with:

Execution of script [promoteBuild.groovy] failed -
org.codehaus.groovy.control.MultipleCompilationErrorsException:
startup failed:
Script1.groovy: 51: unexpected token: return @ line 51, column 85.
   doSomething() || return fal


Anyone know how to fail a build from scriptler?


Thanks!

Guy

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CABnTgtVs1rN6Sv-RVuA6vHjTL5DcwMUTuyB2bHSiAyXcR1n8rQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Running a local Jenkins plugin repository?

2017-02-24 Thread Guy Matz
This look promising:
https://wiki.jenkins-ci.org/display/JENKINS/UpdateSites+Manager+plugin

On Tue, Dec 20, 2016 at 10:32 AM, Daniel Beck  wrote:

>
> > On 20.12.2016, at 15:18, Andrew Ducker  wrote:
> >
> > … security people aren't willing to open up arbitrary locations …
> >
> > … an internal Jenkins Plugin repository which could be given persmission
> to automatically pull the latest versions …
>
> This makes no sense at all to me. What am I missing here? There's only a
> handful of mirrors, and the full list is at http://mirrors.jenkins-ci.org/
> status.html
>
> You could try running https://github.com/yandex-qatools/juseppe for
> hosting your own update site. Couple with a script that scrapes
> http://updates.jenkins-ci.org/latest/ should do it.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/jenkinsci-users/95C54F62-3EB9-45D4-AE57-B57112BE9335%40beckweb.net.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CABnTgtXJ%2BaVqC67vt_XPoJE%3D-VUpnZotQLyE4t3SOhiozFwHvg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


writing a jenkins plugin using gradle: gradlew server --continuous

2017-01-20 Thread Guy Matz
Hello!  I'm writing a jenkins plugin using the gradle JPI plugin
 and it's mostly great.  My
one problem is that changes to code do not cause the test jenkins server to
restart when gradle is run in continuous mode, i.e.:
./gradlew server --continuous

Does anyone know if this should work?
My build.gradle file: https://bitbucket.org/snippets/guymatz-jcrew/r4qob

Thanks!!

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CABnTgtWEf-5OsTu7r_ewdgT9Pamuqo%3D%3D4LiCXPUk5Npbr17ROQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: moving hotfixes along a parallel SDLC

2016-10-17 Thread Guy Matz
Yeah, sorry, I'm not actually suggesting bumping version #s is the way to
go . . .  I was hoping that maybe I was approaching the problem the wrong
way, and that someone had a better idea.  Thanks!!

On Mon, Oct 17, 2016 at 10:00 AM, 'Björn Pedersen' via Jenkins Users <
jenkinsci-users@googlegroups.com> wrote:

> Hi,
>
> It could be done, but think about using  a better versioning scheme.
> Using build numbers  from different jobs seems like a way to ask for
> trouble.
>
> Take a look at:
>   https://wiki.jenkins-ci.org/display/JENKINS/Version+Number+Plugin
>   https://wiki.jenkins-ci.org/display/JENKINS/semantic-versioning-plugin
>   https://wiki.jenkins-ci.org/display/JENKINS/Next+Build+Number+Plugin
>
> Björn
>
>
> Am Montag, 17. Oktober 2016 15:44:25 UTC+2 schrieb Guy Matz:
>>
>> Hello!  I need to be able to bump version numbers between two different
>> jobs, meaning that if job A runs, it should have a build number higher that
>> job B, and if job B runs, it should have a build # higher than job A . . .
>>  for example, job A may run 10 ten times and have a build number of 10.
>> Then job B will run and needs a build # of 11.  Job A wight run after than
>> and needs a build # of 12.
>>
>> Anyone know how to do this?  I *think* I need this because I am going to
>> have parallel tracks in my SDLC:  my usual develop -> master and a new
>> hotfix -> master SDLC being build by a separate job.  Do I need this?  Any
>> better ideas out there?  This seems like a common enough problem that it's
>> already been solved six ways to sunday . . .
>>
>> Thanks a lot,
>> Guy
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/jenkinsci-users/ff35676e-c537-493d-ab45-62a5ce42ca8f%40googlegroups.
> com
> <https://groups.google.com/d/msgid/jenkinsci-users/ff35676e-c537-493d-ab45-62a5ce42ca8f%40googlegroups.com?utm_medium=email_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CABnTgtWcTbM%2B4UKXifEmAo1TWDZr8jWny9W%2BgJ817iFpgvhg3A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


moving hotfixes along a parallel SDLC

2016-10-17 Thread Guy Matz
Hello!  I need to be able to bump version numbers between two different
jobs, meaning that if job A runs, it should have a build number higher that
job B, and if job B runs, it should have a build # higher than job A . . .
 for example, job A may run 10 ten times and have a build number of 10.
Then job B will run and needs a build # of 11.  Job A wight run after than
and needs a build # of 12.

Anyone know how to do this?  I *think* I need this because I am going to
have parallel tracks in my SDLC:  my usual develop -> master and a new
hotfix -> master SDLC being build by a separate job.  Do I need this?  Any
better ideas out there?  This seems like a common enough problem that it's
already been solved six ways to sunday . . .

Thanks a lot,
Guy

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CABnTgtW%2B5xy_TrSsT4-W8vu3wEeCYgAww_LhuTCXCXS9Bs8nWg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


scriptler - dependencies with grab/grape?

2016-09-28 Thread Guy Matz
Hello!  Does anyone know if it's possible to grab dependencies within a
scriptler script?  Any advice out there?

Thanks!!

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CABnTgtVqQOW8CrLdqyrDcoPUM5Xn3kzLFSTbGPr-d42dMrBXdw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins crashes when I try to add scriptler as a post-build action

2016-05-11 Thread Guy Matz
Right, but i can add a scriptler script as one of the tasks of the "Execute
a set of scripts" Post-Build . . .  from there is where I'm getting this
error

On Wed, May 11, 2016 at 12:55 AM, Cuong Tran <cuong.t...@gmail.com> wrote:

> I don't think you can add a scriptler script as a post-build action.  You
> must have done it via "Use Publisher from another project".
>
>
> On Tuesday, May 10, 2016 at 8:33:33 AM UTC-7, Guy Matz wrote:
>>
>> Hi!  I'm getting a Stack trace
>> <https://bitbucket.org/snippets/guymatz-jcrew/x6Xpo> when trying to a a
>> scriptler script as a post-build action.
>>
>> The section of stacktrace below - from the link above - looks important,
>> but my untrained eye may be missing something:
>>
>> Caused by: java.lang.IllegalArgumentException: Failed to instantiate
>> interface hudson.tasks.BuildStep from
>> {"backupJobName":"","builderId":"","scriptlerScriptId":"triggerYumReindex.groovy","propagateParams":true,"defineParams":{"parameters":{"name":"SIDECAR_ENV","value":"ci"}},"stapler-class":"org.jenkinsci.plugins.scriptler.builder.ScriptlerBuilder","$class":"org.jenkinsci.plugins.scriptler.builder.ScriptlerBuilder"}
>>
>> Any help would be greatly appreciated.
>>
>>
>> Regards,
>>
>> Guy
>>
>> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/d2c81a30-865a-40c8-87fb-99c071f21133%40googlegroups.com
> <https://groups.google.com/d/msgid/jenkinsci-users/d2c81a30-865a-40c8-87fb-99c071f21133%40googlegroups.com?utm_medium=email_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CABnTgtV5cKvOWjE9N_FhXyB6vZYd4D0iV4oX3aytwqvaTodWzQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Jenkins crashes when I try to add scriptler as a post-build action

2016-05-10 Thread Guy Matz
Hi!  I'm getting a Stack trace
 when trying to a a
scriptler script as a post-build action.

The section of stacktrace below - from the link above - looks important,
but my untrained eye may be missing something:

Caused by: java.lang.IllegalArgumentException: Failed to instantiate
interface hudson.tasks.BuildStep from
{"backupJobName":"","builderId":"","scriptlerScriptId":"triggerYumReindex.groovy","propagateParams":true,"defineParams":{"parameters":{"name":"SIDECAR_ENV","value":"ci"}},"stapler-class":"org.jenkinsci.plugins.scriptler.builder.ScriptlerBuilder","$class":"org.jenkinsci.plugins.scriptler.builder.ScriptlerBuilder"}

Any help would be greatly appreciated.


Regards,

Guy

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CABnTgtVYZ6j0JbSYDm2FREYM1C8O-NV1t6K7LhoTXrqu3V%2BNmA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Grab'ing libraries in jenkins script console

2016-04-22 Thread Guy Matz
Anyone know how to get this - or an equivalent - to work in jenkins script
console?

@Grab(group='org.codehaus.groovy.modules.http-builder',
module='http-builder', version='0.7.2')
import groovyx.net.http.*

Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CABnTgtU0gj%2B57r6epEGx1HJFUtOoLWHeahmnK95sdHony3UecA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Groovy groovy-starter.conf

2016-04-11 Thread Guy Matz
Hello!  Anyone know if Jenkins honors Groovy's groovy-starter.conf?  And
where it needs to be to get noticed?

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CABnTgtU1TPZC1C6Tj%2BFESndArgwocpTj26YfJqiZbAKjrfGM5A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Where can I drop a jar for it to be generally available to jenkins?

2016-04-08 Thread Guy Matz
Thanks for the reply!  I'm not actually looking to server content, if
that's what you're getting at.  I'm looking for a way to make a jar
available to groovy scripts run as a build step.

Thanks again!

On Fri, Apr 8, 2016 at 12:23 PM, Mark Waite <mark.earl.wa...@gmail.com>
wrote:

> The userContent directory on the Jenkins server serves content over http
> if that would help.
>
> On Fri, Apr 8, 2016 at 7:53 AM Guy Matz <guym...@gmail.com> wrote:
>
>> Is there a magic directory I can put a jar for it to available to
>> Jenkins?  Or - ugh - Do I need to put it in a plugin?
>>
>> Thanks!!
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Jenkins Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to jenkinsci-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/jenkinsci-users/CABnTgtUAMSe2FkO%3DWSOatWBrVrCaSMnp0BeVbdBH8%2BGsSJ7scQ%40mail.gmail.com
>> <https://groups.google.com/d/msgid/jenkinsci-users/CABnTgtUAMSe2FkO%3DWSOatWBrVrCaSMnp0BeVbdBH8%2BGsSJ7scQ%40mail.gmail.com?utm_medium=email_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/CAO49JtFRhENWv1U1-2%2BzUgYa418PbDRBsXgf%2BMeGJXGevWnayA%40mail.gmail.com
> <https://groups.google.com/d/msgid/jenkinsci-users/CAO49JtFRhENWv1U1-2%2BzUgYa418PbDRBsXgf%2BMeGJXGevWnayA%40mail.gmail.com?utm_medium=email_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CABnTgtU3iXhC7XiUVkR_zvGnuK6i_-kVXZ2gpNrsW0yAKp0wLw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Where can I drop a jar for it to be generally available to jenkins?

2016-04-08 Thread Guy Matz
Is there a magic directory I can put a jar for it to available to Jenkins?
Or - ugh - Do I need to put it in a plugin?

Thanks!!

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CABnTgtUAMSe2FkO%3DWSOatWBrVrCaSMnp0BeVbdBH8%2BGsSJ7scQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Groovy library

2016-04-01 Thread Guy Matz
Is anyone getting this?  :-(

On Thu, Mar 31, 2016 at 4:06 PM, Guy Matz <guym...@gmail.com> wrote:

> Anyone?  Thanks again.
>
> On Wed, Mar 30, 2016 at 4:52 PM, Guy Matz <guym...@gmail.com> wrote:
>
>> Hi!  I have some groovy methods that I would like to make generally
>> available to any jenkins job . . .  does anyone have any recommendations
>> for creating a library of methods and setting up jenkins to make the
>> methods in it available to jenkins?  Should they be static methods?  NOT
>> static?  Any thoughts would be greatly appreciated.
>>
>> Oh!  And does anyone have any advice on how to set up a dev environment
>> to develop this sort of thing?  I find it awkward to develop when I don't
>> have access to all of the objects that would be available within a jenkins
>> instance.
>>
>> I hope that makes sense.
>>
>> Thanks,
>> Guy
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CABnTgtWX4XPCjAxgbAkR9SYTU03%2BEKUiShjiEo9LzqRVNBsUdQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Groovy library

2016-03-31 Thread Guy Matz
Anyone?  Thanks again.

On Wed, Mar 30, 2016 at 4:52 PM, Guy Matz <guym...@gmail.com> wrote:

> Hi!  I have some groovy methods that I would like to make generally
> available to any jenkins job . . .  does anyone have any recommendations
> for creating a library of methods and setting up jenkins to make the
> methods in it available to jenkins?  Should they be static methods?  NOT
> static?  Any thoughts would be greatly appreciated.
>
> Oh!  And does anyone have any advice on how to set up a dev environment to
> develop this sort of thing?  I find it awkward to develop when I don't have
> access to all of the objects that would be available within a jenkins
> instance.
>
> I hope that makes sense.
>
> Thanks,
> Guy
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CABnTgtXGSEosUkQAgtNo%2B9CXka9cRYHZihE9eS1H9rRB-t0_9w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Groovy library

2016-03-30 Thread Guy Matz
Hi!  I have some groovy methods that I would like to make generally
available to any jenkins job . . .  does anyone have any recommendations
for creating a library of methods and setting up jenkins to make the
methods in it available to jenkins?  Should they be static methods?  NOT
static?  Any thoughts would be greatly appreciated.

Oh!  And does anyone have any advice on how to set up a dev environment to
develop this sort of thing?  I find it awkward to develop when I don't have
access to all of the objects that would be available within a jenkins
instance.

I hope that makes sense.

Thanks,
Guy

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CABnTgtU2XZgRqzYtZuTfrZsg%3Dbx7-%2BhcrjkmiavjrF8%2BjXAx5w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: connecting jenkins to artifactory

2016-03-28 Thread Guy Matz
Is this for a parameterized job?  Sorry, could you explain a bit more?  I
have some experience with this and can probably help . . .

On Mon, Mar 28, 2016 at 9:13 AM, Oleg Nenashev 
wrote:

> I've added jenkinsci-users to Cc.
> Most likely somebody has a hands-on experience with the latest Artifactory
> plugin version.
>
> BR, Oleg
>
> пятница, 25 марта 2016 г., 21:42:06 UTC+1 пользователь sara_jenkins
> написал:
>>
>> Hello,
>>
>> I apologize if my question is bad or not well explained in advance.
>> I am very new to jenkins.
>>
>> I am trying to connect Jenkins to an existing artifactory repository.
>> i have installed jenkins artifactory plugin and i was able to connect
>> jenkins to existing repository( artifactory)
>> then  installed repository connect plugin. and finally installed maven
>> artifactory plugin
>>
>> i am trying to create a project to deploy codes from artifactory but i
>> would like to have all the build( from artifactory) in a drop down menu.
>> this drop down menu should contain all version of build inside artifactory
>> repository.
>> i am still having an issue and i dont know what i am missing.
>> any idea?
>>
>> much appreciated
>>
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/ff6715fc-15d0-48cd-a8d7-48345e7127fa%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CABnTgtWmhKMcdXzyR9FhBp4cK9uSSZfooHxH20UoX6cJKTdD%3Dw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: email-ext plugin + credentials plugin?

2016-03-25 Thread Guy Matz
getEnvironment(listener) worked!!

Regarding buildVariables, this code:
logger.println("Build Variables Start: ")
  build.each {
logger.println(it)
  }
  logger.println("Build Variables End")

Produced:

Build Variables Start:
deploy-sidecar-gold-gmatz-test #20
Build Variables End


Thanks again!!


On Fri, Mar 25, 2016 at 11:44 AM, Slide <slide.o@gmail.com> wrote:

> Can you print out what is in build.buildVariables? The other thing to try
> would be build.getEnvironment(listener)['JIRA_USERNAME']
>
> On Fri, Mar 25, 2016 at 8:39 AM Guy Matz <guym...@gmail.com> wrote:
>
>> Hmm . . .  no, the build.buildVariables['JIRA_USERNAME'] showed up as
>> null . . .  any other thoughts?
>>
>> Thanks again,
>> Guy
>>
>> P.S. - Thanks for the pointer to the Jira plugin.  That might work for
>> another problem I have!
>>
>> On Fri, Mar 25, 2016 at 10:24 AM, Slide <slide.o@gmail.com> wrote:
>>
>>> Can you try using build.buildVariables['JIRA_USERNAME']? Also, there are
>>> a couple of JIRA plugins that might do what you want.
>>>
>>> https://wiki.jenkins-ci.org/display/JENKINS/JIRA+Plugin
>>>
>>> https://wiki.jenkins-ci.org/display/JENKINS/Jira+Issue+Updater+Plugin
>>>
>>> On Fri, Mar 25, 2016 at 6:37 AM Guy Matz <guym...@gmail.com> wrote:
>>>
>>>> Thanks, yes the credentials are supposed to be in the environment!  My
>>>> presend script is creating a Jira ticket via REST API, so I have my jira
>>>> user's username & password in credentials, and am defining them as
>>>> JIRA_USERNAME & JIRA_PASSWORD, respectively.  I am then referencing them in
>>>> the pre-send like so:
>>>>
>>>> def createJiraTicket(String changelog) {
>>>>
>>>>   jiraProject = 'Change Management System'
>>>>   jiraProjectCode = 'CMS'
>>>>   jiraUser = System.env['JIRA_USERNAME']
>>>>   jiraPassword = System.env['JIRA_PASSWORD']
>>>>   logger.println("Accessing Jira with user ${jiraUser}")  // jiraUser
>>>> shows up as null
>>>>   //  This loop has been added for debugging.  Many other ENV vars are
>>>> logged here,
>>>>   //  but not JIRA_USERNAME & JIRA_PASSWORD
>>>>   System.env.sort().each {
>>>> logger.println(it)
>>>>   }
>>>>   .
>>>>   .
>>>>   .
>>>>
>>>> I *am* able to use $JIRA_USERNAME & $JIRA_PASSWORD in a build step . . .
>>>>
>>>> Any thoughts here would be greatly appreciated!!
>>>>
>>>> Thanks a lot,
>>>> Guy
>>>>
>>>>
>>>> On Thu, Mar 24, 2016 at 6:10 PM, Slide <slide.o@gmail.com> wrote:
>>>>
>>>>> How are you specifying the credentials? I am not completely familiar
>>>>> with the credentials plugin, so I don't know how it makes things available
>>>>> to a job. If it does it via the environment, then they should be available
>>>>> in the pre-send script. Can you post your pre-send script and job config?
>>>>>
>>>>> On Thu, Mar 24, 2016 at 2:02 PM Guy Matz <guym...@gmail.com> wrote:
>>>>>
>>>>>> Thanks for the reply!  Any workarounds you can recommend?
>>>>>>
>>>>>> On Thu, Mar 24, 2016 at 4:47 PM, Slide <slide.o@gmail.com> wrote:
>>>>>>
>>>>>>> Email-ext doesn't have any direct support for the credentials
>>>>>>> plugin. I am looking at adding it for the SMTP credentials, but not
>>>>>>> specifically for what you are describing.
>>>>>>>
>>>>>>> On Thu, Mar 24, 2016, 13:40 Guy Matz <guym...@gmail.com> wrote:
>>>>>>>
>>>>>>>> Hello!  I'm trying to pass some credentials (via the credentials
>>>>>>>> plugin) to a pre-send script within the email-ext plugin . . .  
>>>>>>>> however,
>>>>>>>> the credentials are not showing up as environment vars . . .  anyone 
>>>>>>>> know
>>>>>>>> how if these two plugins can work together?
>>>>>>>>
>>>>>>>> Thanks a lot!
>>>>>>>> Guy
>>>>>>>>
>>>>>>>> --
>>>>>>>> You received this message because you are su

Re: email-ext plugin + credentials plugin?

2016-03-25 Thread Guy Matz
Hmm . . .  no, the build.buildVariables['JIRA_USERNAME'] showed up as null
. . .  any other thoughts?

Thanks again,
Guy

P.S. - Thanks for the pointer to the Jira plugin.  That might work for
another problem I have!

On Fri, Mar 25, 2016 at 10:24 AM, Slide <slide.o@gmail.com> wrote:

> Can you try using build.buildVariables['JIRA_USERNAME']? Also, there are a
> couple of JIRA plugins that might do what you want.
>
> https://wiki.jenkins-ci.org/display/JENKINS/JIRA+Plugin
>
> https://wiki.jenkins-ci.org/display/JENKINS/Jira+Issue+Updater+Plugin
>
> On Fri, Mar 25, 2016 at 6:37 AM Guy Matz <guym...@gmail.com> wrote:
>
>> Thanks, yes the credentials are supposed to be in the environment!  My
>> presend script is creating a Jira ticket via REST API, so I have my jira
>> user's username & password in credentials, and am defining them as
>> JIRA_USERNAME & JIRA_PASSWORD, respectively.  I am then referencing them in
>> the pre-send like so:
>>
>> def createJiraTicket(String changelog) {
>>
>>   jiraProject = 'Change Management System'
>>   jiraProjectCode = 'CMS'
>>   jiraUser = System.env['JIRA_USERNAME']
>>   jiraPassword = System.env['JIRA_PASSWORD']
>>   logger.println("Accessing Jira with user ${jiraUser}")  // jiraUser
>> shows up as null
>>   //  This loop has been added for debugging.  Many other ENV vars are
>> logged here,
>>   //  but not JIRA_USERNAME & JIRA_PASSWORD
>>   System.env.sort().each {
>> logger.println(it)
>>   }
>>   .
>>   .
>>   .
>>
>> I *am* able to use $JIRA_USERNAME & $JIRA_PASSWORD in a build step . . .
>>
>> Any thoughts here would be greatly appreciated!!
>>
>> Thanks a lot,
>> Guy
>>
>>
>> On Thu, Mar 24, 2016 at 6:10 PM, Slide <slide.o@gmail.com> wrote:
>>
>>> How are you specifying the credentials? I am not completely familiar
>>> with the credentials plugin, so I don't know how it makes things available
>>> to a job. If it does it via the environment, then they should be available
>>> in the pre-send script. Can you post your pre-send script and job config?
>>>
>>> On Thu, Mar 24, 2016 at 2:02 PM Guy Matz <guym...@gmail.com> wrote:
>>>
>>>> Thanks for the reply!  Any workarounds you can recommend?
>>>>
>>>> On Thu, Mar 24, 2016 at 4:47 PM, Slide <slide.o@gmail.com> wrote:
>>>>
>>>>> Email-ext doesn't have any direct support for the credentials plugin.
>>>>> I am looking at adding it for the SMTP credentials, but not specifically
>>>>> for what you are describing.
>>>>>
>>>>> On Thu, Mar 24, 2016, 13:40 Guy Matz <guym...@gmail.com> wrote:
>>>>>
>>>>>> Hello!  I'm trying to pass some credentials (via the credentials
>>>>>> plugin) to a pre-send script within the email-ext plugin . . .  however,
>>>>>> the credentials are not showing up as environment vars . . .  anyone know
>>>>>> how if these two plugins can work together?
>>>>>>
>>>>>> Thanks a lot!
>>>>>> Guy
>>>>>>
>>>>>> --
>>>>>> You received this message because you are subscribed to the Google
>>>>>> Groups "Jenkins Users" group.
>>>>>> To unsubscribe from this group and stop receiving emails from it,
>>>>>> send an email to jenkinsci-users+unsubscr...@googlegroups.com.
>>>>>> To view this discussion on the web visit
>>>>>> https://groups.google.com/d/msgid/jenkinsci-users/CABnTgtXpLxev4G-sjtJa4i_mLgH%3DJf60GBN0EUzjGR-nkc1tQw%40mail.gmail.com
>>>>>> <https://groups.google.com/d/msgid/jenkinsci-users/CABnTgtXpLxev4G-sjtJa4i_mLgH%3DJf60GBN0EUzjGR-nkc1tQw%40mail.gmail.com?utm_medium=email_source=footer>
>>>>>> .
>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>
>>>>> --
>>>>> You received this message because you are subscribed to the Google
>>>>> Groups "Jenkins Users" group.
>>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>>> an email to jenkinsci-users+unsubscr...@googlegroups.com.
>>>>>
>>>> To view this discussion on the web visit
>>>>> https://groups.google.com/d/msgid/jenkinsci-users/CAPiUgVfMN-iBmyoJowNk4iEBs_q8%2BL3TKkOVPqOmfxJLBHrCTQ%40mail.gmail.com
>>>>> <h

Re: email-ext plugin + credentials plugin?

2016-03-25 Thread Guy Matz
Thanks, yes the credentials are supposed to be in the environment!  My
presend script is creating a Jira ticket via REST API, so I have my jira
user's username & password in credentials, and am defining them as
JIRA_USERNAME & JIRA_PASSWORD, respectively.  I am then referencing them in
the pre-send like so:

def createJiraTicket(String changelog) {

  jiraProject = 'Change Management System'
  jiraProjectCode = 'CMS'
  jiraUser = System.env['JIRA_USERNAME']
  jiraPassword = System.env['JIRA_PASSWORD']
  logger.println("Accessing Jira with user ${jiraUser}")  // jiraUser shows
up as null
  //  This loop has been added for debugging.  Many other ENV vars are
logged here,
  //  but not JIRA_USERNAME & JIRA_PASSWORD
  System.env.sort().each {
logger.println(it)
  }
  .
  .
  .

I *am* able to use $JIRA_USERNAME & $JIRA_PASSWORD in a build step . . .

Any thoughts here would be greatly appreciated!!

Thanks a lot,
Guy


On Thu, Mar 24, 2016 at 6:10 PM, Slide <slide.o@gmail.com> wrote:

> How are you specifying the credentials? I am not completely familiar with
> the credentials plugin, so I don't know how it makes things available to a
> job. If it does it via the environment, then they should be available in
> the pre-send script. Can you post your pre-send script and job config?
>
> On Thu, Mar 24, 2016 at 2:02 PM Guy Matz <guym...@gmail.com> wrote:
>
>> Thanks for the reply!  Any workarounds you can recommend?
>>
>> On Thu, Mar 24, 2016 at 4:47 PM, Slide <slide.o@gmail.com> wrote:
>>
>>> Email-ext doesn't have any direct support for the credentials plugin. I
>>> am looking at adding it for the SMTP credentials, but not specifically for
>>> what you are describing.
>>>
>>> On Thu, Mar 24, 2016, 13:40 Guy Matz <guym...@gmail.com> wrote:
>>>
>>>> Hello!  I'm trying to pass some credentials (via the credentials
>>>> plugin) to a pre-send script within the email-ext plugin . . .  however,
>>>> the credentials are not showing up as environment vars . . .  anyone know
>>>> how if these two plugins can work together?
>>>>
>>>> Thanks a lot!
>>>> Guy
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Jenkins Users" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to jenkinsci-users+unsubscr...@googlegroups.com.
>>>> To view this discussion on the web visit
>>>> https://groups.google.com/d/msgid/jenkinsci-users/CABnTgtXpLxev4G-sjtJa4i_mLgH%3DJf60GBN0EUzjGR-nkc1tQw%40mail.gmail.com
>>>> <https://groups.google.com/d/msgid/jenkinsci-users/CABnTgtXpLxev4G-sjtJa4i_mLgH%3DJf60GBN0EUzjGR-nkc1tQw%40mail.gmail.com?utm_medium=email_source=footer>
>>>> .
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Jenkins Users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to jenkinsci-users+unsubscr...@googlegroups.com.
>>>
>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/jenkinsci-users/CAPiUgVfMN-iBmyoJowNk4iEBs_q8%2BL3TKkOVPqOmfxJLBHrCTQ%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/jenkinsci-users/CAPiUgVfMN-iBmyoJowNk4iEBs_q8%2BL3TKkOVPqOmfxJLBHrCTQ%40mail.gmail.com?utm_medium=email_source=footer>
>>> .
>>
>>
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Jenkins Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to jenkinsci-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/jenkinsci-users/CABnTgtVoDepGqVZxQaP-X9CEVU9MgfS54Dcz5YPwhra5jcfeiA%40mail.gmail.com
>> <https://groups.google.com/d/msgid/jenkinsci-users/CABnTgtVoDepGqVZxQaP-X9CEVU9MgfS54Dcz5YPwhra5jcfeiA%40mail.gmail.com?utm_medium=email_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.googl

Re: email-ext plugin + credentials plugin?

2016-03-24 Thread Guy Matz
Thanks for the reply!  Any workarounds you can recommend?

On Thu, Mar 24, 2016 at 4:47 PM, Slide <slide.o@gmail.com> wrote:

> Email-ext doesn't have any direct support for the credentials plugin. I am
> looking at adding it for the SMTP credentials, but not specifically for
> what you are describing.
>
> On Thu, Mar 24, 2016, 13:40 Guy Matz <guym...@gmail.com> wrote:
>
>> Hello!  I'm trying to pass some credentials (via the credentials plugin)
>> to a pre-send script within the email-ext plugin . . .  however, the
>> credentials are not showing up as environment vars . . .  anyone know how
>> if these two plugins can work together?
>>
>> Thanks a lot!
>> Guy
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Jenkins Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to jenkinsci-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/jenkinsci-users/CABnTgtXpLxev4G-sjtJa4i_mLgH%3DJf60GBN0EUzjGR-nkc1tQw%40mail.gmail.com
>> <https://groups.google.com/d/msgid/jenkinsci-users/CABnTgtXpLxev4G-sjtJa4i_mLgH%3DJf60GBN0EUzjGR-nkc1tQw%40mail.gmail.com?utm_medium=email_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/CAPiUgVfMN-iBmyoJowNk4iEBs_q8%2BL3TKkOVPqOmfxJLBHrCTQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/jenkinsci-users/CAPiUgVfMN-iBmyoJowNk4iEBs_q8%2BL3TKkOVPqOmfxJLBHrCTQ%40mail.gmail.com?utm_medium=email_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CABnTgtVoDepGqVZxQaP-X9CEVU9MgfS54Dcz5YPwhra5jcfeiA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


email-ext plugin + credentials plugin?

2016-03-24 Thread Guy Matz
Hello!  I'm trying to pass some credentials (via the credentials plugin) to
a pre-send script within the email-ext plugin . . .  however, the
credentials are not showing up as environment vars . . .  anyone know how
if these two plugins can work together?

Thanks a lot!
Guy

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CABnTgtXpLxev4G-sjtJa4i_mLgH%3DJf60GBN0EUzjGR-nkc1tQw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Customizing the Project Page

2015-12-11 Thread Guy Matz
I would like to add some dynamic content to the project page . . .   anyone
know if that's possible?

I have a job that deploys new code to an environment and it's been
requested that I get the output of "git log" on the project page so the
person pushing out the new code knows what the changes are . . .  I have
the groovy code that gets the log output, now I just need a way to get it
onto the project page.

Thanks a lot,
Guy

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CABnTgtWXgLPV6uiMVThHC_5oG80%3D%3DxwuAkQc2%3DoFDrE1ppNj-w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Looking for input: Workflow scripting best practices

2015-12-10 Thread Guy Matz
Hi!  There was a meetup of NYC CD recently where workflow was presented.
The slidedeck is at http://goo.gl/WZh9kZ
There is a link in there to a dockerized jenkins for testing, etc., which
might be useful . . ?

On Thu, Dec 10, 2015 at 9:47 AM, Andrew Bayer 
wrote:

> Hey all!
>
> I'm about to start working on a resource for Workflow scripting best
> practices, and thought I'd ask y'all if you have any good pointers to start
> from - existing blog posts, docs, etc, examples of what you think are
> particularly good Workflow scripts in GitHub or elsewhere, and so on. I'll
> pull those together with what I've already got to get the core of things
> together, and then open it up to everyone to edit and update going forward.
> Thanks!
>
> A.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/CAPbPdOYx_682u%3DQ2Mw4Jnxr%2BS-z909fxsja%2BgDkppkdQeaO1dA%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CABnTgtVGQP6-psDvBe5z4EP1HBCiY-iWAh_q9cW_3vCXXcJfOA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Groovy Question: revision from job?

2015-12-10 Thread Guy Matz
Nicely done!!  How the heck was I supposed to know that!?  :-(  The API is
less than intuitive and does not seem to be well documented.  Any advice on
how to best use it?

Thanks again!!

On Wed, Dec 9, 2015 at 7:28 PM, Christopher Orr <ch...@orr.me.uk> wrote:

> Hi there,
>
> On 09/12/15 23:40, Guy Matz wrote:
> > Hi!  Anyone know how I can retrieve the git revision from a job?
> >
> > I can get to the build:
> >
> > j = Jenkins.instance.getJob('render-master')
> > b475 = j.getBuildByNumber(475)
> >
> > but I can't find a way to to get the git revision associated with that
> > build.  Any thoughts would be appreciated!
>
> Git metadata is stored in a `BuildData` action, so something like this
> (untested) should work:
>
>
> b475.getAction(hudson.plugins.git.util.BuildData.class).lastBuiltRevision.sha1String
>
> Regards,
> Chris
>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/5668C714.30504%40orr.me.uk
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CABnTgtWXk1o10d537DPv37zJe-uFwtnvo9rjZ8E%2BzLkb%3D%2BOitw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Workflow: extract git revision and build a timestamp

2015-12-09 Thread Guy Matz
I do believe the plugin sets the var you want.  have a look at
Environment variables here:
https://wiki.jenkins-ci.org/display/JENKINS/Git+Plugin#GitPlugin-AdvancedFeatures

On Thu, Nov 12, 2015 at 12:41 PM, Jens Wilke 
wrote:

> Hi all,
>
> for extracting a git revision and building a timestamp at the beginning of
> a job I have now the following code:
>
> stage 'build'
> node {
>   git ''
>   sh 'xy=`git rev-parse HEAD | cut -c1-11`; echo -n $xy > git-revision'
>   def rev11 = readFile 'git-revision'
>   echo "Git revision ${rev11}"
>   def stamp = new java.text.SimpleDateFormat('MMddHHmmss').format(new
> Date())
>   echo stamp
>   ...
> }
>
> At least building the git revision seams quite complicated. It would be
> great when the git SCM plugin sets the revision as a variable.
> Is there a more crispy solution for this?
>
> Cheers,
>
> Jens
>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/e4bdb5bb-6d1e-4459-8e1c-03483e2a945a%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CABnTgtXnp%2B9CVq0euJK4FnT-tfB%3DHb0OnNVAJaC%3Dkxq75tozzQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Groovy Question: revision from job?

2015-12-09 Thread Guy Matz
Hi!  Anyone know how I can retrieve the git revision from a job?

I can get to the build:

j = Jenkins.instance.getJob('render-master')
b475 = j.getBuildByNumber(475)

but I can't find a way to to get the git revision associated with that
build.  Any thoughts would be appreciated!

Thanks a lot,
Guy

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CABnTgtVtJ_8_FH%3Dv3Pv-JUG%2Bw2S-N5rdJ%3Dj9avooL0DxCdHXqQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Job #s are inconsistent after restore from thinBackup

2015-11-12 Thread Guy Matz
Thanks!  I found that if I manually set the number, then use "Manage
Jenkins | Reload Configuration from Disk" I was able to reset the number!

Thanks again,
Guy

On Thu, Nov 12, 2015 at 11:51 AM, Daniel Beck <m...@beckweb.net> wrote:

> Set Next Build Number Plugin allows you to set the value in memory.
> Jenkins doesn't read from the file except when loading the Job.
>
> On 12.11.2015, at 17:49, Guy Matz <guym...@gmail.com> wrote:
>
> > Hi!  I was lucky enough to be able to restore from a backup and a disk
> failure, but now *some* of my jobs are misnumbered . . .  one job has:
> > $ ls -l builds/
> > total 16
> > drwxr-xr-x. 2 jenkins jenkins 4096 Nov 11 17:54 1304
> > drwxr-xr-x. 3 jenkins jenkins 4096 Nov 12 09:33 1305
> > drwxr-xr-x. 2 jenkins jenkins 4096 Nov 11 17:54 922
> > lrwxrwxrwx. 1 jenkins jenkins4 Nov 12 11:44 lastFailedBuild -> 1305
> > lrwxrwxrwx. 1 jenkins jenkins4 Nov 12 11:44 lastStableBuild -> 1304
> > lrwxrwxrwx. 1 jenkins jenkins4 Nov 12 11:44 lastSuccessfulBuild ->
> 1304
> > lrwxrwxrwx. 1 jenkins jenkins2 Nov 12 11:44 lastUnstableBuild -> -1
> > lrwxrwxrwx. 1 jenkins jenkins4 Nov 12 11:44 lastUnsuccessfulBuild ->
> 1305
> > -rw-r--r--. 1 jenkins jenkins 2772 Nov 11 17:54 legacyIds
> >
> > and:
> > $ cat nextBuildNumber
> > 936
> >
> > When I try to run this job I get:
> > SEVERE: Unexpected executor death
> > java.lang.IllegalStateException: cannot create a build with number 937
> since that (or higher) is already in use among [922, 1304, 1305]
> >
> > I've tried to set the # in nextBuildNumber to 1306 but it reverts back
> to 930-something  . . .
> >
> > Any ideas?
> >
> > Thanks a lot,
> > Guy
> >
> >
> > --
> > You received this message because you are subscribed to the Google
> Groups "Jenkins Users" group.
> > To unsubscribe from this group and stop receiving emails from it, send
> an email to jenkinsci-users+unsubscr...@googlegroups.com.
> > To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/CABnTgtXm98PMYguF6RuDgmRhXPy2%2BqdPz66cpjWfQeSEmr9%2B8Q%40mail.gmail.com
> .
> > For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/18034D34-DDDA-489A-93E0-1D694E5CDB27%40beckweb.net
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CABnTgtV0yu2HYKMdtKuV%2B%3DhdNhnCN8dHoCkZy%3DvBJ_8uE15AvQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Job #s are inconsistent after restore from thinBackup

2015-11-12 Thread Guy Matz
Hi!  I was lucky enough to be able to restore from a backup and a disk
failure, but now *some* of my jobs are misnumbered . . .  one job has:
$ ls -l builds/
total 16
drwxr-xr-x. 2 jenkins jenkins 4096 Nov 11 17:54 1304
drwxr-xr-x. 3 jenkins jenkins 4096 Nov 12 09:33 1305
drwxr-xr-x. 2 jenkins jenkins 4096 Nov 11 17:54 922
lrwxrwxrwx. 1 jenkins jenkins4 Nov 12 11:44 lastFailedBuild -> 1305
lrwxrwxrwx. 1 jenkins jenkins4 Nov 12 11:44 lastStableBuild -> 1304
lrwxrwxrwx. 1 jenkins jenkins4 Nov 12 11:44 lastSuccessfulBuild -> 1304
lrwxrwxrwx. 1 jenkins jenkins2 Nov 12 11:44 lastUnstableBuild -> -1
lrwxrwxrwx. 1 jenkins jenkins4 Nov 12 11:44 lastUnsuccessfulBuild ->
1305
-rw-r--r--. 1 jenkins jenkins 2772 Nov 11 17:54 legacyIds

and:
$ cat nextBuildNumber
936

When I try to run this job I get:
SEVERE: Unexpected executor death
java.lang.IllegalStateException: cannot create a build with number 937
since that (or higher) is already in use among [922, 1304, 1305]

I've tried to set the # in nextBuildNumber to 1306 but it reverts back to
930-something  . . .

Any ideas?

Thanks a lot,
Guy

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CABnTgtXm98PMYguF6RuDgmRhXPy2%2BqdPz66cpjWfQeSEmr9%2B8Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.