Re: Archive multiple artifacts with same name

2016-08-23 Thread Sverre Moe
Yes, I am using several stash with different name derived from the slave 
name. This helps me to transfer the artifacts to our repository.

However my problem is with the archive step that makes the artifacts listed 
up in Jenkins.
In project branch job: Last Successful Artifacts 
In each project build: Build Artifacts

If I build an RPM on SLES12 and CentOS7, then that artifact would have the 
same name: project-1.0.0-1.x86_64.rpm
Using the archive step would overwrite the artifact the second time I call 
the archive step for the same named artifact.

tirsdag 23. august 2016 20.53.16 UTC+2 skrev Brian Ray følgende:
>
> Have you looked at the stash step 
> ?
>  
> You can set an arbitrary name, which is how I got around a similar issue.
>
> The only downside is that the artifacts aren't saved with the build. If 
> you need that capability there may be a way to hack that however.
>
> On Thursday, August 11, 2016 at 11:15:31 PM UTC-7, Sverre Moe wrote:
>>
>> As it stands, using archive is useless unless it can be organized by the 
>> node it was built on. Building a single project on multiple linux 
>> distributions will produce the same named file, but not necessary the same.
>>
>> mandag 13. juni 2016 10.14.39 UTC+2 skrev Sverre Moe følgende:
>>>
>>> As I am building on multiple slave nodes I get RPM artifacts from each 
>>> node. Building on 4 64bit Linux OS, I will get 4 distinct artifacts with 
>>> the same name. Using ArtifactArchiver will only archive one of those 
>>> distinct archives and overwrite the previous archived artifact. Considering 
>>> since each OS may have different versions of libraries one single artifact 
>>> may not work on all the OS.
>>>
>>> Is there a way around this problem that will allow me to archive 4 
>>> artifacts with same name?
>>> I am using Jenkins Pipeline and performing the following step
>>> step([$class: 'ArtifactArchiver', artifacts: '*.rpm', excludes: null, 
>>> fingerprint: true, onlyIfSuccessful: true])
>>>
>>> When I was previously using Multi-configuration builds, this was not a 
>>> problem since each configuration would show their own artifacts.
>>>
>>

-- 
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/1762f910-3b5b-4708-bf64-fec954625f94%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


How to best clean up @script directories from using Pipeline

2016-08-23 Thread Leon Poon
We are starting to use the Pipeline plugin, and we noticed that it creates 
additional "@script" directories that do not get deleted 
automatically even when the jobs are deleted. What is the best approach to 
clean up these directories? I tried adding the following "step ([$class: 
'WsCleanup'])" as the last step in Jenkinsfile, but the @script directories are 
still not cleaned up. Any recommendations?

-- 
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/b27435bc-d8a8-4a7c-a4fb-59d363572f9b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Possible regression from JENKINS-32326?

2016-08-23 Thread Tim Downey
Hi Daniel,

Thanks for responding.  A little more research on my part is showing the 
change is occuring when moving from Swarm 2.0 client to Swarm 2.2. 
 Possibly a result of this change in Swarm 2.1.

   - Updating jenkins remoting dependency. Swarm client now matches the 
   jenkins-remoting version in Jenkins-1.625.3 LTS


Basically the issue is that the Swarm client in 2.1+ seems to be taking 
some part of the proxy information from the master and ignoring or 
otherwise mangling the environment variables.  It may be precedent related. 
 With Swarm 2.0 client, I am successfully setting the bash variables for 
http_proxy and no_proxy before launching the client.  In this 
configuration, everything works well.

