Re: export display in a shell script executed by Jenkins

2016-01-08 Thread iostrym
thanks a lot. I didn't see this option "Let Xvfb choose display name"

:)

Le jeudi 7 janvier 2016 18:57:10 UTC+1, old hooky a écrit :
>
> > Quoting iostrym : 
> > 
> >> Hi, 
> >> 
> >> We have a TCL script that has a GUI that is executed by Jenkins using a 
> >> shell script in the job. 
> >> 
> >> Then we have to use : 
> >> 
> >> export DISPLAY=: 
> >> 
> >> I used things like that to try to avoid the use of a port number that 
> is 
> >> already used by someone else or by another job : 
> >> 
> >> export DISPLAY=:`expr "$BUILD_NUMBER" + "100"` 
> >> 
> >> Is there a clean way in the jenkins shell script to get a port_number 
> that 
> >> is free ? so that the job will never fail because of a port_number 
> already 
> >> existant... 
> >> 
> >> thanks a lot. 
> > 
> > 
> > Try this: 
> https://wiki.jenkins-ci.org/display/JENKINS/Port+Allocator+Plugin 
>
>
> Sorry, you asked for a free port number, but that's not really what you 
> want. 
>
> As suggested, you should use   
> https://wiki.jenkins-ci.org/display/JENKINS/Xvfb+Plugin 
>
>

-- 
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/dca2df53-66ec-4c03-a19f-8239d091c001%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Problem in Cloudbees custom build environment plugin integration with Jenkins

2016-01-08 Thread puneet singh
Hi All,

I am using cloudbees custom build environment plugin to create docker 
container and run CI build inside it.
I'm facing following error kindly help me with this.

ERROR: Processing failed due to a bug in the code. Please report this to 
jenkinsci-us...@googlegroups.comjava.lang.RuntimeException 
: 
Failed to build docker image from project Dockerfile
at 
com.cloudbees.jenkins.plugins.docker_build_env.Docker.buildImage(Docker.java:127)
 

at 
com.cloudbees.jenkins.plugins.docker_build_env.DockerfileImageSelector.prepareDockerImage(DockerfileImageSelector.java:41)
 

at 
com.cloudbees.jenkins.plugins.docker_build_env.DockerBuildWrapper.setUp(DockerBuildWrapper.java:167)
 



what type of error is this?

Is it compatibility issue, my Jenkins version is 1.627

What should i need to do.


Thanks 

regards

Puneet Singh

-- 
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/be09e453-335b-4a92-948e-9b8b3bc44aac%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to set environment variable based on build parameter

2016-01-08 Thread Eric Pyle
In bash you could do something like this. Let's assume you have the 
property file mapping.properties in the workspace, and the user chose 
proj1 as the value of PROJECT_NAME.


. mapping.properties
echo ${!PROJECT_NAME}

or alternatively:
eval THEME_NAME=\$$PROJECT_NAME

Thanks to http://tldp.org/LDP/abs/html/ivr.html for the reference.

Eric

On 1/8/2016 1:26 PM, Marty Mickelson wrote:
I asked this in StackOverflow but thought this might be a more 
targeted place to get an answer...


I have a parameterized job where I need to set an environment variable 
based on a choice parameter the user chooses. Each project has a theme 
project dependency. I'd like to have the user choose the project and 
then load the theme name from a property file. Something like


|proj1=theme1 proj2=theme2 proj3=theme3 |

If the user chooses |proj1| from the |PROJECT_NAME| choice parameter, 
I want to automatically set |THEME_NAME| to be |theme1|. What would be 
the best way to go about this?


I don't want to modify the Jenkins job config whenever a new project 
is added. Instead, I want to have the mapping in a file so I can have 
it in version control.


--
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/f5afc3a1-7ba1-4c3d-94fe-542187e3788d%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/569022D8.3020509%40cd-adapco.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to set environment variable based on build parameter

2016-01-08 Thread Marty Mickelson
Aha, I found an (alternative) simple solution! In the job config...

*Build Environment*
X Inject environment variables to the build process
Properties File Path C:\pathtofile\mapping.properties
Properties Content THEME_NAME=${${PROJECT_NAME}}

Thanks Eric for your reply that led me to the idea.

