Build of Maven module executed twice

2015-05-06 Thread Clifford Sanders
Hi,

Last night a build (#468) of one of our Maven projects was started by an 
user manually by clicking on 'Rebuild Last'.
The build was marked as FAILED although the build log says Finished: 
UNSTABLE (two tests failed).

While looking at the Module Builds view I saw that one of the modules was 
built twice #468 (green) and #469 (red).

I had a look at ${JENKINS_HOME}/jobs/myJob/builds/468/module_f/build.xml

hudson.model.CauseAction
  causes
hudson.model.Cause_-UserIdCause
  userIdclifford/userId
/hudson.model.Cause_-UserIdCause
  /causes
/hudson.model.CauseAction
hudson.model.CauseAction
  causes
com.sonyericsson.rebuild.RebuildCause plugin=rebuild@1.22
  upstreamProjectmyJob/module_f/upstreamProject
  upstreamUrlview/myView/job/myJob/module_f//upstreamUrl
  upstreamBuild460/upstreamBuild
  upstreamCauses/
/com.sonyericsson.rebuild.RebuildCause
  /causes
/hudson.model.CauseAction

Build #460 was started a week ago, succeeded and is marked to be kept 
forever.

These are the sorted timestamps of the files/directories in 
${JENKINS_HOME}/jobs/myJob/builds/468

...
19:44:47.551809648 +0200 module_s - 
../../modules/module_a/builds/2015-05-05_18-08-56
19:45:32.997800146 +0200 module_t - 
../../modules/module_t/builds/2015-05-05_18-08-56
19:46:37.867786723 +0200 timestamper
19:46:37.867786723 +0200 log
19:47:09.709780194 +0200 injectedEnvVars.txt
19:47:09.910780153 +0200 build.xml
19:47:09.915780152 +0200 module_f - 
../../modules/module_f/builds/2015-05-05_19-46-40

The console output of 
http://jenkinshost/view/myView/job/myJob/module_f/469/console

Started by user Clifford
Finished: ABORTED
FATAL: cannot change build result while in COMPLETED
java.lang.IllegalStateException: cannot change build result while in 
COMPLETED
  at hudson.model.Run.setResult(Run.java:458)
  at hudson.model.Run.execute(Run.java:1759)
  at hudson.maven.MavenBuild.run(MavenBuild.java:269)
  at hudson.model.ResourceController.execute(ResourceController.java:89)
  at hudson.model.Executor.run(Executor.java:240)


In the job configuration Enable triggering of downstream projects and 
Block downstream trigger when building are enabled.

We use
- Jenkins 1.594
- Maven Project Plugin 2.8
- Rebuild Plugin 1.22 

Can someone explain to me has happened here?

Thanks

Clifford

-- 
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/e075154c-9399-487b-a354-0c3009ea7fe1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Problems with deleting modules in Maven job

2015-05-05 Thread Clifford Sanders
Hi,

the 'Module Builds' view of one of our Maven jobs show modules which have 
been deleted a while ago.

The module names have a grey ball prepended and '(didn’t run)' append.

I clicked on 'Delete All Disabled Modules' in the left menu which removed 
some modules from the view but not all.

The following code executed in the script console prints all modules 
grouped by active/disabled 

import hudson.model.*
import hudson.maven.*

def jobName = foobar
def job = Hudson.instance.getItem(jobName)

println(active modules)

job.getDisabledModules(false).each{module -
  println(module.name)
}

println(disabled modules)

job.getDisabledModules(true).each{module -
  println(module.name)
}

This list doesn't contain any of the deleted modules.

Where does the 'Module Builds' view get its list of modules?

Thanks

Clifford

-- 
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/e5ab47bf-faff-450c-a47b-dea00c8be221%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[workflow-plugin] How can I get the hostname of the parent node

2015-03-30 Thread Clifford Sanders
In the following workflow I need to get the hostname of the parent node.

node('clifford') {

sh sh create-modules-list.sh  modules.txt

}

def branches = [:]
branches[build1] = {
  node('clifford') {
ws {
  sh ssh build@${PARENT_HOST} 'bash -s'  get-next-module.sh 
/var/lib/build/workspace/test-workflow/modules.txt 21
}
  }
}

Is it possible to pass the hostname as parameter?

I could write the hostname to a file and archive/unarchive it to read the 
hostname from there. But maybe there is an easier way?

Thanks

Clifford

-- 
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/8ee30fa8-295d-4892-96d5-0e7edd17b166%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [workflow-plugin] execute post build step regardless of any errors that occured before

2015-03-30 Thread Clifford Sanders
Thanks Baptiste,

sounds like the solution. I will try that.

Clifford

Am Samstag, 28. März 2015 13:53:15 UTC+1 schrieb Baptiste Mathus:

 You can use try/catch/finally constructs.

 Cheers

 2015-03-26 17:49 GMT+01:00 Clifford Sanders cliff...@gmail.com 
 javascript::

 Hi,

 I'm currently migrating a Maven job to a Workflow job.

 There are UI tests so one of the first steps is to start Xvfb before 
 executing the Maven command and stopping it afterwards.

 sh sudo /sbin/service xvfbd start
 sh mvn clean verify -Dmaven.test.failure.ignore=true
 sh sudo /sbin/service xvfbd stop

 This works as long there are no errors (e.g. compile, syntax).

 Is there a way to force execution of the last step?

 Thanks

 Clifford 

 -- 
 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 javascript:.
 To view this discussion on the web visit 
 https://groups.google.com/d/msgid/jenkinsci-users/a400949d-8e53-4ad9-bae3-698ac11c7ea7%40googlegroups.com
  
 https://groups.google.com/d/msgid/jenkinsci-users/a400949d-8e53-4ad9-bae3-698ac11c7ea7%40googlegroups.com?utm_medium=emailutm_source=footer
 .
 For more options, visit https://groups.google.com/d/optout.




 -- 
 Baptiste Batmat MATHUS - http://batmat.net
 Sauvez un arbre,
 Mangez un castor !
  

-- 
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/b90bee8f-d716-476f-8249-2144def8e453%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: find jobs with high polling frequency?

2015-03-26 Thread Clifford Sanders
You can use the 'Timer Trigger Slicer' of 'Configuration Slicing Plugin'

https://wiki.jenkins-ci.org/display/JENKINS/Configuration+Slicing+Plugin

Clifford

Am Dienstag, 24. März 2015 23:54:59 UTC+1 schrieb LesMikesell:

 On a system with a large number of jobs configured, is there a way to 
 find which ones are configured to poll the SCM frequently? 

 -- 
Les Mikesell 
  lesmi...@gmail.com javascript: 


-- 
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/f4b1ecc4-34ea-4dbe-af17-dc3d4ade8d74%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[workflow-plugin] execute post build step regardless of any errors that occured before

2015-03-26 Thread Clifford Sanders
Hi,

I'm currently migrating a Maven job to a Workflow job.

There are UI tests so one of the first steps is to start Xvfb before 
executing the Maven command and stopping it afterwards.

sh sudo /sbin/service xvfbd start
sh mvn clean verify -Dmaven.test.failure.ignore=true
sh sudo /sbin/service xvfbd stop

This works as long there are no errors (e.g. compile, syntax).

Is there a way to force execution of the last step?

Thanks

Clifford 

-- 
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/a400949d-8e53-4ad9-bae3-698ac11c7ea7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins 1.599 oracle JDK no longer populates a drop down list

2015-03-24 Thread Clifford Sanders
clicking on 'Check Now' didn't help and we are located in Germany.

As Jenkins is started with '--logfile=/home/jenkins/logs/jenkins.log' you 
mean this logfile? Nothing relevant in there.

I downloaded jenkins-1.594.war and started it locally. The drop-down was 
populated with all JDKs.

I found this issue: https://issues.jenkins-ci.org/browse/JENKINS-10176

So I checked 
that 
http://jenkins.mirror.isppower.de/updates/updates/hudson.tools.JDKInstaller.json?version=1.594
 
works.

Then I looked at the file 'hudson.tools.JDKInstaller' that was mentioned in 
the issue. The contents was exactly the same as the file 
'hudson.tasks.Maven.MavenInstaller' which is very strange but could be the 
reason for the error.
I deleted 'hudson.tools.JDKInstaller' hoping that it would be downloaded 
again. But nothing happend.

Clifford


Am Dienstag, 24. März 2015 10:24:11 UTC+1 schrieb Daniel Beck:

 Go to Manage Jenkins » Manage Plugins » Advanced and click 'Check Now'. 

 If that doesn't help, check the log at /log/all for possibly relevant 
 messages. 

 Are you in China or a neighboring country? 

 On 24.03.2015, at 09:59, Clifford Sanders cliff...@gmail.com 
 javascript: wrote: 

  We use version 1.594 and have the same problem. I attached a screenshot. 
  
  Clifford 
  
  -- 
  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 javascript:. 
  To view this discussion on the web visit 
 https://groups.google.com/d/msgid/jenkinsci-users/49458490-11c5-493c-aa6e-c5a66c7fb463%40googlegroups.com.
  

  For more options, visit https://groups.google.com/d/optout. 
  JDK_installer.png 



-- 
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/56b548ac-f259-43cf-b6a3-991bd27437ec%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins 1.599 oracle JDK no longer populates a drop down list

2015-03-24 Thread Clifford Sanders
Updating or restarting can't be done during office hours.

I solved it by copying the file 'hudson.tools.JDKInstaller' from my local 
Jenkins to the 'updates' directory on the remote Jenkins.

Is there a Jira issue for the fix in 1.596? The original poster wrote that 
the error still occures in 1.599.

Clifford

Am Dienstag, 24. März 2015 11:17:23 UTC+1 schrieb Daniel Beck:

  
  Then I looked at the file 'hudson.tools.JDKInstaller' that was mentioned 
 in the issue. The contents was exactly the same as the file 
 'hudson.tasks.Maven.MavenInstaller' which is very strange but could be the 
 reason for the error. 

 Fixed in 1.596 with server-based download. 

  I deleted 'hudson.tools.JDKInstaller' hoping that it would be downloaded 
 again. But nothing happend. 

 The easiest solution is to restart Jenkins to force a redownload. 



-- 
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/a417f938-44f4-4c2f-9aac-33484c2d53c6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins 1.599 oracle JDK no longer populates a drop down list

2015-03-24 Thread Clifford Sanders
The JDKs that were already configured to download from java.sun now all 
have the same 'JDK ID': jdk-8u40-oth-JPR (see attached screenshot)

Clifford

Am Dienstag, 24. März 2015 09:59:37 UTC+1 schrieb Clifford Sanders:

 We use version 1.594 and have the same problem. I attached a screenshot.

 Clifford


-- 
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/df85ada2-1013-4e65-b655-64ec9c56c79e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins 1.599 oracle JDK no longer populates a drop down list

2015-03-24 Thread Clifford Sanders
Thanks Daniel. I also found this related Jira isuue:

Auto-installer for JDK no longer works: 
https://issues.jenkins-ci.org/browse/JENKINS-26780

Am Dienstag, 24. März 2015 11:50:05 UTC+1 schrieb Daniel Beck:


 On 24.03.2015, at 11:39, Clifford Sanders cliff...@gmail.com 
 javascript: wrote: 

  Is there a Jira issue for the fix in 1.596? The original poster wrote 
 that the error still occures in 1.599. 

 I got the versions wrong, it's 1.596.1 (LT)S and 1.600 that are fixed. 
 They require the administrator to disable browser-based downloads in the 
 security preferences. 

 The fix is for SECURITY-163, described at 
 https://wiki.jenkins-ci.org/display/SECURITY/Jenkins+Security+Advisory+2015-02-27,
  
 and it is thought to fix this reliability issue as well. 



-- 
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/c244f046-17fe-432e-87f5-e3848f684faa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins 1.599 oracle JDK no longer populates a drop down list

2015-03-24 Thread Clifford Sanders
We use version 1.594 and have the same problem. I attached a screenshot.

Clifford

-- 
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/49458490-11c5-493c-aa6e-c5a66c7fb463%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [workflow-plugin] clean after checkout in GenericSCM step

2015-02-19 Thread Clifford Sanders
Hi Timur,

I had a similar problem with cloning into another directory. If you look 
into the config.xml of a job where the GitSCM is used you see something 
like this:

  scm class=hudson.plugins.git.GitSCM plugin=git@2.3.4
configVersion2/configVersion
userRemoteConfigs
  hudson.plugins.git.UserRemoteConfig
urlhttps://github.com/XX/XX.git'/url
  /hudson.plugins.git.UserRemoteConfig
/userRemoteConfigs
branches
  hudson.plugins.git.BranchSpec
name*/master/name
  /hudson.plugins.git.BranchSpec
/branches

doGenerateSubmoduleConfigurationsfalse/doGenerateSubmoduleConfigurations
submoduleCfg class=list/
*extensions*
*  hudson.plugins.git.extensions.impl.CleanCheckout/*
*/extensions*
  /scm

the extension part must be 'translated' to:

extensions: [[$class: 'hudson.plugins.git.extensions.impl.CleanCheckout']]

So you command should be something like:

checkout scm: [$class: 'GitSCM', branches: [[name: '*/master']], 
extensions: extensions: [[$class: 
'hudson.plugins.git.extensions.impl.CleanCheckout']], userRemoteConfigs: 
[[credentialsId: '4db1f14a-c479-48af-a3ea-da676bc2b051', url: '
https://github.com/XX/XX.git'] 
https://www.google.com/url?q=https%3A%2F%2Fgithub.com%2FXX%2FXX.git%27%255Dsa=Dsntz=1usg=AFQjCNHfEpWmZiLl31HFf02Ge974L47MIg
]]

Regards

Clifford

-- 
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/435e4c7e-43d1-4a2c-879f-f21ae25fa436%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: workflow scm step

2015-02-18 Thread Clifford Sanders
Hi James,

try:

  checkout changelog: true, poll: false, scm: [$class: 'GitSCM', branches: 
[[name: '*/master']], doGenerateSubmoduleConfigurations: false, , 
extensions: [[$class: 
'hudson.plugins.git.extensions.impl.RelativeTargetDirectory', 
relativeTargetDir: 'myfunkydirectory']], submoduleCfg: [], 
userRemoteConfigs: [[url: 'ssh://foobar@whizbang/git/repo']]]


Clifford

Am Freitag, 15. August 2014 17:34:08 UTC+2 schrieb James Nord (jnord):

  Hi all,

  

 I’m trying to get the new workflow to checkout from git with some 
 additional behaviours (clone to specific dir)

  

 Because of this the “git” step won’t work – so I need to fall back to 

 scm $class: 'hudson.plugins.git.GitSCM’ ….

 But the additional behaviours aren’t defined in the top of the scm… 
 block so I’m wondering how would I pass something like the following as a 
 command.

  

   scm class=hudson.plugins.git.GitSCM

 userRemoteConfigs

   hudson.plugins.git.UserRemoteConfig

 urlssh://foobar@whizbang/git/repo/url

   /hudson.plugins.git.UserRemoteConfig

 /userRemoteConfigs

 branches

   hudson.plugins.git.BranchSpec

 name*/master/name

   /hudson.plugins.git.BranchSpec

 /branches

 extensions

   hudson.plugins.git.extensions.impl.IgnoreNotifyCommit/

   hudson.plugins.git.extensions.impl.RelativeTargetDirectory

 relativeTargetDirmyfunkydirectory/relativeTargetDir

   /hudson.plugins.git.extensions.impl.RelativeTargetDirectory

 /extensions

   /scm

  

 Anyone any suggestions?

  

 /James
  

-- 
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/052afbc5-4327-47ce-9644-427eb7526245%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.