When using Swarm 2.2, the client seems to be ignoring the bash settings and 
getting proxy settings from somewhere else (I'm assuming the master).  I'm 
not sure if it is getting all of the settings though, since my master has 
proxy settings that include a username and password.  The error that I 
receive leads me to think that the Swarm 2.2 client is getting the proxy 
url and port, but not the username and password creds.

See again from the error highlighted below..

vantage-jenkins-slave_1   | Failing to obtain 
http://X.com/computer/d73296bbedb4-9b67a324/slave-agent.jnlp 

vantage-jenkins-slave_1   | java.io.IOException: Failed to load 
http://X.com/computer/d73296bbedb4-9b67a324/slave-agent.jnlp 
: 407 
Proxy Authentication Required
vantage-jenkins-slave_1   | at 
hudson.remoting.Launcher.parseJnlpArguments(Launcher.java:275)
vantage-jenkins-slave_1   | at 
hudson.plugins.swarm.SwarmClient.connect(SwarmClient.java:275)
vantage-jenkins-slave_1   | at 
hudson.plugins.swarm.Client.run(Client.java:138)
vantage-jenkins-slave_1   | at 
hudson.plugins.swarm.Client.main(Client.java:88)
vantage-jenkins-slave_1   | Waiting 10 seconds before retry

On Tuesday, August 23, 2016 at 3:31:42 PM UTC-4, Daniel Beck wrote:
>
>
> > On 23.08.2016, at 20:31, Tim Downey > 
> wrote: 
> > 
> > Am I understanding correctly that the slave should be picking up the 
> proxy settings from the master?  If so, is it supposed to be picking it up 
> from the preferences in the Manage Plugins panel?  Is it supposed to be 
> somewhere else. 
> > 
>
> Slaves are not supposed to inherit environment variables from master 
> unless explicitly configured that way. I'd check the slave configuration 
> (.bash_profile, /etc/profile, …) for these.

-- 
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/811e187a-f6b4-4ec4-bebe-175e89d3031f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Can security realms be stacked?

2016-08-23 Thread Daniel Beck

> On 23.08.2016, at 21:26, Jeff  wrote:
> 
> Is it possible to fall through and try a different authentication method when 
> the first fails? I'm assuming it's not, as I've yet to find anything in my 
> searches, but I figured I'd ask here.

No.

Tracked as https://issues.jenkins-ci.org/browse/JENKINS-15063 but so far nobody 
implemented 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/4334225B-1640-4259-BC1C-13755D9D7174%40beckweb.net.
For more options, visit https://groups.google.com/d/optout.


Re: Perform administrative actions on user's first authentication?

2016-08-23 Thread Daniel Beck
Should be possible from another plugin listening for 
http://javadoc.jenkins-ci.org/jenkins/security/SecurityListener.html#fireLoggedIn-java.lang.String-

> On 23.08.2016, at 20:43, Jeff  wrote:
> 
> Where would one implement a set of actions that take place the first time a 
> user logs in?
> 
> We'd like to do the following:
>   • User authenticates successfully (Active Directory plug-in)
>   • create a folder for the new user
>   • define a new role (we use the Role-Based Authorization Strategy)
>   • assign the new user to that new role
>   • finally show the user the initially requested page
> If someone could point me in the right development general area, or share 
> ideas, that would be appreciated. Something is telling me we'd have to fork 
> and customize the AD 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/dbec3165-a1ce-430f-86cf-1103f0ca311a%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/9BBC0B10-A8FB-4313-94A2-BFD5702336C4%40beckweb.net.
For more options, visit https://groups.google.com/d/optout.


Re: Possible regression from JENKINS-32326?

2016-08-23 Thread Daniel Beck

> On 23.08.2016, at 20:31, Tim Downey  wrote:
> 
> Am I understanding correctly that the slave should be picking up the proxy 
> settings from the master?  If so, is it supposed to be picking it up from the 
> preferences in the Manage Plugins panel?  Is it supposed to be somewhere else.
> 

Slaves are not supposed to inherit environment variables from master unless 
explicitly configured that way. I'd check the slave configuration 
(.bash_profile, /etc/profile, …) for these.

-- 
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/E0E43A90-D51E-40B8-B319-5379847C1B36%40beckweb.net.
For more options, visit https://groups.google.com/d/optout.


Can security realms be stacked?

2016-08-23 Thread Jeff
Is it possible to fall through and try a different authentication method 
when the first fails? I'm assuming it's not, as I've yet to find anything 
in my searches, but I figured I'd ask here.

-- 
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/aaecc74c-7904-48be-8f0f-606fd4c689b3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Archive multiple artifacts with same name

2016-08-23 Thread Brian Ray
Have you looked at the stash step 
?
 
You can set an arbitrary name, which is how I got around a similar issue.

The only downside is that the artifacts aren't saved with the build. If you 
need that capability there may be a way to hack that however.

On Thursday, August 11, 2016 at 11:15:31 PM UTC-7, Sverre Moe wrote:
>
> As it stands, using archive is useless unless it can be organized by the 
> node it was built on. Building a single project on multiple linux 
> distributions will produce the same named file, but not necessary the same.
>
> mandag 13. juni 2016 10.14.39 UTC+2 skrev Sverre Moe følgende:
>>
>> As I am building on multiple slave nodes I get RPM artifacts from each 
>> node. Building on 4 64bit Linux OS, I will get 4 distinct artifacts with 
>> the same name. Using ArtifactArchiver will only archive one of those 
>> distinct archives and overwrite the previous archived artifact. Considering 
>> since each OS may have different versions of libraries one single artifact 
>> may not work on all the OS.
>>
>> Is there a way around this problem that will allow me to archive 4 
>> artifacts with same name?
>> I am using Jenkins Pipeline and performing the following step
>> step([$class: 'ArtifactArchiver', artifacts: '*.rpm', excludes: null, 
>> fingerprint: true, onlyIfSuccessful: true])
>>
>> When I was previously using Multi-configuration builds, this was not a 
>> problem since each configuration would show their own artifacts.
>>
>

-- 
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/bcb9d384-ae99-4224-a093-8e0cf142550b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins Pipeline Issue

2016-08-23 Thread vishad alekh
Thanks for the reply Mathus.


I have uploaded the JenkinsFile in the repo (GIT) . After running the job i 
am still not getting the desired result . No job is getting created for new 
branch .

The job is just prunning stale remotes and getting remote branches . After that 
its showing success.

Can someone please assist with this.


Thanks and Regards
Vishad Alekh



On Tuesday, August 23, 2016 at 5:16:55 AM UTC+5:30, Baptiste Mathus wrote:
>
> You want to have a look at the Pipeline Multibranch Plugin.
>
> Define a Jenkinsfile in the repo with your build logic. Then each time you 
> create a new branch it will be indexed and built if such a Jenkinsfile can 
> be found.
>
> Cheers
>
> Le 22 août 2016 11:40 PM, "vishad alekh" > 
> a écrit :
>
>> Hi All,
>>
>> I am using jenkins version 2.11 . I want to use jenkins pipeline plugin 
>> feature. We have branches in GIT which are release specific. I want that if 
>> a new branch is created in GIT, then automatically a job should be created 
>> in jenkins which atleast can do a code checkout .
>> Please guide me for the same.
>>
>>
>> Thanks and Regards
>> Vishad
>>
>> -- 
>> 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-use...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/jenkinsci-users/4ed460a3-de32-43c3-b704-07371c165f72%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/6b2498af-c2fa-4f6c-958d-adc15b217de6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Perform administrative actions on user's first authentication?

2016-08-23 Thread Jeff
Where would one implement a set of actions that take place the first time a 
user logs in?

We'd like to do the following:

   1. User authenticates successfully (Active Directory plug-in)
   2. create a folder for the new user
   3. define a new role (we use the Role-Based Authorization Strategy)
   4. assign the new user to that new role
   5. finally show the user the initially requested page

If someone could point me in the right development general area, or share 
ideas, that would be appreciated. Something is telling me we'd have to fork 
and customize the AD 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/dbec3165-a1ce-430f-86cf-1103f0ca311a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Possible regression from JENKINS-32326?

2016-08-23 Thread Tim Downey
Hi,

I just updated my Jenkins to 2.7.2 and am having issues with my slave 
nodes.  From the looks of things, it may be related to JENKINS-32326 
.  I'm hoping someone 
familiar with the issue can either tell me I'm wrong or help me figure out 
the situation.

I'm running a master with multiple slave nodes.  The slave nodes are 
connecting using the Jenkins Swarm client (2.2).  After upgrading to 2.7.2 
my slaves started refusing to connect.  They would receive the following 
error:

vantage-jenkins-slave_1   | Failing to obtain 
http://X.com/computer/d73296bbedb4-9b67a324/slave-agent.jnlp
vantage-jenkins-slave_1   | java.io.IOException: Failed to load 
http://X.com/computer/d73296bbedb4-9b67a324/slave-agent.jnlp: 407 
Proxy Authentication Required
vantage-jenkins-slave_1   | at 
hudson.remoting.Launcher.parseJnlpArguments(Launcher.java:275)
vantage-jenkins-slave_1   | at 
hudson.plugins.swarm.SwarmClient.connect(SwarmClient.java:275)
vantage-jenkins-slave_1   | at 
hudson.plugins.swarm.Client.run(Client.java:138)
vantage-jenkins-slave_1   | at 
hudson.plugins.swarm.Client.main(Client.java:88)
vantage-jenkins-slave_1   | Waiting 10 seconds before retry

The issue seems to be related to proxy settings.  Prior to 2.7.2, my slave 
agents all had bash environment variables for http_proxy, https_proxy, and 
no_proxy all set prior to launch.  As long as these variables were set, I 
am unable to connect my slave to the master.  The issue seems to be 
occurring because the slaves are getting their http_proxy setting from the 
master, but NOT the no proxy settings.  This error is coming from my 
corporate proxy which should not be needed by the slave to connect to the 
master since it is an internal network.

When I changed the slave to not set http_proxy, https_proxy, and no proxy, 
the slaves are able to successfuly connect to the master.  The problem is 
that now slaves are unable to perform npm or bower builds since they are no 
longer using the proxy settings to get to the internet.

Am I understanding correctly that the slave should be picking up the proxy 
settings from the master?  If so, is it supposed to be picking it up from 
the preferences in the Manage Plugins panel?  Is it supposed to be 
somewhere else.

Thankshopefully I'm missing something small here.

Tim

-- 
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/0810541a-becc-4b46-aa26-f9232d005074%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Local Jenkins server redirect to AWS Jenkins server

2016-08-23 Thread Michael Ryan
No proxy or iptable configured for redirect. Tried clearing and setting to 
local server the following:

jenkins.model.JenkinsLocationConfiguration.xml:
 
  

Restarted jenkins (rebooted), no luck. Still redirecting.  :(

Couldn't find any reference to the AWS server anywhere in Jenkins home dir.
Anything else I might look at / try?

Thanks!
- Michael

On Tuesday, August 23, 2016 at 9:56:25 AM UTC-7, Hiteswar kumar wrote:
>
> Check if If there any proxy  or iptable configured for redirecting or 
>  "manage Jenkins -> configure system -> Jenkins URL" has aws URL .
>
> Regards
> hiteswar
>
> On Aug 23, 2559 BE, at 10:08 PM, Michael Ryan  > wrote:
>
> We have a Jenkins instance running on an AWS server that we want to move 
> in house.  The process was to create and configure a local Jenkins 
> instance, verify jobs are executing correctly, then switch to the local 
> Jenkins.  I setup the local instance and configured it. Then it began 
> redirecting the main page to the AWS server.  I point my browser to the 
> local IP:8080 and I get the AWS Jenkins home page.  I don't know how the 
> local Jenkins instance even knows about the AWS instance.  How do I correct 
> this?
>
> All help greatly appreciated.
> - Michael
>
> -- 
> 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-use...@googlegroups.com .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jenkinsci-users/4b29fa6f-fb6e-445f-a228-df6e2ab72fb8%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/9375f469-83c2-464a-a488-e02bad62f4bd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Local Jenkins server redirect to AWS Jenkins server

2016-08-23 Thread Hiteswar
Check if If there any proxy  or iptable configured for redirecting or  "manage 
Jenkins -> configure system -> Jenkins URL" has aws URL .

Regards
hiteswar

> On Aug 23, 2559 BE, at 10:08 PM, Michael Ryan  wrote:
> 
> We have a Jenkins instance running on an AWS server that we want to move in 
> house.  The process was to create and configure a local Jenkins instance, 
> verify jobs are executing correctly, then switch to the local Jenkins.  I 
> setup the local instance and configured it. Then it began redirecting the 
> main page to the AWS server.  I point my browser to the local IP:8080 and I 
> get the AWS Jenkins home page.  I don't know how the local Jenkins instance 
> even knows about the AWS instance.  How do I correct this?
> 
> All help greatly appreciated.
> - Michael
> -- 
> 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/4b29fa6f-fb6e-445f-a228-df6e2ab72fb8%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/882F8E6D-443D-4352-BC2A-A4B38FE2DA46%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Local Jenkins server redirect to AWS Jenkins server

2016-08-23 Thread Michael Ryan
We have a Jenkins instance running on an AWS server that we want to move in 
house.  The process was to create and configure a local Jenkins instance, 
verify jobs are executing correctly, then switch to the local Jenkins.  I 
setup the local instance and configured it. Then it began redirecting the 
main page to the AWS server.  I point my browser to the local IP:8080 and I 
get the AWS Jenkins home page.  I don't know how the local Jenkins instance 
even knows about the AWS instance.  How do I correct this?

All help greatly appreciated.
- Michael

-- 
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/4b29fa6f-fb6e-445f-a228-df6e2ab72fb8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Integrating promoted-builds DSL to a job-dsl-gradle-example project

2016-08-23 Thread Wisen Tanasa
I couldn't get a way to grab the config.xml files nicely from 
jenkinsRule.jenkins.getAllItems(). This is what I ended up doing to get the 
config.xml files. I kind of like this approach as I don't have to handle 
config.xml that are not from Jenkins *Item *e.g. promoted builds generate 
config.xml under job/promotions/promotion-name/config.xml.

@AfterClass
public void exportConfigXml() {
def generatedJobsDirectory = new File(jenkinsRule.instance.root, 'jobs')
def targetDirectory = new File('target')
targetDirectory.mkdir()

FileUtils.copyDirectory(generatedJobsDirectory, targetDirectory,
new OrFileFilter([DirectoryFileFilter.INSTANCE, new 
NameFileFilter('config.xml')]))
}


On Saturday, June 18, 2016 at 5:49:54 PM UTC+1, Thomas Zoratto wrote:
>
> Hello, 
>
> I came up with a solution that doesn’t involve overwriting class, subclass 
> etc.
>
> You just have to use the JenkinsRule object in your test in order to use 
> the API of the running Jenkins instance.
>
> e.g. jenkinsRule.jenkins.getAllItems()…
>
> Then you can retrieve the config.xml generated for each job/view. Tested 
> here and it works.
>
> But I have good news for you, JenkinsJobManagement is no longer final 
> thanks to a recent commit (see 
> https://github.com/jenkinsci/job-dsl-plugin/commit/930aa4818a3ff74494696b14c241a521bc75c0a9).
>  
> We have to wait for the next release though.
>
> Le 7 juin 2016 à 17:20, François Genois  > a écrit :
>
> Information for all (and for Thomas) :
>
> I was able to output the XML files in a not-clean-not-proud way :
> I copied the JenkinsJobManagement file (to remove the 'final' keyword from 
> it that class) and I subclassed it as MemoryJobManagement subclasses 
> MockJobManagement.
> I needed to add logging logic to some of the calls of JenkinsJobManagement 
> (wraping JenkinsJobManagement would have been very unpleasant, but 
> subclassing it is really pretty)
> Anyway, here is an example outputting XML if you run 'gradlew test'.
>
> https://github.com/franknarf8/job-dsl-gradle-example/tree/03524daa83851a544106cc514591026a99f3ee64
>
> Thanks again and have a nice day!
>
> - Frank
>
>
> On Wednesday, June 1, 2016 at 5:04:27 PM UTC-4, François Genois wrote:
>>
>> Ok, I'm pretty much in the same situation over here. Alright, I'm looking 
>> forward your advancement on this issue; I'll keep you updated if I find 
>> anything.
>>
>> Thanks again!
>>
>> - Frank
>>
>> On Wed, Jun 1, 2016 at 3:40 PM Thomas Zoratto > > wrote:
>>
>>> Right now I can’t see a way to do this but my knowledge on this topic is 
>>> very limited. I also have to work on it soon so I’ll let you know if I find 
>>> a way (and if you still don’t have the answer).
>>>
>>> Please share your progress, if any 
>>>
>>> Good luck !
>>>
>>> Thomas
>>>
>>>
>>> Le 1 juin 2016 à 20:35, François Genois >> > a écrit :
>>>
>>> Hello Thomas,
>>>
>>> Thank you very much for your answer.
>>> The promoted builds plugin is indeed a extension point.
>>>
>>> I added the following line to my dependencies "testCompile 
>>> 'org.jenkins-ci.plugins:promoted-builds:2.27@jar'" and my 'gradlew test' 
>>> command now succeeds.
>>>
>>> I just tried applying the same logic to the 'debugXml' gradle task (I 
>>> use the XML to verify if I haven't done any regression during refactoring), 
>>> but I can't figure out how to make this code run in a context running an 
>>> instance of the promoted-builds plugin.
>>>
>>> Do you have an idea of how I could get the XML generated from the 
>>> scripts?
>>>
>>> Thank you again and have a nice day!
>>>
>>> - Frank
>>>
>>>
>>> On Wednesday, June 1, 2016 at 12:20:01 PM UTC-4, Thomas Zoratto wrote:

 Hello Frank, 

 I guess the promoted builds plugin is not directly compatible with the 
 job DSL plugin. I mean you can’t find DSL methods relative to the promoted 
 builds plugin in the online API 
 https://github.com/franknarf8/job-dsl-gradle-example/commit/f15b7fbf698d7be29b8527043d8649ab15559842
 . 

 I think the job DSL plugin must use the extension point when in the 
 context of a running instance with the promoted builds plugin installed.

 Though, I suppose you can test it locally thanks to the last updates of 
 sheehan's github repo. See 
 https://github.com/sheehan/job-dsl-gradle-example/commit/9d6260b44cefdd832ee3f854f107b24f15881ea7.
  
 You’ll have to specify the plugins you have in your running instance in 
 order to simulate a similar environment for your local tests.

 sorry for my poor English !

 Thomas

 Le 1 juin 2016 à 16:36, François Genois  a écrit 
 :

 Good morning everyone,

 I'm currently using a project based on 
 https://github.com/sheehan/job-dsl-gradle-example and I am trying to 
 get the promoted-builds plugin to work with this project (
 https://wiki.jenkins-ci.org/display/JENKINS/Promoted+Builds+Plugin).

 Everything works fine on my Jenkins

Multi-branch pipeline questions.

2016-08-23 Thread Qazwart
I’m just starting to use Multi-branch pipelines. Here are some questions I have:

* Multi-branch pipelines don’t seem to automatically build when the repository 
changes. We are looking at a Subversion repo. I don’t see where we can specify 
that in the multi-pipeline configuration. In non-pipeline builds, there’s an 
area in the configuration screen. I see in the configuration in individual 
“branches”, but there’s no “Save” button”.

* I don’t see a way to browse the workspace in Jenkins. In all other builds, 
there’s a “workspace” link where I can see the files in the workspace and even 
delete the workspace if it’s causing build problems.

* In 
https://github.com/jenkinsci/workflow-cps-global-lib-plugin/blob/master/README.md
 
,
 it refers to a Git repository that’s inside of the Jenkins server. Is this 
correct? If I get to Jenkins via “http://jenkins.vegicorp.com/jenkins 
” (and SSHD is set to port 16022) Does 
that mean I access the repo as:

$ git clone 
ssh://qazw...@jenkins.vegicorp.com:16022/jenkins/workflowLibs.git

Or, on the Jenkins server itself:

$ git clone ssh://qazwart@localhost:16022/jenkins/workflowLibs.git

Is this correct? Will proxies cause an issue?

I haven’t been able to access the repo either remotely or locally.

Thanks,




David Weintraub
qazw...@gmail.com

-- 
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/935318C6-EA91-44A1-8235-1599B9E2B810%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Using HTTP Request plugin to remote control an IDE

2016-08-23 Thread Amaury Laurent
Hi,

I'm trying to implement your suggestion. Pipeline plugin is really awesome!
I stil have some exception problems but it looks good!

By the way, I plan to make a small diagram to explain my project and its 
architecture.

Thank you for your help.

Regards, Amaury.

Le vendredi 12 août 2016 13:58:06 UTC+2, Martin d'Anjou a écrit :
>
> Sounds like you need to implement a couple of polling loops (a loop to 
> wait for the builder, a loop to query the status). I would do that in the 
> Pipeline DSL. That would be easier than modifying the plugin. For example:
>
> def response = httpRequest 'http://localhost:8080/'
> while (response.status != 200) {
> sleep 5
> response = httpRequest 'http://localhost:8080/'
> }
> // do something with the reponse
> println(response)
>
> // trigger another jenkins job
> build('otherJob')
>
>
> I do not know what you mean by "trigger a build". There is the Pipeline 
> DSL build() step which calls anothere jenkins job (
> https://jenkins.io/doc/pipeline/steps/workflow-support/#build-build-a-job), 
> but I am not sure if this is what you mean.
>
> Martin
>
> On Friday, August 12, 2016 at 3:39:32 AM UTC-4, Amaury Laurent wrote:
>>
>> Hi everyone,
>>  
>> I'm interested in using HTTP Request Plugin to remotely control our 
>> development environment.
>>
>> My objectives are:
>> 1-Waiting for my builder to start (maybe in Build Environment section of 
>> Jenkins)
>> 2-Trigger a build remotely
>> 3-Periodically query its status
>> 4-Retrieve build results from the server
>>  
>> Do you think possible to slightly modify the plugin to make it poll a web 
>> server until it gives the correct response ?
>> Will it be difficult to do (I'm not very experienced in Java development) 
>> ?
>>
>> Regards, Amaury LAURENT.
>>
>

-- 
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/7e5aceaa-8045-4f20-9f3e-a4d36874bb05%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ANN] - Incoming Jenkins Online Meetups (Aug 25 and Sep 6)

2016-08-23 Thread Oleg Nenashev
Hi,

Just in case you have not started following Jenkins Online Meetup
 yet. We are going to have
two online meetups soon:

   - *Aug 25, 6PM UTC* - GSoC Presentations by students
  - Alexandru Somai and Samat Davletshin will talk about their Google
  Summer of Code 2016 projects. In particular, External Workspace
  Manager Plugin
   for
  Pipeline and Help Editor Plugin
  
  - Meetup page
  
  - *Sep 6, 6PM UTC *- Plugin Development - Web UI
  - Daniel Beck and Tom Fennelly will talk about Classic Jenkins Web UI
  framework (Stapler, Jelly, etc.) and the new UI development approaches
  based on JavaScript stack
  - Meetup Page
  

All meetings will be conducted via Hangouts on Air, so you can listen the
meetup online on YouTube and ask your questions there.

Looking forward to see you at the meetup! If you would like to present
something, please let us know as well.

BR, Oleg Nenashev

-- 
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/CAPfivLAfBb%2BFWtmtpxE-Pxo5WnDF6n0Y6rKAGS-JV9ffqn3i_Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Multi-configuration project fails to load after Jenkins 2 upgrade

2016-08-23 Thread Gavin Williams
Ah, actually, apologies, I got this issue mixed up with another one I'm 
currently having... 

Yes, there is an error in the logs for the Multi-Configuration project. 

Aug 23, 2016 3:59:58 PM jenkins.InitReactorRunner$1 onTaskFailed
> SEVERE: Failed Loading job Microservice_Matrix_Unit
> java.lang.NullPointerException
> at 
> hudson.matrix.MatrixProject.createTransientActions(MatrixProject.java:450)
> at 
> hudson.model.AbstractProject.updateTransientActions(AbstractProject.java:755)
> at 
> hudson.matrix.MatrixProject.updateTransientActions(MatrixProject.java:460)
> at hudson.model.AbstractProject.onLoad(AbstractProject.java:339)
> at hudson.matrix.MatrixProject.onLoad(MatrixProject.java:501)
> at hudson.model.Items.load(Items.java:333)
> at jenkins.model.Jenkins$17.run(Jenkins.java:2823)
> at 
> org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
> at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:282)
> at jenkins.model.Jenkins$7.runTask(Jenkins.java:998)
> at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:210)
> at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> at java.lang.Thread.run(Thread.java:745)


I've just ditched the Project config unfortunately though, so let me see if 
I can re-create... 

Cheers
Gavin  

On Tuesday, 23 August 2016 16:20:36 UTC+1, Gavin Williams wrote:
>
> Daniel
>
> An example config.xml is here: 
> https://gist.github.com/fatmcgav/19660174fed68f9df6c70797f079bc72
>
> Nothing obvious in the logs, and some complaints about 'Unreadable Data'. 
> A couple of lines corresponding to this project:
>
>> hudson.model.FreeStyleProject Unit_4 NoSuchMethodError: 
>> org.jruby.RubyClass.getVariableAccessorForWrite(Ljava/lang/String;)Lorg/jruby/RubyClass$VariableAccessor;,
>>  
>> InstantiationError: null, MissingFieldException: No field 'pluginid' found 
>> in class 'hudson.model.FreeStyleProject'
>> hudson.model.FreeStyleProject Unit_4 NoSuchMethodError: 
>> org.jruby.RubyClass.getVariableAccessorForWrite(Ljava/lang/String;)Lorg/jruby/RubyClass$VariableAccessor;,
>>  
>> InstantiationError: null, MissingFieldException: No field 'pluginid' found 
>> in class 'hudson.model.FreeStyleProject'
>
>
> From a plugins POV, I'm using:
> * RVM
> * Build Name Setter
> * EnvInjector
> * Git
>
> Plus a few others that probably aren't relevant.. 
>
> Cheers
> Gavin 
>
> On Tuesday, 23 August 2016 16:03:38 UTC+1, Daniel Beck wrote:
>>
>> Please provide the config.xml of the affected job. It seems to be 
>> invalid. 
>>
>> Maybe a plugin is failing to load. Anything in the logs, or on /manage? 
>>
>> > On 23.08.2016, at 15:37, Gavin Williams  wrote: 
>> > 
>> > The latest occurrence on a fresh install with latest of everything is: 
>> > * Jenkins: 2.7.2 
>> > * Matrix Project plugin: 1.7.1 
>> > 
>> > Cheers 
>> > Gavin 
>> > 
>> > On Tuesday, 23 August 2016 13:01:05 UTC+1, Daniel Beck wrote: 
>> > What versions of Jenkins and the Matrix Project plugin is this? 
>> > 
>> > > On 23.08.2016, at 13:54, Gavin Williams  wrote: 
>> > > 
>> > > Just to confirm, I hit exactly the same error on a fresh Jenkins 2 
>> installation... 
>> > > 
>> > > Anyone hit anything similar? 
>> > > 
>> > > Cheers 
>> > > Gavin 
>> > > 
>> > > On Friday, 19 August 2016 17:21:44 UTC+1, Gavin Williams wrote: 
>> > > Afternoon all 
>> > > 
>> > > I've just upgraded one of our Jenkins hosts from 1.6 to 2.18, and 
>> unfortunately it appears to have broken some of our Multi-configuration 
>> projects. 
>> > > 
>> > > Upon restarting Jenkins, the following is logged: 
>> > > SEVERE: Failed Loading job Microservice_Matrix_Unit 
>> > > java.lang.NullPointerException 
>> > > at 
>> hudson.matrix.MatrixProject.createTransientActions(MatrixProject.java:450) 
>> > > at 
>> hudson.model.AbstractProject.updateTransientActions(AbstractProject.java:756)
>>  
>>
>> > > at 
>> hudson.matrix.MatrixProject.updateTransientActions(MatrixProject.java:460) 
>> > > at 
>> hudson.model.AbstractProject.onLoad(AbstractProject.java:340) 
>> > > at hudson.matrix.MatrixProject.onLoad(MatrixProject.java:501) 
>> > > at hudson.model.Items.load(Items.java:333) 
>> > > at jenkins.model.Jenkins$17.run(Jenkins.java:2942) 
>> > > at 
>> org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
>>  
>>
>> > > at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:282) 
>> > > at jenkins.model.Jenkins$7.runTask(Jenkins.java:1026) 
>> > > at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:210) 
>> > > at 
>> org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117) 
>> > > at 
>> java.u

Re: Multi-configuration project fails to load after Jenkins 2 upgrade

2016-08-23 Thread Gavin Williams
Daniel

An example config.xml is 
here: https://gist.github.com/fatmcgav/19660174fed68f9df6c70797f079bc72

Nothing obvious in the logs, and some complaints about 'Unreadable Data'. 
A couple of lines corresponding to this project:

> hudson.model.FreeStyleProject Unit_4 NoSuchMethodError: 
> org.jruby.RubyClass.getVariableAccessorForWrite(Ljava/lang/String;)Lorg/jruby/RubyClass$VariableAccessor;,
>  
> InstantiationError: null, MissingFieldException: No field 'pluginid' found 
> in class 'hudson.model.FreeStyleProject'
> hudson.model.FreeStyleProject Unit_4 NoSuchMethodError: 
> org.jruby.RubyClass.getVariableAccessorForWrite(Ljava/lang/String;)Lorg/jruby/RubyClass$VariableAccessor;,
>  
> InstantiationError: null, MissingFieldException: No field 'pluginid' found 
> in class 'hudson.model.FreeStyleProject'


>From a plugins POV, I'm using:
* RVM
* Build Name Setter
* EnvInjector
* Git

Plus a few others that probably aren't relevant.. 

Cheers
Gavin 

On Tuesday, 23 August 2016 16:03:38 UTC+1, Daniel Beck wrote:
>
> Please provide the config.xml of the affected job. It seems to be invalid. 
>
> Maybe a plugin is failing to load. Anything in the logs, or on /manage? 
>
> > On 23.08.2016, at 15:37, Gavin Williams > 
> wrote: 
> > 
> > The latest occurrence on a fresh install with latest of everything is: 
> > * Jenkins: 2.7.2 
> > * Matrix Project plugin: 1.7.1 
> > 
> > Cheers 
> > Gavin 
> > 
> > On Tuesday, 23 August 2016 13:01:05 UTC+1, Daniel Beck wrote: 
> > What versions of Jenkins and the Matrix Project plugin is this? 
> > 
> > > On 23.08.2016, at 13:54, Gavin Williams  wrote: 
> > > 
> > > Just to confirm, I hit exactly the same error on a fresh Jenkins 2 
> installation... 
> > > 
> > > Anyone hit anything similar? 
> > > 
> > > Cheers 
> > > Gavin 
> > > 
> > > On Friday, 19 August 2016 17:21:44 UTC+1, Gavin Williams wrote: 
> > > Afternoon all 
> > > 
> > > I've just upgraded one of our Jenkins hosts from 1.6 to 2.18, and 
> unfortunately it appears to have broken some of our Multi-configuration 
> projects. 
> > > 
> > > Upon restarting Jenkins, the following is logged: 
> > > SEVERE: Failed Loading job Microservice_Matrix_Unit 
> > > java.lang.NullPointerException 
> > > at 
> hudson.matrix.MatrixProject.createTransientActions(MatrixProject.java:450) 
> > > at 
> hudson.model.AbstractProject.updateTransientActions(AbstractProject.java:756) 
>
> > > at 
> hudson.matrix.MatrixProject.updateTransientActions(MatrixProject.java:460) 
> > > at 
> hudson.model.AbstractProject.onLoad(AbstractProject.java:340) 
> > > at hudson.matrix.MatrixProject.onLoad(MatrixProject.java:501) 
> > > at hudson.model.Items.load(Items.java:333) 
> > > at jenkins.model.Jenkins$17.run(Jenkins.java:2942) 
> > > at 
> org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
>  
>
> > > at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:282) 
> > > at jenkins.model.Jenkins$7.runTask(Jenkins.java:1026) 
> > > at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:210) 
> > > at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117) 
> > > at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>  
>
> > > at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>  
>
> > > at java.lang.Thread.run(Thread.java:745) 
> > > 
> > > I've not found anything of any use whilst googling... 
> > > 
> > > Any ideas on how I can fix the jobs? 
> > > 
> > > Regards 
> > > Gavin   
> > > 
> > > -- 
> > > 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-use...@googlegroups.com. 
> > > To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jenkinsci-users/28dbe048-73e8-43e2-b9fe-7b98e0bf2703%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-use...@googlegroups.com . 
> > To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jenkinsci-users/5b833923-593d-4817-8f1b-85ad187f6722%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/f1775a60-d66d-4817-b2eb-541e946dbbeb%40googlegroups.com.
For more options, visit https:

Re: Multi-configuration project fails to load after Jenkins 2 upgrade

2016-08-23 Thread Daniel Beck
Please provide the config.xml of the affected job. It seems to be invalid.

Maybe a plugin is failing to load. Anything in the logs, or on /manage?

> On 23.08.2016, at 15:37, Gavin Williams  wrote:
> 
> The latest occurrence on a fresh install with latest of everything is:
> * Jenkins: 2.7.2
> * Matrix Project plugin: 1.7.1
> 
> Cheers
> Gavin 
> 
> On Tuesday, 23 August 2016 13:01:05 UTC+1, Daniel Beck wrote:
> What versions of Jenkins and the Matrix Project plugin is this? 
> 
> > On 23.08.2016, at 13:54, Gavin Williams  wrote: 
> > 
> > Just to confirm, I hit exactly the same error on a fresh Jenkins 2 
> > installation... 
> > 
> > Anyone hit anything similar? 
> > 
> > Cheers 
> > Gavin 
> > 
> > On Friday, 19 August 2016 17:21:44 UTC+1, Gavin Williams wrote: 
> > Afternoon all 
> > 
> > I've just upgraded one of our Jenkins hosts from 1.6 to 2.18, and 
> > unfortunately it appears to have broken some of our Multi-configuration 
> > projects. 
> > 
> > Upon restarting Jenkins, the following is logged: 
> > SEVERE: Failed Loading job Microservice_Matrix_Unit 
> > java.lang.NullPointerException 
> > at 
> > hudson.matrix.MatrixProject.createTransientActions(MatrixProject.java:450) 
> > at 
> > hudson.model.AbstractProject.updateTransientActions(AbstractProject.java:756)
> >  
> > at 
> > hudson.matrix.MatrixProject.updateTransientActions(MatrixProject.java:460) 
> > at hudson.model.AbstractProject.onLoad(AbstractProject.java:340) 
> > at hudson.matrix.MatrixProject.onLoad(MatrixProject.java:501) 
> > at hudson.model.Items.load(Items.java:333) 
> > at jenkins.model.Jenkins$17.run(Jenkins.java:2942) 
> > at 
> > org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
> >  
> > at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:282) 
> > at jenkins.model.Jenkins$7.runTask(Jenkins.java:1026) 
> > at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:210) 
> > at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117) 
> > at 
> > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> >  
> > at 
> > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> >  
> > at java.lang.Thread.run(Thread.java:745) 
> > 
> > I've not found anything of any use whilst googling... 
> > 
> > Any ideas on how I can fix the jobs? 
> > 
> > Regards 
> > Gavin   
> > 
> > -- 
> > 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-use...@googlegroups.com. 
> > To view this discussion on the web visit 
> > https://groups.google.com/d/msgid/jenkinsci-users/28dbe048-73e8-43e2-b9fe-7b98e0bf2703%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/5b833923-593d-4817-8f1b-85ad187f6722%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/12CD3E1C-383C-4006-9260-45A840920D4C%40beckweb.net.
For more options, visit https://groups.google.com/d/optout.