On Friday, January 8, 2016 at 10:26:59 AM UTC-8, Marty Mickelson wrote:
>
> I asked this in StackOverflow but thought this might be a more targeted 
> place to get an answer...
>
> I have a parameterized job where I need to set an environment variable 
> based on a choice parameter the user chooses. Each project has a theme 
> project dependency. I'd like to have the user choose the project and then 
> load the theme name from a property file. Something like
>
> proj1=theme1
> proj2=theme2
> proj3=theme3
>
> If the user chooses proj1 from the PROJECT_NAME choice parameter, I want 
> to automatically set THEME_NAME to be theme1. What would be the best way 
> to go about this?
>
> I don't want to modify the Jenkins job config whenever a new project is 
> added. Instead, I want to have the mapping in a file so I can have it in 
> version control.
>

-- 
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/829e55eb-d9f8-4fea-9996-533c6f62ca1e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Thread hijacking

2016-01-08 Thread Christopher Orr
On 08/01/16 07:58, Dirk Heinrichs wrote:
> please don't hijack other peoples threads, it's considered bad habit.

False accusations are bad as well ;)

The parent didn't hijack any threads, as you can see from a regular
email client, the Google Groups web page for the thread, or from the
headers of the email.

-- 
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/56904E33.2090107%40orr.me.uk.
For more options, visit https://groups.google.com/d/optout.


Re: Problem in Cloudbees custom build environment plugin integration with Jenkins

2016-01-08 Thread Christopher Orr
Hi there,

On 08/01/16 09:59, puneet singh wrote:
> I am using cloudbees custom build environment plugin to create docker
> container and run CI build inside it.
> I'm facing following error kindly help me with this.
> 
> ERROR: Processing failed due to a bug in the code. Please report this to 
> jenkinsci-users@googlegroups.com
> java.lang.RuntimeException
> : 
> Failed to build docker image from project Dockerfile
>   at 
> com.cloudbees.jenkins.plugins.docker_build_env.Docker.buildImage(Docker.java:127)
> 
>   at 
> com.cloudbees.jenkins.plugins.docker_build_env.DockerfileImageSelector.prepareDockerImage(DockerfileImageSelector.java:41)
> 
>   at 
> com.cloudbees.jenkins.plugins.docker_build_env.DockerBuildWrapper.setUp(DockerBuildWrapper.java:167)
> 

You didn't mention which version of the plugin you're using, but it
seems to be the latest version.

The plugin appears to be wrongly causing that "processing failed" error
message to be shown — that should be handled more gracefully.  Code:
https://github.com/jenkinsci/docker-custom-build-environment-plugin/blob/docker-custom-build-environment-1.6.4/src/main/java/com/cloudbees/jenkins/plugins/docker_build_env/Docker.java#L120-L128

According to that part of the source code, running the `docker build`
command failed, and any output from the docker command will have been
written to the build log, right before the error message you've posted
here.  So try looking there.

I also note that there has been a lot of activity since the most recent
plugin release, so maybe the maintainers will make a new release soon,
which will fix this or add more checks or more logging etc..

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/569050B4.9080208%40orr.me.uk.
For more options, visit https://groups.google.com/d/optout.


Re: Java API for Team Foundation Server

2016-01-08 Thread Christopher Orr
On 07/01/16 18:01, Andy Falanga wrote:
> Does anyone know the source (not the code but who produces) for the Java
> API used by the Jenkins Team Foundation Server plugin?

The plugin bundles a com.microsoft.tfs.sdk JAR file:
https://github.com/jenkinsci/tfs-plugin/blob/0364972/pom.xml#L219-L225

This appears to come from Microsoft's TFS SDK for Java.

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/56904DE7.303%40orr.me.uk.
For more options, visit https://groups.google.com/d/optout.


How to set environment variable based on build parameter

2016-01-08 Thread Marty Mickelson
I asked this in StackOverflow but thought this might be a more targeted 
place to get an answer...

I have a parameterized job where I need to set an environment variable 
based on a choice parameter the user chooses. Each project has a theme 
project dependency. I'd like to have the user choose the project and then 
load the theme name from a property file. Something like

proj1=theme1
proj2=theme2
proj3=theme3

If the user chooses proj1 from the PROJECT_NAME choice parameter, I want to 
automatically set THEME_NAME to be theme1. What would be the best way to go 
about this?

I don't want to modify the Jenkins job config whenever a new project is 
added. Instead, I want to have the mapping in a file so I can have it in 
version control.

-- 
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/f5afc3a1-7ba1-4c3d-94fe-542187e3788d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Content-Security-Policy in Jenkins

2016-01-08 Thread Boris Serdiuk
Hello! 