Re: Unreadable data for build wrappers

2016-08-23 Thread Gavin Williams
Not that it helps you Morten, but I've just been hit by the same issue with 
RVM and Build-Name-Setter. 

Following a restart, the UI and Jenkins dis-regards any config settings, 
even though the build config.xml looks correct... 

I really don't want to have to fettle 20+ jobs every time I have to restart 
Jenkins... 

Anyone have any ideas?

Env is Jenkins 2.7.2 with latest plugins across the board. 

Cheers
Gavin 

On Tuesday, 23 August 2016 14:50:18 UTC+1, Morten Gregersen wrote:
>
> We've been using the RVM and ANSI color plugins for several months now. 
> Suddenly they stopped working after a restart of Jenkins.
>
> We generate new jobs from a config.xml template:
> 
> 
>   
>   
>   DISPLAY_NAME
>   false
>   
>   
> 2
> 
>   
> https://server/my_repo.git
> Nice GUUID
>   
> 
> 
>   
> */master
>   
> 
> 
> false
> 
> 
>   
>   true
>   false
>   
> false
>   false
>   
> 
>   */10 5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,0,1 * 
> * *
> 
>   
>   false
>   
> 
>   ./my_script.rb PRODUCT PLATFORM
> 
>   
>   
> 
>   te...@example.com 
>   false
>   false
> 
>   
>   
>  plugin="ansicolor@0.4.2">
>   xterm
> 
> 
>pluginid="rvm">
> rvm
> 
>   2.3.0
> 
>   
> 
>   
> 
>
> When I *Reload Configuration from Disk* in *Manage Jenkins* I get a *You 
> have data stored in an older format and/or unreadable data.*
>
> In the *Manage Old Data* I see the following *Unreadable Data*:
> TypeNameError
> hudson.model.FreeStyleProject MyJob NoSuchMethodError: 
> org.jruby.RubyClass.getVariableAccessorForWrite(Ljava/lang/String;)Lorg/jruby/RubyClass$VariableAccessor;,
>  
> MissingFieldException: No field 'impl' found in class 'java.lang.Object', 
> InstantiationError: null
> In the job configuration the checkmark and value for *Color ANSI Console 
> Output *and *Run the build in a RVM-managed environment* are empty and 
> not set.
>
> I tried to discard the unreadable data. Then I tick on the two properties 
> and set the value to the same as in the config.xml and save. Then the 
> config.xml is exactly the same as before I discarded the unreadable data.
>
> When I *Reload Configuration from Disk* in *Manage Jenkins* I get a the *You 
> have data stored in an older format and/or unreadable data* again.
>
> How do I get Jenkins to read my configuration correctly again?
>
> I use Jenkins 2.19 via Jenkins.app  on 
> Mac OS X 10.11.6 with the newest RVM and ANSI color plugins.
>

-- 
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/6864ee4d-7cff-4c0e-b19e-d865b49ac7bb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Unreadable data for build wrappers

2016-08-23 Thread Morten Gregersen
We've been using the RVM and ANSI color plugins for several months now. 
Suddenly they stopped working after a restart of Jenkins.

We generate new jobs from a config.xml template:


  
  
  DISPLAY_NAME
  false
  
  
2

  
https://server/my_repo.git
Nice GUUID
  


  
*/master
  


false


  
  true
  false
  false
  false
  

  */10 5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,0,1 * 
* *

  
  false
  

  ./my_script.rb PRODUCT PLATFORM

  
  

  t...@example.com
  false
  false

  
  

  xterm


  
rvm

  2.3.0

  

  


When I *Reload Configuration from Disk* in *Manage Jenkins* I get a *You 
have data stored in an older format and/or unreadable data.*

In the *Manage Old Data* I see the following *Unreadable Data*:
TypeNameError
hudson.model.FreeStyleProject MyJob NoSuchMethodError: 
org.jruby.RubyClass.getVariableAccessorForWrite(Ljava/lang/String;)Lorg/jruby/RubyClass$VariableAccessor;,
 
MissingFieldException: No field 'impl' found in class 'java.lang.Object', 
InstantiationError: null
In the job configuration the checkmark and value for *Color ANSI Console 
Output *and *Run the build in a RVM-managed environment* are empty and not 
set.