Since Jenkins 1.625.3 you added Content-Security-Policy header for some 
content from plugins. I understand the reason to do it, but it breaks a lot 
of use-cases. 
I am developer of Allure Framework 
, it is the thing to 
better test reports. We have Allure Jenkins Plugin 
, so some of our users are also 
Jenkins users. And since that security fix we have got a lot of bug reports 
about it:
https://github.com/allure-framework/allure-core/issues/715
https://github.com/allure-framework/allure-core/issues/717
https://github.com/allure-framework/allure-core/issues/729
Also, there are more questions about it in our Gitter chat. 
 People just not understand 
what is going on. We can't get rid of use Javascript in our framework, so I 
have to explain again and again what users should do.

Do you have any announcement or migration guide where I can redirect my 
users? Also, I looking for a better way to relax content security via UI 
rather than change configuration properties in the file. 

-- 
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/03831216-7e55-46cd-9562-89d6a0980e9a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Next Build Number Groovy Script

2016-01-08 Thread Eric Naitove
Where am I wrong here.  I have tried several combinations

import jenkins.model.*
import jenkins.model.node.* 
import jenkins.model.slave.*

Jenkins.instance?.items.each { job ->
if ( job.getLastBuild() != null ) {
println 
"${job.name},${job.getLastBuild().getNumber()},${job.getnextBuildNumber().getNumber()}"
} else {
}
}

-- 
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/4b005d29-2939-4688-96e9-53cf03c2b834%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Next Build Number Groovy Script

2016-01-08 Thread Baptiste Mathus
a bit too succinct? error? more detailed goal?

2016-01-08 12:55 GMT+00:00 Eric Naitove :

> Where am I wrong here.  I have tried several combinations
>
> import jenkins.model.*
> import jenkins.model.node.*
> import jenkins.model.slave.*
>
> Jenkins.instance?.items.each { job ->
> if ( job.getLastBuild() != null ) {
> println "${job.name
> },${job.getLastBuild().getNumber()},${job.getnextBuildNumber().getNumber()}"
> } else {
> }
> }
>
> --
> 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/4b005d29-2939-4688-96e9-53cf03c2b834%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/CANWgJS4yO5otVPbz-T4ZTrAMyuxj67DpDFyGvM6exy4nhqmWOw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Next Build Number Groovy Script

2016-01-08 Thread Baptiste Mathus
Jenkins.instance?.items.findAll { item -> item instanceof Job }
   .findAll { job -> job.lastBuild != null }
   .each { job -> println
"${job.name},${job.nextBuildNumber}"
}

2016-01-08 13:35 GMT+00:00 Eric Naitove :

> import jenkins.model.*
> import jenkins.model.node.*
> import jenkins.model.slave.*
>
> Jenkins.instance?.items.each { job ->
> if ( job.getLastBuild() != null ) {
>   println "${job.name},${job.getNextBuildNumber().getNumber()}"
> } else {
> }
> }
> AND OUTPUT
>
> groovy.lang.MissingMethodException: No signature of method: 
> java.lang.Integer.getNumber() is applicable for argument types: () values: []
> Possible solutions: getInteger(java.lang.String), 
> getInteger(java.lang.String, int), getInteger(java.lang.String, 
> java.lang.Integer)
>   at 
> org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:55)
>   at 
> org.codehaus.groovy.runtime.callsite.PojoMetaClassSite.call(PojoMetaClassSite.java:46)
>   at 
> org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
>   at 
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
>   at 
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112)
>   at Script1$_run_closure1.doCall(Script1.groovy:7)
>   at sun.reflect.GeneratedMethodAccessor4317.invoke(Unknown Source)
>   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>   at java.lang.reflect.Method.invoke(Unknown Source)
>   at 
> org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
>   at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
>   at 
> org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272)
>   at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:903)
>   at groovy.lang.Closure.call(Closure.java:415)
>   at groovy.lang.Closure.call(Closure.java:428)
>   at 
> org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:1379)
>   at 
> org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:1351)
>   at org.codehaus.groovy.runtime.dgm$170.invoke(Unknown Source)
>   at 
> org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:271)
>   at 
> org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:53)
>   at 
> org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
>   at 
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
>   at 
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
>   at Script1.run(Script1.groovy:5)
>   at groovy.lang.GroovyShell.evaluate(GroovyShell.java:580)
>   at groovy.lang.GroovyShell.evaluate(GroovyShell.java:618)
>   at groovy.lang.GroovyShell.evaluate(GroovyShell.java:589)
>   at 
> hudson.util.RemotingDiagnostics$Script.call(RemotingDiagnostics.java:142)
>   at 
> hudson.util.RemotingDiagnostics$Script.call(RemotingDiagnostics.java:114)
>   at hudson.remoting.LocalChannel.call(LocalChannel.java:45)
>   at 
> hudson.util.RemotingDiagnostics.executeGroovy(RemotingDiagnostics.java:111)
>   at jenkins.model.Jenkins._doScript(Jenkins.java:3599)
>   at jenkins.model.Jenkins.doScript(Jenkins.java:3571)
>   at sun.reflect.GeneratedMethodAccessor2227.invoke(Unknown Source)
>   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>   at java.lang.reflect.Method.invoke(Unknown Source)
>   at 
> org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:298)
>   at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:161)
>   at 
> org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:96)
>   at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:121)
>   at 
> org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
>   at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
>   at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
>   at org.kohsuke.stapler.Stapler.invoke(Stapler.java:649)
>   at org.kohsuke.stapler.Stapler.service(Stapler.java:238)
>   at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
>   at 
> org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:686)
>   at 
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1494)
>   at 
> hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
>   at 
> net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:202)
>   at 
> net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:180)
>   at 
> 