I tried to discard the unreadable data. Then I tick on the two properties 
and set the value to the same as in the config.xml and save. Then the 
config.xml is exactly the same as before I discarded the unreadable data.

When I *Reload Configuration from Disk* in *Manage Jenkins* I get a the *You 
have data stored in an older format and/or unreadable data* again.

How do I get Jenkins to read my configuration correctly again?

I use Jenkins 2.19 via Jenkins.app  on 
Mac OS X 10.11.6 with the newest RVM and ANSI color plugins.

-- 
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/a62b4434-a239-44fd-941f-909af66eba06%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


monitor local system load for scheduling and/or co-exist with LSF?

2016-08-23 Thread Jonathan
Does Jenkins have any concept of local system load on it's slaves/permanent 
agents for scheduling?  I know by default it favors the last executor for a 
job.  I've looked at the Least-Load plugin too, but it seems like it only 
knows about the number of defined executors available regardless of any 
other local jobs that may be running.  Is it intended that permanent agents 
are used exclusively by Jenkins?

I have seen some people mention using users' workstations as extra 
executors, but other than limiting number of jobs it doesn't seem like a 
good idea.

In my case (I'm in digital hardware design, not software), we have 
dedicated servers to run large jobs, but as I'm exploring Jenkins I can't 
segregate a machine exclusively for Jenkins and don't foresee others 
adopting this strategy for a long while.  We actually have LSF for 
scheduling, but it's not enforced so people often login to these machines 
directly.  That's a whole other topic for discussion, but at least it's 
scheduling algorithm takes into account system load and resources not just 
slots.  I've tried the LSF cloud plugin, but I don't think it aligns with 
our setup as I don't have to login to a specific machine with a different 
user to submit jobs or pre-transfer files.  We have a shared network 
filesystem so everything can be available to all hosts.  I can also add LSF 
hosts as permanent agents, but if Jenkins can't otherwise know a machine is 
fully booked up outside of it's control there's no way they should co-exist 
(but this is similar to sharing users' workstations which is why I 
mentioned above).  My last resort is to just call LSF 'bsub' (maybe write a 
groovy script wrapper function) as part of each stage's shell command that 
just adds complexity to the script though.

-- 
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/10101dd6-aaad-48a5-abaa-a04991de6a4e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Multi-configuration project fails to load after Jenkins 2 upgrade

2016-08-23 Thread Gavin Williams
The latest occurrence on a fresh install with latest of everything is:
* Jenkins: 2.7.2
* Matrix Project plugin: 1.7.1

Cheers
Gavin 

On Tuesday, 23 August 2016 13:01:05 UTC+1, Daniel Beck wrote:
>
> What versions of Jenkins and the Matrix Project plugin is this? 
>
> > On 23.08.2016, at 13:54, Gavin Williams > 
> wrote: 
> > 
> > Just to confirm, I hit exactly the same error on a fresh Jenkins 2 
> installation... 
> > 
> > Anyone hit anything similar? 
> > 
> > Cheers 
> > Gavin 
> > 
> > On Friday, 19 August 2016 17:21:44 UTC+1, Gavin Williams wrote: 
> > Afternoon all 
> > 
> > I've just upgraded one of our Jenkins hosts from 1.6 to 2.18, and 
> unfortunately it appears to have broken some of our Multi-configuration 
> projects. 
> > 
> > Upon restarting Jenkins, the following is logged: 
> > SEVERE: Failed Loading job Microservice_Matrix_Unit 
> > java.lang.NullPointerException 
> > at 
> hudson.matrix.MatrixProject.createTransientActions(MatrixProject.java:450) 
> > at 
> hudson.model.AbstractProject.updateTransientActions(AbstractProject.java:756) 
>
> > at 
> hudson.matrix.MatrixProject.updateTransientActions(MatrixProject.java:460) 
> > at hudson.model.AbstractProject.onLoad(AbstractProject.java:340) 
> > at hudson.matrix.MatrixProject.onLoad(MatrixProject.java:501) 
> > at hudson.model.Items.load(Items.java:333) 
> > at jenkins.model.Jenkins$17.run(Jenkins.java:2942) 
> > at 
> org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
>  
>
> > at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:282) 
> > at jenkins.model.Jenkins$7.runTask(Jenkins.java:1026) 
> > at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:210) 
> > at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117) 
> > at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>  
>
> > at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>  
>
> > at java.lang.Thread.run(Thread.java:745) 
> > 
> > I've not found anything of any use whilst googling... 
> > 
> > Any ideas on how I can fix the jobs? 
> > 
> > Regards 
> > Gavin   
> > 
> > -- 
> > 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-use...@googlegroups.com . 
> > To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jenkinsci-users/28dbe048-73e8-43e2-b9fe-7b98e0bf2703%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/5b833923-593d-4817-8f1b-85ad187f6722%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Multi-configuration project fails to load after Jenkins 2 upgrade