Re: Next Build Number Groovy Script

2016-01-08 Thread Eric Naitove
Baptiste...  Worked.  Thank You

On Friday, January 8, 2016 at 8:55:48 AM UTC-5, Baptiste Mathus wrote:
>
> Jenkins.instance?.items.findAll { item -> item instanceof Job }
>.findAll { job -> job.lastBuild != null }
>.each { job -> println 
> "${job.name},${job.nextBuildNumber}" 
> }
>
> 2016-01-08 13:35 GMT+00:00 Eric Naitove :
>
>> import jenkins.model.*
>> import jenkins.model.node.* 
>> import jenkins.model.slave.*
>>
>> Jenkins.instance?.items.each { job ->
>> if ( job.getLastBuild() != null ) {
>>   println "${job.name},${job.getNextBuildNumber().getNumber()}"
>> } else {
>> }
>> }
>> AND OUTPUT
>>
>> groovy.lang.MissingMethodException: No signature of method: 
>> java.lang.Integer.getNumber() is applicable for argument types: () values: []
>> Possible solutions: getInteger(java.lang.String), 
>> getInteger(java.lang.String, int), getInteger(java.lang.String, 
>> java.lang.Integer)
>>  at 
>> org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:55)
>>  at 
>> org.codehaus.groovy.runtime.callsite.PojoMetaClassSite.call(PojoMetaClassSite.java:46)
>>  at 
>> org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
>>  at 
>> org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
>>  at 
>> org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112)
>>  at Script1$_run_closure1.doCall(Script1.groovy:7)
>>  at sun.reflect.GeneratedMethodAccessor4317.invoke(Unknown Source)
>>  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>>  at java.lang.reflect.Method.invoke(Unknown Source)
>>  at 
>> org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
>>  at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
>>  at 
>> org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272)
>>  at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:903)
>>  at groovy.lang.Closure.call(Closure.java:415)
>>  at groovy.lang.Closure.call(Closure.java:428)
>>  at 
>> org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:1379)
>>  at 
>> org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:1351)
>>  at org.codehaus.groovy.runtime.dgm$170.invoke(Unknown Source)
>>  at 
>> org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:271)
>>  at 
>> org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:53)
>>  at 
>> org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
>>  at 
>> org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
>>  at 
>> org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
>>  at Script1.run(Script1.groovy:5)
>>  at groovy.lang.GroovyShell.evaluate(GroovyShell.java:580)
>>  at groovy.lang.GroovyShell.evaluate(GroovyShell.java:618)
>>  at groovy.lang.GroovyShell.evaluate(GroovyShell.java:589)
>>  at 
>> hudson.util.RemotingDiagnostics$Script.call(RemotingDiagnostics.java:142)
>>  at 
>> hudson.util.RemotingDiagnostics$Script.call(RemotingDiagnostics.java:114)
>>  at hudson.remoting.LocalChannel.call(LocalChannel.java:45)
>>  at 
>> hudson.util.RemotingDiagnostics.executeGroovy(RemotingDiagnostics.java:111)
>>  at jenkins.model.Jenkins._doScript(Jenkins.java:3599)
>>  at jenkins.model.Jenkins.doScript(Jenkins.java:3571)
>>  at sun.reflect.GeneratedMethodAccessor2227.invoke(Unknown Source)
>>  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>>  at java.lang.reflect.Method.invoke(Unknown Source)
>>  at 
>> org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:298)
>>  at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:161)
>>  at 
>> org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:96)
>>  at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:121)
>>  at 
>> org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
>>  at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
>>  at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
>>  at org.kohsuke.stapler.Stapler.invoke(Stapler.java:649)
>>  at org.kohsuke.stapler.Stapler.service(Stapler.java:238)
>>  at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
>>  at 
>> org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:686)
>>  at 
>> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1494)
>>  at 
>> hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
>>  at 
>> 