2016-08-23 Thread Daniel Beck
What versions of Jenkins and the Matrix Project plugin is this?

> On 23.08.2016, at 13:54, Gavin Williams  wrote:
> 
> Just to confirm, I hit exactly the same error on a fresh Jenkins 2 
> installation... 
> 
> Anyone hit anything similar?
> 
> Cheers
> Gavin 
> 
> On Friday, 19 August 2016 17:21:44 UTC+1, Gavin Williams wrote:
> Afternoon all
> 
> I've just upgraded one of our Jenkins hosts from 1.6 to 2.18, and 
> unfortunately it appears to have broken some of our Multi-configuration 
> projects. 
> 
> Upon restarting Jenkins, the following is logged:
> SEVERE: Failed Loading job Microservice_Matrix_Unit
> java.lang.NullPointerException
> at 
> hudson.matrix.MatrixProject.createTransientActions(MatrixProject.java:450)
> at 
> hudson.model.AbstractProject.updateTransientActions(AbstractProject.java:756)
> at 
> hudson.matrix.MatrixProject.updateTransientActions(MatrixProject.java:460)
> at hudson.model.AbstractProject.onLoad(AbstractProject.java:340)
> at hudson.matrix.MatrixProject.onLoad(MatrixProject.java:501)
> at hudson.model.Items.load(Items.java:333)
> at jenkins.model.Jenkins$17.run(Jenkins.java:2942)
> at 
> org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
> at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:282)
> at jenkins.model.Jenkins$7.runTask(Jenkins.java:1026)
> at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:210)
> at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> at java.lang.Thread.run(Thread.java:745)
> 
> I've not found anything of any use whilst googling... 
> 
> Any ideas on how I can fix the jobs?
> 
> Regards
> Gavin  
> 
> -- 
> 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/28dbe048-73e8-43e2-b9fe-7b98e0bf2703%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/8E28F0FC-64D9-4F6C-9B32-9240B8F9E19A%40beckweb.net.
For more options, visit https://groups.google.com/d/optout.


Re: Multi-configuration project fails to load after Jenkins 2 upgrade

2016-08-23 Thread Gavin Williams
Just to confirm, I hit exactly the same error on a fresh Jenkins 2 
installation... 

Anyone hit anything similar?

Cheers
Gavin 

On Friday, 19 August 2016 17:21:44 UTC+1, Gavin Williams wrote:
>
> Afternoon all
>
> I've just upgraded one of our Jenkins hosts from 1.6 to 2.18, and 
> unfortunately it appears to have broken some of our Multi-configuration 
> projects. 
>
> Upon restarting Jenkins, the following is logged:
>
>> SEVERE: Failed Loading job Microservice_Matrix_Unit
>> java.lang.NullPointerException
>> at 
>> hudson.matrix.MatrixProject.createTransientActions(MatrixProject.java:450)
>> at 
>> hudson.model.AbstractProject.updateTransientActions(AbstractProject.java:756)
>> at 
>> hudson.matrix.MatrixProject.updateTransientActions(MatrixProject.java:460)
>> at hudson.model.AbstractProject.onLoad(AbstractProject.java:340)
>> at hudson.matrix.MatrixProject.onLoad(MatrixProject.java:501)
>> at hudson.model.Items.load(Items.java:333)
>> at jenkins.model.Jenkins$17.run(Jenkins.java:2942)
>> at 
>> org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
>> at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:282)
>> at jenkins.model.Jenkins$7.runTask(Jenkins.java:1026)
>> at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:210)
>> at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
>> at 
>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>> at 
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>> at java.lang.Thread.run(Thread.java:745)
>
>
> I've not found anything of any use whilst googling... 
>
> Any ideas on how I can fix the jobs?
>
> Regards
> Gavin  
>

-- 
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/28dbe048-73e8-43e2-b9fe-7b98e0bf2703%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins Pipeline: input step filled via remote script/curl

2016-08-23 Thread Miłosz Tyborowski
Hello.

I managed to resolve this issue.

Hoping that someone else will benefit from my answer, let me explain how I 
achieved OPs target.

All that Jenkis Pipeline input step needs is a properly formatted JSON and 
OK button caption sent to the right URL. 

So, the proper syntax is:

curl -X POST -H "Jenkins-Crumb:${JENKINS_CRUMB}" -d json='{"parameter": 
{"name": "${PARAMETER_NAME}", "value": "${PARAMETER_VALUE}"}}' -d proceed=
'${SUBMIT_CAPTION}' 
'http://j${JENKINS_URL}/job/${JOB_NAME}/${BUILD_ID}/input/${INPUT_ID}/submit'

Best regards,
Miłosz Tyborowski

W dniu czwartek, 18 sierpnia 2016 14:44:42 UTC+2 użytkownik Miłosz 
Tyborowski napisał:
>
> Hello everyone.
>
> Recently I have been testing Jenkins Pipeline. So far it seems like a 
> wonderful idea, however as beautiful as it looks I run into a problem, a 
> deal-breaker for me as it turns out. 
>
> I have Jenkins pipeline with an Input step, and I would like to submit 
> this input(single string argument) via a script. 
>
> So far I am trying with curl, ideally I'll be sending it via Python 
> requests library. This should be an easy POST request, however with CSRF it 
> becomes tricky. I've obtained Jenkins-Crumb (using curl in this case, from 
> the same machine and same bash session), but still can't send the content...
>
> I'm sending 
> Jenkins-Crumb:XXX header
>
> just like it is explained at 
> https://wiki.jenkins-ci.org/display/JENKINS/Remote+access+API
>
> my request looks like this:
>
> curl -vvv -X POST -H "Jenkins-Crumb:${JENKINS_CRUMB}" -d 
> 'json="{"parameter":{"name":"${PARAM_NAME}","value":"asd"},"Jenkins-Crumb":"${JENKINS_CRUMB}"}"'
>  
> 'http://${JENKINS_URL}/job/${JOB_NAME}/${BUILD_NR}/input/' 
>
>
>
> I have also tried using 
> --form json=
> '{"parameter":{"name":"result_payload","value":"asd"},"Jenkins-Crumb":"${JENKINS_CRUMB}"}'
>
>
> None of which succeeded.
>
> The URL I'm POSTing at is the same, as the one linked in build log 
> (Console output):
> http://${JENKINS_URL}/job/${JOB_NAME}/${BUILD_NR}/input/
>
>
> What am I missing to successfully fill in the "Input" step of Jenkins 
> Pipeline?
>
> Any help will be highly appreciated!
>
> Best regards,
> Miłosz Tyborowski.
>

-- 
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/cf1493b2-d111-42fb-a85d-adfd85dae41f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Pipeline: How to access Jenkins build information from pipeline?

2016-08-23 Thread Lars Meynberg
Thanks, that was the hint in the right direction! 

Am Montag, 22. August 2016 13:21:11 UTC+2 schrieb Lars Meynberg:
>
> Hi guys,
>
> I'd like to access some information about the job and its builds. I've 
> found this example from the cloudbees repo:
>
> https://github.com/cloudbees/jenkins-scripts/blob/master/cancel-builds-same-job.groovy
>
> But when I try to access Jenkins.instance I get the error 
> *org.jenkinsci.plugins.scriptsecurity.sandbox.RejectedAccessException: 
> Scripts not permitted to use staticMethod jenkins.model.Jenkins getInstance*
>
> Any thoughts if this is a Pipeline-Bug or the wrong method to get build 
> information during a pipeline run?
>
>
>
>

-- 
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/dfcc4d2b-24f7-478e-9920-15adb049567e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.