Re: Next Build Number Groovy Script

2016-01-08 Thread Slide
Perhaps it should be getNextBuildNumber with a capital N in next? Without
more details on the error or issue this is only a guess.

On Fri, Jan 8, 2016, 06:04 Baptiste Mathus  wrote:

> a bit too succinct? error? more detailed goal?
>
> 2016-01-08 12:55 GMT+00:00 Eric Naitove :
>
>> Where am I wrong here.  I have tried several combinations
>>
>> import jenkins.model.*
>> import jenkins.model.node.*
>> import jenkins.model.slave.*
>>
>> Jenkins.instance?.items.each { job ->
>> if ( job.getLastBuild() != null ) {
>> println "${job.name
>> },${job.getLastBuild().getNumber()},${job.getnextBuildNumber().getNumber()}"
>> } else {
>> }
>> }
>>
>> --
>> 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/4b005d29-2939-4688-96e9-53cf03c2b834%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/CANWgJS4yO5otVPbz-T4ZTrAMyuxj67DpDFyGvM6exy4nhqmWOw%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/CAPiUgVdHKFzePHLoddcD%2BTa0RuijEoSoZ2u5XPRv5VTa-W1JXw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Content-Security-Policy in Jenkins

2016-01-08 Thread Daniel Beck
On 08.01.2016, at 11:49, Boris Serdiuk  wrote:

> Do you have any announcement or migration guide where I can redirect my users?

Choose any of these, the full documentation is at most two clicks away:

Security advisory announcement:
https://groups.google.com/d/msg/jenkinsci-advisories/Zy8yMkQfld4/a8lkB_DUDQAJ

Announcement blog post:
https://jenkins-ci.org/blog/2015/12/09/security-updates-released-today/

Regular changelog links to advisory:
https://jenkins-ci.org/changelog/#v1.641

LTS changelog links to advisory:
https://jenkins-ci.org/changelog-stable/#v1.625.3

Security advisory with giant notice on compatibility:
https://wiki.jenkins-ci.org/display/SECURITY/Jenkins+Security+Advisory+2015-12-09

Documentation:
https://wiki.jenkins-ci.org/display/JENKINS/Configuring+Content+Security+Policy

If you have suggestions how to make this more noticeable without doing giant 
banners everywhere, or repeating the same information in a dozen places, please 
let me know.

> Also, I looking for a better way to relax content security via UI rather than 
> change configuration properties in the file. 

I'm planning to make setting the system property a regular part of the Jenkins 
global security config UI. It is tracked here: 
https://issues.jenkins-ci.org/browse/JENKINS-32296

-- 
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/F6BAC5E2-98C3-48A4-96EB-522B05F26D2D%40beckweb.net.
For more options, visit https://groups.google.com/d/optout.


Re: Next Build Number Groovy Script

2016-01-08 Thread Kristian
What about this solution:

import jenkins.model.*
import jenkins.model.node.*
import jenkins.model.slave.*

Jenkins.instance?.items.each { job ->
  if ( job.getLastBuild() != null ) {
  println "${job.name}"
  println "${job.getLastBuild().getNumber()}"

  /// ADDED ///
  def nextBuildNumber = job.getLastBuild().getNumber() + 1
  println "$nextBuildNumber"

  } else {
  }
}

2016-01-08 14:12 GMT+01:00 Slide :
> Perhaps it should be getNextBuildNumber with a capital N in next? Without
> more details on the error or issue this is only a guess.
>
>
> On Fri, Jan 8, 2016, 06:04 Baptiste Mathus  wrote:
>>
>> a bit too succinct? error? more detailed goal?
>>
>> 2016-01-08 12:55 GMT+00:00 Eric Naitove :
>>>
>>> Where am I wrong here.  I have tried several combinations
>>>
>>> import jenkins.model.*
>>> import jenkins.model.node.*
>>> import jenkins.model.slave.*
>>>
>>> Jenkins.instance?.items.each { job ->
>>> if ( job.getLastBuild() != null ) {
>>> println
>>> "${job.name},${job.getLastBuild().getNumber()},${job.getnextBuildNumber().getNumber()}"
>>> } else {
>>> }
>>> }
>>>
>>> --
>>> 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/4b005d29-2939-4688-96e9-53cf03c2b834%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/CANWgJS4yO5otVPbz-T4ZTrAMyuxj67DpDFyGvM6exy4nhqmWOw%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/CAPiUgVdHKFzePHLoddcD%2BTa0RuijEoSoZ2u5XPRv5VTa-W1JXw%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/CAO5HUhNKM61SjAn1Mc8e5c%3DJ9Fj2KP5Ant-QQOEOb4G2yAR%3DoA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Next Build Number Groovy Script

2016-01-08 Thread Eric Naitove
import jenkins.model.*
import jenkins.model.node.* 
import jenkins.model.slave.*

Jenkins.instance?.items.each { job ->
if ( job.getLastBuild() != null ) {
  println "${job.name},${job.getNextBuildNumber().getNumber()}"
} else {
}
}
AND OUTPUT

groovy.lang.MissingMethodException: No signature of method: 
java.lang.Integer.getNumber() is applicable for argument types: () values: []
Possible solutions: getInteger(java.lang.String), getInteger(java.lang.String, 
int), getInteger(java.lang.String, java.lang.Integer)
at 
org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:55)
at 
org.codehaus.groovy.runtime.callsite.PojoMetaClassSite.call(PojoMetaClassSite.java:46)
at 
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
at 
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
at 
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112)
at Script1$_run_closure1.doCall(Script1.groovy:7)
at sun.reflect.GeneratedMethodAccessor4317.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at 
org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
at 
org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:903)
at groovy.lang.Closure.call(Closure.java:415)
at groovy.lang.Closure.call(Closure.java:428)
at 
org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:1379)
at 
org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:1351)
at org.codehaus.groovy.runtime.dgm$170.invoke(Unknown Source)
at 
org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:271)
at 
org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:53)
at 
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
at 
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
at 
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
at Script1.run(Script1.groovy:5)
at groovy.lang.GroovyShell.evaluate(GroovyShell.java:580)
at groovy.lang.GroovyShell.evaluate(GroovyShell.java:618)
at groovy.lang.GroovyShell.evaluate(GroovyShell.java:589)
at 
hudson.util.RemotingDiagnostics$Script.call(RemotingDiagnostics.java:142)
at 
hudson.util.RemotingDiagnostics$Script.call(RemotingDiagnostics.java:114)
at hudson.remoting.LocalChannel.call(LocalChannel.java:45)
at 
hudson.util.RemotingDiagnostics.executeGroovy(RemotingDiagnostics.java:111)
at jenkins.model.Jenkins._doScript(Jenkins.java:3599)
at jenkins.model.Jenkins.doScript(Jenkins.java:3571)
at sun.reflect.GeneratedMethodAccessor2227.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at 
org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:298)
at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:161)
at 
org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:96)
at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:121)
at 
org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:649)
at org.kohsuke.stapler.Stapler.service(Stapler.java:238)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
at 
org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:686)
at 
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1494)
at 
hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
at 
net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:202)
at 
net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:180)
at 
net.bull.javamelody.PluginMonitoringFilter.doFilter(PluginMonitoringFilter.java:85)
at 
org.jvnet.hudson.plugins.monitoring.HudsonMonitoringFilter.doFilter(HudsonMonitoringFilter.java:90)
at 
hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:129)
at 
hudson.plugins.audit_trail.AuditTrailFilter.doFilter(AuditTrailFilter.java:66)
at 

Jenkins Code of Conduct

2016-01-08 Thread R. Tyler Croy

In case you don't regularly follow the Jenkins blog or twitter, we now have a
code of conduct: https://jenkins-ci.org/conduct


Some more information about it is in the blog post about it:
https://jenkins-ci.org/blog/2016/01/07/official-code-of-conduct/



Cheers
- R. Tyler Croy

--
 Code: 
  Chatter: 

  % gpg --keyserver keys.gnupg.net --recv-key 3F51E16F
--

-- 
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/20160108171702.GD3475%40blackberry.coupleofllamas.com.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: Digital signature