Re: Write custom Jenkins plugin to execute commands on remote node?

2014-02-24 Thread John Vacz

Am 22.02.2014 06:33, schrieb Ravid Te:

Hey Everyone,

I am new to plugin creation, and have a need to create a plugin that 
generates a specific file based on user-input to a remote node 
containing large strings of data.


*I am aware of the current Execute Shell build step option and 
Execute remote commands via SSH plugin,
but do not want users to have to input this large string of data 
themselves into the job config shell execute text field.*



https://wiki.jenkins-ci.org/display/JENKINS/Managed+Script+Plugin
https://wiki.jenkins-ci.org/display/JENKINS/SharedObjects+Plugin


For now, I would like to create a plugin that can execute shell 
commands on a remote node, once I have this, I should be able to 
figure out the rest myself.


I found this code snippet (below) which works fine for executing 
simple shell commands on local jenkins system.
What I want to do is modify this code snippet to also work when the 
job is configured to execute on a remote node.
When I configured the job to execute on a remote node, I received the 
following error (below below)


If executing the commands on the remote node is too hard, is there a 
way to auto-input that large string of data into the execute shell 
text box in the jenkins job configuration, as this would work too?


Can anyone assist?

Thanks very much in advance,
~Ravid


[CODE SNIPPET]

ListCause  buildStepCause=  new  ArrayList();
  buildStepCause.add(new  Cause()  {
public  String  getShortDescription()  {
  return  Build Step started by Hello Builder;
}
  });
  listener.started(buildStepCause);
  
  ArgumentListBuilder args=  new  ArgumentListBuilder();

  if  (launcher.isUnix())  {
args.add(/bin/ls);
args.add(-la);
  }  else  {
args.add(dir);  //Windows
  }
  String  homeDir=  System.getProperty(user.home);
  args.add(homeDir);
  try  {
int  r;
r=  launcher.launch().cmds(args).stdout(listener).join();
if  (r!=  0)  {
  listener.finished(Result.FAILURE);
  return  false;
}
  }  catch  (IOException  ioe)  {
ioe.printStackTrace(listener.fatalError(Execution  +  args+  failed));
listener.finished(Result.FAILURE);
return  false;
  }  catch  (InterruptedException  ie)  {
ie.printStackTrace(listener.fatalError(Execution  +  args+  failed));
listener.finished(Result.FAILURE);
return  false;
  }
  
  listener.finished(Result.SUCCESS);



[ERROR LOG]

Building remotely onLocalVM  http://localhost:8080/jenkins/computer/LocalVM  
in workspace /opt/jenkins/workspace/Test
Build Step started by Hello Builder
FATAL: Execution/bin/ls -la /Users/vid401tfailed
java.io.IOException  
http://stacktrace.jenkins-ci.org/search?query=java.io.IOException: Remote 
call on LocalVM failed
athudson.remoting.Channel.call(Channel.java:723)  
http://stacktrace.jenkins-ci.org/search/?query=hudson.remoting.Channel.callentity=method
athudson.Launcher$RemoteLauncher.launch(Launcher.java:862)  
http://stacktrace.jenkins-ci.org/search/?query=hudson.Launcher$RemoteLauncher.launchentity=method
athudson.Launcher$ProcStarter.start(Launcher.java:353)  
http://stacktrace.jenkins-ci.org/search/?query=hudson.Launcher$ProcStarter.startentity=method
athudson.Launcher$ProcStarter.join(Launcher.java:360)  
http://stacktrace.jenkins-ci.org/search/?query=hudson.Launcher$ProcStarter.joinentity=method
atcom.owmessaging.testplugin.HelloWorldBuilder.perform(HelloWorldBuilder.java:90) 
 
http://stacktrace.jenkins-ci.org/search/?query=com.owmessaging.testplugin.HelloWorldBuilder.performentity=method
athudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)  
http://stacktrace.jenkins-ci.org/search/?query=hudson.tasks.BuildStepMonitor$1.performentity=method

athudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:780)  
http://stacktrace.jenkins-ci.org/search/?query=hudson.model.AbstractBuild$AbstractBuildExecution.performentity=method
athudson.model.Build$BuildExecution.build(Build.java:199)  
http://stacktrace.jenkins-ci.org/search/?query=hudson.model.Build$BuildExecution.buildentity=method
athudson.model.Build$BuildExecution.doRun(Build.java:160)  
http://stacktrace.jenkins-ci.org/search/?query=hudson.model.Build$BuildExecution.doRunentity=method
athudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:565)  
http://stacktrace.jenkins-ci.org/search/?query=hudson.model.AbstractBuild$AbstractBuildExecution.runentity=method
athudson.model.Run.execute(Run.java:1592)  
http://stacktrace.jenkins-ci.org/search/?query=hudson.model.Run.executeentity=method
athudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)  
http://stacktrace.jenkins-ci.org/search/?query=hudson.model.FreeStyleBuild.runentity=method
athudson.model.ResourceController.execute(ResourceController.java:88)  
http://stacktrace.jenkins-ci.org/search/?query=hudson.model.ResourceController.executeentity=method

Re: best approach to automate/manage jenkins jobs?

2014-02-21 Thread John Vacz

https://wiki.jenkins-ci.org/display/JENKINS/SCM+Sync+configuration+plugin

Am 21.02.2014 16:21, schrieb Mark Waite:
I called the command line to extract the job definition, then stored 
that definition in source control.  I could replay it at any time.


That did not update job definitions when they changed.  It did not 
detect changes (other than through the version control system diff 
mechanism).  It was not attempting to code Jenkins job definitions in 
a DRY fashion.


It was simple to maintain and helped me reconstruct environments more 
readily on those rare times when I needed to reconstruct them.


Mark Waite


On Fri, Feb 21, 2014 at 8:14 AM, phil swenson phil.swen...@gmail.com 
mailto:phil.swen...@gmail.com wrote:


Hi, we have a large number of jenkins jobs and would like to
automate and version control their configuration.

From what I can tell, most people just manually config their jobs
via the UI.  Unless there are only a few very simple jobs, this
leads to an unmanageable mess.

I think the jobs should be coded in a DRY fashion, version
controlled, and deployed via a scripted system.

Here are the approaches I am aware of:

1) scripting via command line (jenkins cli)
2) scripting via the rest web services
3) chef cookbook http://community.opscode.com/cookbooks/jenkins

What are most people doing?
Any recommendations?

thanks
phil
-- 
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
mailto:jenkinsci-users%2bunsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




--
Thanks!
Mark Waite
--
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.

For more options, visit https://groups.google.com/groups/opt_out.


--
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.
For more options, visit https://groups.google.com/groups/opt_out.


Re: REST API for promoting builds

2014-02-18 Thread John Vacz
This is also what I am missing for a long time. I had the impression 
that promoted build being a second-class job, there are some features 
exposed by REST API but not complete. It would be very nice if 
performing/copying/creating/removing a promotion could be fully 
supported by REST API, cli and sshd interfaces.
I wanted to implement a web frontend for our non-technical users 
(Jenkins GUI is not necessarily intuitive for them), using Jenkins 
(solely) as a backend engine via remote API, the only missing part is 
performing promotion and retrieving promotion information. At the moment 
I have to parse various promotion pages to  gather the informations as a 
workaround.

Hopefully this discussion can draw some attetion in this direction.

[1] https://issues.jenkins-ci.org/browse/JENKINS-8963
[2] https://issues.jenkins-ci.org/browse/JENKINS-15947
[3] https://issues.jenkins-ci.org/browse/JENKINS-9259

Am 17.02.2014 16:44, schrieb Marnix Klooster:

On Friday, January 17, 2014 8:55:16 AM UTC+1, Bruce Edge wrote:

I read a lot of people talking about the REST API for build
promotion, but I
can't find any documentation on it.

What is the URL/API for forcing a job promotion?


I second that question-- how to do this?  is there any documentation 
on the REST API for Jenkins Promoted Builds Plugin?


Thanks!

Groetjes,

Marnix
--
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.

For more options, visit https://groups.google.com/groups/opt_out.


--
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.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Manual Promotion and Upstream Promotion Criteria along with Role Strategy plugin

2013-08-29 Thread John Vacz

Am 22.08.2013 14:41, schrieb deevant07:

Hi,

I have the following scenario.

A build job is created. On successful build i want the build to be promoted
by a particular role( DEV Approvers - Using Role Strategy Plugin ) to
environment say DEV. On successful completion of DEV promotion i want that
build to be enabled for promotion to next level(say UAT) only to particular
role say UAT-Aproovers. Subsequently the next levels...
We have a similar setting, it is probably less fine grained as yours, 
but it basically works as expectd.


I have used Promoted builds plugin along with Role Strategy plugin. Although
this works to some extent but it does not provide me the exact behavior as
explained above.

1. Job is given access to role build with build permission. It allows
users with build role to execute the build.
2. Job is given access to role DEV Approvers with promote permission. It
does not give users of DEV Approvers the option Approve Button but
rather it gives Force Promotion Option.
3. Similarly, Job is given access to role UAT Approvers with promote
permission. It does not give users of UAT Approvers the option Approve
Button but rather it gives force promotion
In the promotion configuration on job configure screen, we check only 
when manually approved
with approvers username provided in the Approvers input field. The 
approvers then
have a approve button (IIUC the approver still need the promote 
permission, that means,
the also have the force promotion button at the same time). This might 
not be perfect,
but we are not aming at restict role controll, but rather conienience 
for the users.




Now if the step 2 is not executed then i dont want to allow the step 3 to be
executed but in my case step 3 is executing even though  i have given the
criteria When the following upstream promotions are promoted with step 2
promotion label.
We also use When the following upstream promotions are promoted to 
controll the promotion
dependencies. My experience so far is: if step 2 is not yet promted, the 
user can still do
the step 3 promotion, but it is blocked by step2. If step 2 is promoted, 
then step 3
will be performed immediately thereafter (this is only my observation, I 
didnt test it deliberately,

so I may well be wrong).

Can someone help with a solution or any workaround?

Thanks,
Deevan



--
View this message in context: 
http://jenkins-ci.361315.n4.nabble.com/Manual-Promotion-and-Upstream-Promotion-Criteria-along-with-Role-Strategy-plugin-tp4676887.html
Sent from the Jenkins users mailing list archive at Nabble.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.
For more options, visit https://groups.google.com/groups/opt_out.


Re: HTML Reports Plugin - Always run?

2013-08-09 Thread John Vacz
I also had this issue today (I didnt see/notice this issue until a few 
hours ago, is it just coincident?). I aborted a running job, but html 
publisher and emma plugin still ran, the reports from last build were 
collected and published:


...
Build wurde abgebrochen
Aborted by thg1
[FINDBUGS] Skipping publisher since build result is ABORTED
[PMD] Skipping publisher since build result is ABORTED
[DRY] Skipping publisher since build result is ABORTED
[WARNINGS] Skipping publisher since build result is ABORTED
[TASKS] Skipping publisher since build result is ABORTED
[ANALYSIS-COLLECTOR] Skipping publisher since build result is ABORTED
Archiviere Artefakte
[htmlpublisher] Archiving HTML reports...
[htmlpublisher] Archiving at PROJECT level 
/home/jenkins-slave/jenkins-slave-fs-root/workspace/SD-2082/sper/codecheck/tests 
to /var/lib/jenkins/jobs/SD-2082/htmlreports/TestNG_Report_sper
[htmlpublisher] Archiving at PROJECT level 
/home/jenkins-slave/jenkins-slave-fs-root/workspace/SD-2082/skkt/codecheck/tests 
to /var/lib/jenkins/jobs/SD-2082/htmlreports/TestNG_Report_skkt
[htmlpublisher] Archiving at PROJECT level 
/home/jenkins-slave/jenkins-slave-fs-root/workspace/SD-2082/bint/codecheck/tests 
to /var/lib/jenkins/jobs/SD-2082/htmlreports/TestNG_Report_bint
[htmlpublisher] Archiving at PROJECT level 
/home/jenkins-slave/jenkins-slave-fs-root/workspace/SD-2082/sbus/codecheck/tests 
to /var/lib/jenkins/jobs/SD-2082/htmlreports/TestNG_Report_sbus
[htmlpublisher] Archiving at PROJECT level 
/home/jenkins-slave/jenkins-slave-fs-root/workspace/SD-2082/sweb/codecheck/tests 
to /var/lib/jenkins/jobs/SD-2082/htmlreports/TestNG_Report_sweb

Build Aborted. Not looking for any TestNG results.
Emma: looking for coverage reports in the provided path: 
sapl/codecheck/coverage/coverage_all.xml

Emma: found 1 report files:
  
/home/jenkins-slave/jenkins-slave-fs-root/workspace/SD-2082/sapl/codecheck/coverage/coverage_all.xml
Emma: stored 1 report files in the build folder: 
/var/lib/jenkins/jobs/SD-2082/builds/2013-08-09_11-17-44/emma

Emma: Testabdeckung: ...
Zeichne Fingerabrücke auf
IRC notifier plugin: Sending notification to: #jenkins
No emails were triggered.
Notifying upstream projects of job completion
Finished: ABORTED


Am 08.08.2013 23:43, schrieb Richard Bywater:
That's odd - I've got jobs that still run the HTML Publisher on 
failure - are you sure that the HTML file is being put in the same 
place during a failure scenario?


(Note I'm using a Freestyle job - perhaps if your job type is 
different then behaviour might change)


Richard.


On Fri, Aug 9, 2013 at 6:45 AM, Bob Bick bb...@netjets.com 
mailto:bb...@netjets.com wrote:


Hi,

My Build Flow Plugin based job has a “Publish HTML Report”
post-build action. Regardless of whether the build flow job
succeeds or fails, it generates an HTML report that should be
published. Currently, when the build flow job fails, the HTML file
is not published because the job stops on the failure.

Is there are way to get a post-build action to always execute
(even when there is a failure)? This seems like a very common
requirement but I did not see it documented anywhere. I saw that
there is a plugin to run a script regardless as to whether the job
succeeded or failed, but I need the “Publish HTML Report”
post-build action to always run.

Kind Regards,

Bob


*** *** ***
This message contains information which may be confidential and
privileged. Unless you are the addressee (or authorized to receive
for the addressee), you may not use, copy or disclose to anyone
the message or any information contained in the message. If you
have received the message in error,  please advise the sender by
reply e-mail and delete the message.

-- 
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
mailto:jenkinsci-users%2bunsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


--
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.

For more options, visit https://groups.google.com/groups/opt_out.


--
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.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Missing class sonatype/aether/util/StringUtils

2013-08-08 Thread John Vacz

I also have this stacktrace.
Jenkins 1.525 (reverted back from 1.526), email-ext plugin 2.30.2, 
Debian 6.0.7 64-bit.


Am 08.08.2013 18:40, schrieb J Arrizza:

I'm running Ubuntu 10.04.

After a plugin upgrade I'm getting

- NoClassDefFoundErrors in the log.
- no emails are being sent out

-The view/summary page is not showing the latest Last Success e.g.

I have a job call v11-dcm-trunk that shows a Last Success of
9 days 19 hr - #7, but the Build History shows The last job
was #14 Aug 9, 2013 9:24:30AM

The Build History is missing build #10, #11, #12 and #13.
- the job history is not saved across restarts of jenkins (need to
double-check it.

- For a while I also saw that a job builds ok but does not trigger
the next job, but it looks like upgrading to 1.526 fixed that.

Here's what I've tried so far:

- updated Jenkins from 1.518 to 1.526

- rebooted the server
- checked the Updates page for additional available plugins
updates (there are none)


Here's the stacktrace:

Aug 8, 2013 9:26:42 AM hudson.model.Executor run
SEVERE: Executor threw an exception
java.lang.NoClassDefFoundError: org/sonatype/aether/util/StringUtils
at

hudson.plugins.emailext.plugins.content.ChangesSinceLastBuildContent.evaluate(ChangesSinceLastBuildContent.java:56)
at

org.jenkinsci.plugins.tokenmacro.DataBoundTokenMacro.evaluate(DataBoundTokenMacro.java:177)
at
org.jenkinsci.plugins.tokenmacro.TokenMacro.expand(TokenMacro.java:182)
at
org.jenkinsci.plugins.tokenmacro.TokenMacro.expandAll(TokenMacro.java:233)
at

hudson.plugins.emailext.plugins.ContentBuilder.transformText(ContentBuilder.java:63)
at

hudson.plugins.emailext.ExtendedEmailPublisher.getContent(ExtendedEmailPublisher.java:705)
at

hudson.plugins.emailext.ExtendedEmailPublisher.createMail(ExtendedEmailPublisher.java:488)
at

hudson.plugins.emailext.ExtendedEmailPublisher.sendMail(ExtendedEmailPublisher.java:319)
at

hudson.plugins.emailext.ExtendedEmailPublisher._perform(ExtendedEmailPublisher.java:311)
at

hudson.plugins.emailext.ExtendedEmailPublisher.perform(ExtendedEmailPublisher.java:271)
at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36)
at

hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:804)
at

hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:776)
at hudson.model.Build$BuildExecution.cleanUp(Build.java:192)
at hudson.model.Run.execute(Run.java:1642)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:247)



It looks like I'm missing a dependency on something. Any ideas I can try?

Thanks,
John

--
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.

For more options, visit https://groups.google.com/groups/opt_out.


--
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.
For more options, visit https://groups.google.com/groups/opt_out.




Re: How to link a particular job with the promotion process without physically copying the artifacts

2013-07-15 Thread John Vacz

Am 10.07.2013 16:24, schrieb Marcin Zajączkowski:

Hi,

I'm currently playing with Promoted Build plugin in the pipeline 
managed by Build Flow plugin.


In a simplified form I have three jobs (called from the master job 
using Build Flow plugin):

- a normal build of a project - job B
- a deploy WAR artifact to a remote Tomcat - job D
- a smoke testing runs against a remote Tomcat (with deployed app) - 
job S


I would like to promote a WAR built in a B job when it passes a smoke 
testing (S).


The issue is that there is no relationship between B and other jobs 
(they are triggered through a pipeline with a concrete B build 
specified as a parameter). D uses artifacts from B (by Copy artifacts 
plugin), but S not. I could copy artifacts from B or D to S, but it is 
very artificial - I don't need them (and have performance drawbacks). 
I could also try to write some Groovy code similar to the one used in 
FingerprintingCopyMethod in Copy Artifacts plugin.




I dont think it's very artificial, acutally it would be helpful if you 
know which version exactly has Job S tested. We generate a metadata file 
in job B and copy this artifact as identifier to all related jobs, so 
we can identify which job is doing something with which build.


What is the easiest way to tell Jenkins (Promoted Build plugin) that 
given artifact (fingerprint) is used by a specific build?


Marcin



--
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.
For more options, visit https://groups.google.com/groups/opt_out.




Fingerprinting performance

2013-07-11 Thread John Vacz
Recently the fingerprinting of our jubs is becoming very slow.Per build 
we have 16 artifacts to be fingerprinted, now that alone lasts ~5 
minutes. Since we are using copy artifact plugin very heavily, the 
situation is becoming even worse - the slowness adds up.


Unfortunately I cannot tell from which Jenkins version this happens, I 
only noticed this slowness in several weeks ~ around version 1.51x, but 
the problem might well be irrelevant to the jenkins version.


Some more background information:
Jenkins 1.518 on Debian 6 64bit and built-in Winstone
we have a standard job template, each git branch has one jenkins job 
respectively, at the moment we have ~240 jobs (active + disabled). If 
one branch is done, the jenkins job is disabled but not deleted. So we 
have many jobs with multiple builds, and we do limit the perserved 
artifacts (max. 2 builds per job). Beside that, we have 2 long-live 
jobs, together ~ 700 builds. The number of artifacts sum up could be 
quite large. Although I do delete (linux shell) the artifacts 
periodically (every several months to ~1 year) , I didnt touch the 
fingerprints/ directory ever since we first adopted Hudson (5+ years). 
Now the fingerprints/ contains 245M data.


I suspect that the size of the fingerprint database may be the main 
culprit, but thats only my speculation without any hard evidence. It 
seems that Jenkins garbage collects them [1] if builds are deleted 
within/through Jenkins. But is the fingerprint database being generally 
maintained?


Does the size of the fingerprint database really matter? If yes, can I 
just delete the whole fingerprints/ without breaking the copy-artifact 
plugin (the ability to deploy a previous build using copy-artifact is 
crucial for us)? Or how can I reduce the size?


I might be looking at a complete wrong direction, so any help/idea is 
very much appreciated.


-jv

[1] https://issues.jenkins-ci.org/browse/JENKINS-18417

--
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.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Fingerprinting performance

2013-07-11 Thread John Vacz

The artifacts:
30MB x 1,
6.5MB x 9,
1MB x 1,
others are 5 plain text files between 0.1 ~  10KB.

I will look into the threadDump...

Am 11.07.2013 16:33, schrieb Daniel Beck:

How big are these artifacts?

At /threadDump, you can access live stack traces. Maybe look for something 
fingerprint related during those 5 minutes, it could give you a hint what is 
taking so long.

Copy artifact works without fingerprinting in the source project, but always 
calculates its own when copying. See JENKINS-12134 and JENKINS-18653.

On 11.07.2013, at 15:06, John Vaczmailing.list.collect...@googlemail.com  
wrote:


Recently the fingerprinting of our jubs is becoming very slow.Per build we have 
16 artifacts to be fingerprinted, now that alone lasts ~5 minutes. Since we are 
using copy artifact plugin very heavily, the situation is becoming even worse - 
the slowness adds up.

Unfortunately I cannot tell from which Jenkins version this happens, I only 
noticed this slowness in several weeks ~ around version 1.51x, but the problem 
might well be irrelevant to the jenkins version.

Some more background information:
Jenkins 1.518 on Debian 6 64bit and built-in Winstone
we have a standard job template, each git branch has one jenkins job 
respectively, at the moment we have ~240 jobs (active + disabled). If one 
branch is done, the jenkins job is disabled but not deleted. So we have many 
jobs with multiple builds, and we do limit the perserved artifacts (max. 2 
builds per job). Beside that, we have 2 long-live jobs, together ~ 700 builds. 
The number of artifacts sum up could be quite large. Although I do delete 
(linux shell) the artifacts periodically (every several months to ~1 year) , I 
didnt touch the fingerprints/ directory ever since we first adopted Hudson (5+ 
years). Now the fingerprints/ contains 245M data.

I suspect that the size of the fingerprint database may be the main culprit, 
but thats only my speculation without any hard evidence. It seems that Jenkins 
garbage collects them [1] if builds are deleted within/through Jenkins. But is 
the fingerprint database being generally maintained?

Does the size of the fingerprint database really matter? If yes, can I just 
delete the whole fingerprints/ without breaking the copy-artifact plugin (the 
ability to deploy a previous build using copy-artifact is crucial for us)? Or 
how can I reduce the size?

I might be looking at a complete wrong direction, so any help/idea is very much 
appreciated.

-jv

[1] https://issues.jenkins-ci.org/browse/JENKINS-18417

--
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.
For more options, visit https://groups.google.com/groups/opt_out.





--
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.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Fingerprinting performance

2013-07-11 Thread John Vacz

The SCM sync configuration:


Am 11.07.2013 17:10, schrieb John Vacz:



Executor #1 for Slave16 : executing SD-2112 #3

Executor #1 for comitdev16 : executing SD-2112 #3 Id=62 Group=main RUNNABLE
at java.io.UnixFileSystem.list(Native Method)
at java.io.File.list(File.java:973)
at 
org.apache.tools.ant.DirectoryScanner.scandir(DirectoryScanner.java:1257)
at 
org.apache.tools.ant.DirectoryScanner.scandir(DirectoryScanner.java:1287)
at 
org.apache.tools.ant.DirectoryScanner.scandir(DirectoryScanner.java:1287)
at 
org.apache.tools.ant.DirectoryScanner.scandir(DirectoryScanner.java:1287)
at 
org.apache.tools.ant.DirectoryScanner.scandir(DirectoryScanner.java:1211)
at 
org.apache.tools.ant.DirectoryScanner.checkIncludePatterns(DirectoryScanner.java:1030)
at org.apache.tools.ant.DirectoryScanner.scan(DirectoryScanner.java:909)
-  locked org.apache.tools.ant.DirectoryScanner@34cf6c49
at 
hudson.plugins.scm_sync_configuration.strategies.model.PatternsEntityMatcher.matchingFilesFrom(PatternsEntityMatcher.java:41)
at 
hudson.plugins.scm_sync_configuration.strategies.model.PatternsEntityMatcher.matches(PatternsEntityMatcher.java:25)
at 
hudson.plugins.scm_sync_configuration.strategies.AbstractScmSyncStrategy.isSaveableApplicable(AbstractScmSyncStrategy.java:53)
at 
hudson.plugins.scm_sync_configuration.ScmSyncConfigurationPlugin.getStrategyForSaveable(ScmSyncConfigurationPlugin.java:277)
at 
hudson.plugins.scm_sync_configuration.extensions.ScmSyncConfigurationSaveableListener.onChange(ScmSyncConfigurationSaveableListener.java:22)
at 
hudson.model.listeners.SaveableListener.fireOnChange(SaveableListener.java:78)
at hudson.model.Fingerprint.save(Fingerprint.java:862)
-  locked hudson.model.Fingerprint@281c2370
at hudson.model.Fingerprint.init(Fingerprint.java:597)
at hudson.model.FingerprintMap.create(FingerprintMap.java:90)
at hudson.model.FingerprintMap.create(FingerprintMap.java:45)
at hudson.util.KeyedDataStorage.get(KeyedDataStorage.java:156)
at hudson.model.FingerprintMap.get(FingerprintMap.java:79)
at hudson.model.FingerprintMap.get(FingerprintMap.java:45)
at hudson.util.KeyedDataStorage.getOrCreate(KeyedDataStorage.java:108)
at hudson.model.FingerprintMap.getOrCreate(FingerprintMap.java:65)
at hudson.tasks.Fingerprinter$1Record.addRecord(Fingerprinter.java:210)
at hudson.tasks.Fingerprinter.record(Fingerprinter.java:254)
at hudson.tasks.Fingerprinter.perform(Fingerprinter.java:133)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
at 
hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:804)
at 
hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:776)
at hudson.model.Build$BuildExecution.post2(Build.java:183)
at 
hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:726)
at hudson.model.Run.execute(Run.java:1601)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:241)


Thats the one segment of the therad dump.
Looks like scm sync config plugin is scanning directories a lot?


Am 11.07.2013 16:45, schrieb John Vacz:

The artifacts:
30MB x 1,
6.5MB x 9,
1MB x 1,
others are 5 plain text files between 0.1 ~  10KB.

I will look into the threadDump...

Am 11.07.2013 16:33, schrieb Daniel Beck:

How big are these artifacts?

At /threadDump, you can access live stack traces. Maybe look for 
something fingerprint related during those 5 minutes, it could give 
you a hint what is taking so long.


Copy artifact works without fingerprinting in the source project, 
but always calculates its own when copying. See JENKINS-12134 and 
JENKINS-18653.


On 11.07.2013, at 15:06, John 
Vaczmailing.list.collect...@googlemail.com  wrote:


Recently the fingerprinting of our jubs is becoming very slow.Per 
build we have 16 artifacts to be fingerprinted, now that alone 
lasts ~5 minutes. Since we are using copy artifact plugin very 
heavily, the situation is becoming even worse - the slowness adds up.


Unfortunately I cannot tell from which Jenkins version this 
happens, I only noticed this slowness in several weeks ~ around 
version 1.51x, but the problem might well be irrelevant to the 
jenkins version.


Some more background information:
Jenkins 1.518 on Debian 6 64bit and built-in Winstone
we have a standard job template, each git branch has one jenkins 
job respectively, at the moment we have ~240 jobs (active + 
disabled). If one branch is done, the jenkins job is disabled but 
not deleted. So we have many jobs with multiple builds, and we do 
limit the perserved artifacts (max. 2 builds per job). Beside

Re: Fingerprinting performance

2013-07-11 Thread John Vacz
I removed the include pattern jobs/*/promotions/*/config.xml, now the 
fingerprinting takes no time :D.
I think I can conclude that the scan pattern really slows things down 
when there are many jobs.


Something interesting is, the scandir is triggered by 
FingerPrint.save(), SCM sync config plugin may be too aggressive here 
when SaveableListener.fireOnChange being triggered.


I think my problem is solved. Thank your very much Daniel for the great 
help.


-jv

Am 11.07.2013 17:16, schrieb John Vacz:

The SCM sync configuration:


Am 11.07.2013 17:10, schrieb John Vacz:



Executor #1 for Slave16 : executing SD-2112 #3

Executor #1 for comitdev16 : executing SD-2112 #3 Id=62 Group=main RUNNABLE
at java.io.UnixFileSystem.list(Native Method)
at java.io.File.list(File.java:973)
at 
org.apache.tools.ant.DirectoryScanner.scandir(DirectoryScanner.java:1257)
at 
org.apache.tools.ant.DirectoryScanner.scandir(DirectoryScanner.java:1287)
at 
org.apache.tools.ant.DirectoryScanner.scandir(DirectoryScanner.java:1287)
at 
org.apache.tools.ant.DirectoryScanner.scandir(DirectoryScanner.java:1287)
at 
org.apache.tools.ant.DirectoryScanner.scandir(DirectoryScanner.java:1211)
at 
org.apache.tools.ant.DirectoryScanner.checkIncludePatterns(DirectoryScanner.java:1030)
at org.apache.tools.ant.DirectoryScanner.scan(DirectoryScanner.java:909)
-  locked org.apache.tools.ant.DirectoryScanner@34cf6c49
at 
hudson.plugins.scm_sync_configuration.strategies.model.PatternsEntityMatcher.matchingFilesFrom(PatternsEntityMatcher.java:41)
at 
hudson.plugins.scm_sync_configuration.strategies.model.PatternsEntityMatcher.matches(PatternsEntityMatcher.java:25)
at 
hudson.plugins.scm_sync_configuration.strategies.AbstractScmSyncStrategy.isSaveableApplicable(AbstractScmSyncStrategy.java:53)
at 
hudson.plugins.scm_sync_configuration.ScmSyncConfigurationPlugin.getStrategyForSaveable(ScmSyncConfigurationPlugin.java:277)
at 
hudson.plugins.scm_sync_configuration.extensions.ScmSyncConfigurationSaveableListener.onChange(ScmSyncConfigurationSaveableListener.java:22)
at 
hudson.model.listeners.SaveableListener.fireOnChange(SaveableListener.java:78)
at hudson.model.Fingerprint.save(Fingerprint.java:862)
-  locked hudson.model.Fingerprint@281c2370
at hudson.model.Fingerprint.init(Fingerprint.java:597)
at hudson.model.FingerprintMap.create(FingerprintMap.java:90)
at hudson.model.FingerprintMap.create(FingerprintMap.java:45)
at hudson.util.KeyedDataStorage.get(KeyedDataStorage.java:156)
at hudson.model.FingerprintMap.get(FingerprintMap.java:79)
at hudson.model.FingerprintMap.get(FingerprintMap.java:45)
at hudson.util.KeyedDataStorage.getOrCreate(KeyedDataStorage.java:108)
at hudson.model.FingerprintMap.getOrCreate(FingerprintMap.java:65)
at hudson.tasks.Fingerprinter$1Record.addRecord(Fingerprinter.java:210)
at hudson.tasks.Fingerprinter.record(Fingerprinter.java:254)
at hudson.tasks.Fingerprinter.perform(Fingerprinter.java:133)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
at 
hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:804)
at 
hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:776)
at hudson.model.Build$BuildExecution.post2(Build.java:183)
at 
hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:726)
at hudson.model.Run.execute(Run.java:1601)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:241)


Thats the one segment of the therad dump.
Looks like scm sync config plugin is scanning directories a lot?


Am 11.07.2013 16:45, schrieb John Vacz:

The artifacts:
30MB x 1,
6.5MB x 9,
1MB x 1,
others are 5 plain text files between 0.1 ~  10KB.

I will look into the threadDump...

Am 11.07.2013 16:33, schrieb Daniel Beck:

How big are these artifacts?

At /threadDump, you can access live stack traces. Maybe look for 
something fingerprint related during those 5 minutes, it could give 
you a hint what is taking so long.


Copy artifact works without fingerprinting in the source project, 
but always calculates its own when copying. See JENKINS-12134 and 
JENKINS-18653.


On 11.07.2013, at 15:06, John 
Vaczmailing.list.collect...@googlemail.com  wrote:


Recently the fingerprinting of our jubs is becoming very slow.Per 
build we have 16 artifacts to be fingerprinted, now that alone 
lasts ~5 minutes. Since we are using copy artifact plugin very 
heavily, the situation is becoming even worse - the slowness adds up.


Unfortunately I cannot tell from which Jenkins version this 
happens, I only noticed this slowness in several

Re: How to keep Unix process alive after job is completed?

2013-07-04 Thread John Vacz

Looks very promising. I will give it a try.
Thank you, Tim.

-jv

Am 03.07.2013 17:45, schrieb Tim Ford:

John, your issue might be unrelated to Jenkins.

See:  
http://stackoverflow.com/questions/285015/linux-prevent-a-background-process-from-being-stopped-after-closing-ssh-client



On Wednesday, July 3, 2013 5:42:10 AM UTC-5, John Vacz wrote:

We have a job executing a shell script (on a slave) to restart one
dev appserver on a remote server if it does not work properly
(dont bother why its not working):

  # BUILD_ID=dontKillMe
  ssh us...@some.remote.server javascript: exec
/path/to/appserver/force_restart_script arg1

The force_restart_script on the *remote* server doing the following:

  # find and kill the old appserver process
  kill_appserver_script arg1
  # start appserver with specified argument
  /path/to/appserver/start_appserver_script arg1

At the end, the old appserver process was killed, and the new
appserver process was also terminated. How can i keep this from
happening? The BUILD_ID=dontKillMe in job configureation doesn't
seem to work (that would only keep the ssh from being terminated
on the slave, right?), or I should actually set the BUILD_ID in
the remote ssh shell?

Any help is very much appreciated!

-jv

Am 26.04.2013 10:16, schrieb Riccardo Foschia:

Hi,

Take a look at
https://wiki.jenkins-ci.org/display/JENKINS/ProcessTreeKiller
https://wiki.jenkins-ci.org/display/JENKINS/ProcessTreeKiller
section If your build wants to leave a daemon running behind...

Greetings,
Riccardo

Am 26.04.2013 10:08, schrieb hezjing:

Hi

I have a job which will be run in an Linux slave.

This job will execute a shell command to start a server process
which will
run forever. Unfortunately this process is terminated when the
job is
finished.

When I tested this using PuTTY, the server process is still
alive after I
logged-in and out several times.

May I know how to keep a Unix process alive after the job is
completed?








--
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.
For more options, visit https://groups.google.com/groups/opt_out.




Re: How to keep Unix process alive after job is completed?

2013-07-03 Thread John Vacz
We have a job executing a shell script (on a slave) to restart one dev 
appserver on a remote server if it does not work properly (dont bother 
why its not working):


  # BUILD_ID=dontKillMe
  ssh user@some.remote.server exec 
/path/to/appserver/force_restart_script arg1


The force_restart_script on the *remote* server doing the following:

  # find and kill the old appserver process
  kill_appserver_script arg1
  # start appserver with specified argument
  /path/to/appserver/start_appserver_script arg1

At the end, the old appserver process was killed, and the new appserver 
process was also terminated. How can i keep this from happening? The 
BUILD_ID=dontKillMe in job configureation doesn't seem to work (that 
would only keep the ssh from being terminated on the slave, right?), or 
I should actually set the BUILD_ID in the remote ssh shell?


Any help is very much appreciated!

-jv

Am 26.04.2013 10:16, schrieb Riccardo Foschia:

Hi,

Take a look at 
https://wiki.jenkins-ci.org/display/JENKINS/ProcessTreeKiller section 
If your build wants to leave a daemon running behind...


Greetings,
Riccardo

Am 26.04.2013 10:08, schrieb hezjing:

Hi

I have a job which will be run in an Linux slave.

This job will execute a shell command to start a server process which 
will

run forever. Unfortunately this process is terminated when the job is
finished.

When I tested this using PuTTY, the server process is still alive 
after I

logged-in and out several times.

May I know how to keep a Unix process alive after the job is completed?






--
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.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Trouble connecting to Windows slaves using jnlp - quick question

2013-06-27 Thread John Vacz
Is the master running behind a proxy? It seems to me that if the proxy 
is running on a different host, the jnlp slave may try to connect the 
proxy host, instead of the jenkins host. This might also be related to 
the jenkins url in the configuration.  We have had a similar problem, 
after we moved our reverse proxy to the same host as jenkins, the jnlp 
slave began to work.

I did really dig into this, so my guess might not be correct.

-jv

Am 25.06.2013 08:13, schrieb Z W:

Hi All

We have trouble configuring windows as slaves to our linux box running 
jenkins; we configure the windows slaves to use jnlp
at the slaves we kicked off the jnlp box shows connected with no drop 
down menu to install as windows service but on jenkins it says not 
connected


Why is that ?

Thank you.
Sincerely
--
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.

For more options, visit https://groups.google.com/groups/opt_out.




--
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.
For more options, visit https://groups.google.com/groups/opt_out.




Re: 'Even Load Strategy' Plugin

2013-06-10 Thread John Vacz

Thank you, I will give it a try.
-jv

Am 07.06.2013 23:15, schrieb Brendan Nolan:

Hi John,

Yes. The plugin will choose the least loaded node from the list of 
nodes that are applicable for a given job. So if jobs are tied to 
certain nodes via labelling this will be respected.


The plugin is now officially hosted - 
https://wiki.jenkins-ci.org/display/JENKINS/Least+Load+Plugin and you 
can get it via the update center.


Brendan


On Fri, Jun 7, 2013 at 6:01 PM, John Vacz 
mailing.list.collect...@googlemail.com 
mailto:mailing.list.collect...@googlemail.com wrote:


Very interesting, is this plugin compatible with lable expression?
If so, it would be perfect for us. We have some important jobs
must run on 64bit  fastest nodes, should not be balanced to
other slaves, but other normal jobs should be balanced to the
idle slaves.

-jv

Am 04.06.2013 09:00, schrieb Brendan Nolan:

Hi David,

I've created a new 'Least Load' plugin that offers similar
functionality to the Cloudbees plugin. I'm currently waiting to
get it hosted but you can get a copy from -
https://github.com/bstick12/jenkins-ci-leastload

Brendan

On Tuesday, September 25, 2012 3:57:49 PM UTC+1, David Aldrich
wrote:

Hi

We use open source Jenkins but have a use case that would
benefit from an ‘even load’ scheduler algorithm. I.e. where
idle machines are preferred to the build machine previously used.

I have just come across Cloudbees’ Jenkins Enterprise 'Even
Load Strategy Plugin’.  I don’t know yet what the licensing
issues for this plugin are.  I.e. can it be used with open
source Jenkins?

Perhaps a more suitable question for this list is: is there a
similar plugin available in the public domain?

Best regards

David

-- 
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
mailto:jenkinsci-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.







--
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.
For more options, visit https://groups.google.com/groups/opt_out.




Re: 'Even Load Strategy' Plugin

2013-06-07 Thread John Vacz
Very interesting, is this plugin compatible with lable expression? If 
so, it would be perfect for us. We have some important jobs must run on 
64bit  fastest nodes, should not be balanced to other slaves, but 
other normal jobs should be balanced to the idle slaves.


-jv

Am 04.06.2013 09:00, schrieb Brendan Nolan:

Hi David,

I've created a new 'Least Load' plugin that offers similar 
functionality to the Cloudbees plugin. I'm currently waiting to get it 
hosted but you can get a copy from - 
https://github.com/bstick12/jenkins-ci-leastload


Brendan

On Tuesday, September 25, 2012 3:57:49 PM UTC+1, David Aldrich wrote:

Hi

We use open source Jenkins but have a use case that would benefit
from an ‘even load’ scheduler algorithm. I.e. where idle machines
are preferred to the build machine previously used.

I have just come across Cloudbees’ Jenkins Enterprise 'Even Load
Strategy Plugin’.  I don’t know yet what the licensing issues for
this plugin are.  I.e. can it be used with open source Jenkins?

Perhaps a more suitable question for this list is: is there a
similar plugin available in the public domain?

Best regards

David

--
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.

For more options, visit https://groups.google.com/groups/opt_out.




--
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.
For more options, visit https://groups.google.com/groups/opt_out.




Promotion: Status Code: 400,Exception: This page expects a form submission

2013-05-31 Thread John Vacz
We have recently problem with manual promotion (/Promoted Builds/ Plugin 
https://wiki.jenkins-ci.org/display/JENKINS/Promoted+Builds+Plugin), 
Jenkins returns



 Status Code: 400

Exception: This page expects a form submission

Does anyone see this issue?

In last several days we updated Jenkins to 1.515, and some other plugins 
to the latest version (ext-mail, envinject etc), which I dont think 
relevant.


We couldnt identify which update causes this problem, any information 
would help us to make better decision to which version should we 
rollback our production system. Thanks.


-jv

--
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.
For more options, visit https://groups.google.com/groups/opt_out.




403 jsonp forbidden (since 1.502)

2013-03-12 Thread John Vacz

Hi,
we have some html+js hosted in JENKINS/userContent/, and using the rest 
api (mainly jsonp, - we are planning to host those pages/script on a 
dedicated server later) extensively to cumulate/reorganise the 
information (both from Jenkins and other systems, like Jira) for 
different user groups . They work on browser session/cookie basis, as 
long as the user is logged in to Jenkins and Jira, then the scripts are 
working, no extra authentification is necessary. So far this solution 
works perfectly and helps alot.


However since 1.502, Jenkins responses 403 errors to the jsonp requests, 
so the scripts basically do not work anymore.


|htmlheadtitleError 403/title/headbody bgcolor=#ff
h1Status Code: 403/h1
Exception||: jsonp forbidden; can use -Dhudson.model.Api.INSECURE=true if you run 
without securitybrStacktrace||:
pre(none)
||/prebrhr size=1 width=90%
iGenerated by Winstone Servlet Engine v0.9.10 at Tue Mar 12 11:12||:31 CET 
2013/i/body/html|

The jvm parameter suggested in the error message does eliminates the 
error, and the scripts work again, but my concern is: does this paramter 
makes Jenkins access more open than necessary? Since we ARE using 
Jenkins built-in user database plus Role-Based Strategy, no anonymouse 
access (https only) .


Is this a security update of some unexpected side effect?

Any suggestion is greatly appreciated.
- jv


--
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.
For more options, visit https://groups.google.com/groups/opt_out.




RE: How to pass parameters between jobs - quick question

2013-01-12 Thread John Vacz
We also ended up generally saving all metadata (system/environment
variables, jenkins parameters, and build properties etc) into properties
file and archieve them. This approach simplifies/works around many problems
we had. Now every build has its metadata archived, for downstream jobs or
later references, we can get all necessary information from this one file,
no extra parameters needed to be pass around. Furthermore, if anything went
wrong, the metadata is very helpful for the investigation. I would also
recommend this simple strategy.
Am 11.01.2013 21:05 schrieb Stanley, Jason jason.stan...@tekelec.com:

 I ran into this very same problem.

 ** **

 It appears (at least with my experience) the only variables passed from
 Job A - Job B are the variables predefined by Jenkins.

 ** **

 To work around the issue,  in my build shell for Job A, I wrote the
 variable=value into a file and used the “Parameters from properties file”
 Parameter in the “Trigger parameterized build on other projects” when
 running Job B.

 ** **

 Jason

 ** **

 *From:* jenkinsci-users@googlegroups.com [mailto:
 jenkinsci-users@googlegroups.com] *On Behalf Of *zw
 *Sent:* Friday, January 11, 2013 2:50 PM
 *To:* jenkinsci-users@googlegroups.com
 *Subject:* How to pass parameters between jobs - quick question

 ** **

 Hi All

 ** **

 We have job A to kick off Job B

 Job A uses in build section execute shell to get a svn revision number and
 sets SVN_REVISION. 

 (We understand that there's the option to use This build is
 parameterized String Parameter and set SVN_REVISION value as HEAD, but we
 have our reasons to not use that)

 echo ${SVN_REVISION_NUM}

 export SVN_REVISION=${SVN_REVISION_NUM}

 echo ${SVN_REVISION}

 ** **

 output

 + SVN_REVISION_NUM=47337

 :

 + echo 47337

 47337

 + export SVN_REVISION=47337

 + SVN_REVISION=47337

 ** **

 In *Post-build Actions section*

 we have Trigger parameterized build on other projects, and predefined 
 parameter set to SVN_REVISION=${SVN_REVISION_NUM}

 ** **

 But in Job B console, it dosent see the revision number and Job B's SCM could 
 retrieve the revision number

 Location 'https://jobBhost.com/svn/src@${SVN_REVISION_NUM}' does not exist

 ** **

 What did we do wrong ?

 ** **

 Thanks

 ** **




Jenkins 1.496 CLI: java.lang.IllegalAccessError: org/kohsuke/args4j/CmdLineParser$1

2013-01-03 Thread John Vacz

Hello,

I am getting exception from jenkins CLI since upgraded to version 1.496:

+ java -jar jenkins-cli.jar -shttp://myjenkins:8080/jenkins  
http://comitdev15:8899/jenkins  -i /home/jenkins-slave/.ssh/id_rsa login
Exception in thread main java.lang.reflect.UndeclaredThrowableException
at $Proxy2.main(Unknown Source)
at hudson.cli.CLI.execute(CLI.java:323)
at hudson.cli.CLI._main(CLI.java:469)
at hudson.cli.CLI.main(CLI.java:374)
Caused by: java.io.IOException: Remote call on Chunked connection 
tohttp://myjenkins:8080/jenkins/cli  http://comitdev15:8899/jenkins/cli  
failed
at hudson.remoting.Channel.call(Channel.java:681)
at 
hudson.remoting.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:158)
... 4 more
Caused by: java.lang.IllegalAccessError: org/kohsuke/args4j/CmdLineParser$1
at org.kohsuke.args4j.CmdLineParser.init(CmdLineParser.java:94)
at hudson.cli.CLICommand.main(CLICommand.java:211)
at hudson.cli.CliManagerImpl.main(CliManagerImpl.java:92)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at 
hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:275)
at 
hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:256)
at 
hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:215)
at hudson.remoting.UserRequest.perform(UserRequest.java:118)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:326)
at 
hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
at hudson.cli.CliManagerImpl$1.call(CliManagerImpl.java:63)
at 
hudson.remoting.InterceptingExecutorService$2.call(InterceptingExecutorService.java:95)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)


Downgrade to 1.495 fixed the problem. Is there anyone having the same 
problem?


-vf


Re: Jenkins 1.496 CLI: java.lang.IllegalAccessError: org/kohsuke/args4j/CmdLineParser$1

2013-01-03 Thread John Vacz

Some more info:
This is a job executed in a debian slave, our jenkins master is also 
running on debian. It worked perfectly well in the last months (probably 
over 1 year).


Am 03.01.2013 17:24, schrieb John Vacz:

Hello,

I am getting exception from jenkins CLI since upgraded to version 1.496:

+ java -jar jenkins-cli.jar -shttp://myjenkins:8080/jenkins  
http://comitdev15:8899/jenkins  -i /home/jenkins-slave/.ssh/id_rsa login
Exception in thread main java.lang.reflect.UndeclaredThrowableException
at $Proxy2.main(Unknown Source)
at hudson.cli.CLI.execute(CLI.java:323)
at hudson.cli.CLI._main(CLI.java:469)
at hudson.cli.CLI.main(CLI.java:374)
Caused by: java.io.IOException: Remote call on Chunked connection 
tohttp://myjenkins:8080/jenkins/cli  http://comitdev15:8899/jenkins/cli  
failed
at hudson.remoting.Channel.call(Channel.java:681)
at 
hudson.remoting.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:158)
... 4 more
Caused by: java.lang.IllegalAccessError: org/kohsuke/args4j/CmdLineParser$1
at org.kohsuke.args4j.CmdLineParser.init(CmdLineParser.java:94)
at hudson.cli.CLICommand.main(CLICommand.java:211)
at hudson.cli.CliManagerImpl.main(CliManagerImpl.java:92)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at 
hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:275)
at 
hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:256)
at 
hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:215)
at hudson.remoting.UserRequest.perform(UserRequest.java:118)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:326)
at 
hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
at hudson.cli.CliManagerImpl$1.call(CliManagerImpl.java:63)
at 
hudson.remoting.InterceptingExecutorService$2.call(InterceptingExecutorService.java:95)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)

Downgrade to 1.495 fixed the problem. Is there anyone having the same 
problem?


-vf




EnvInject 1.52 exceptions

2012-05-16 Thread John Vacz

Hello,

after upgrade to Jenkins 1.463 and EnvInject 1.52, I can see large 
amount of exceptions when Jenkins starts up (see attachment). It seems 
to me like the change in EnvInject 1.52 is causing the exceptions. I 
think its somehow harmless, because all our jobs are still running as 
usual. The Jenkins manage screen also detected data in old format.  Wenn 
I try to discard/delete the old data, Jenkins shows a 500 page with 
stacktrace (see attachment).
Can I safely ignore the excpetions? Are there any ways to repair the 
incompatible data?


Thanks!
-jv
16.05.2012 15:54:15 hudson.util.RobustCollectionConverter populateCollection
WARNUNG: Failed to resolve class
com.thoughtworks.xstream.mapper.CannotResolveClassException: 
org.jenkinsci.plugins.envinject.EnvInjectBuilder$1 : 
org.jenkinsci.plugins.envinject.EnvInjectBuilder$1
at 
com.thoughtworks.xstream.mapper.DefaultMapper.realClass(DefaultMapper.java:68)
at 
com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:38)
at 
com.thoughtworks.xstream.mapper.DynamicProxyMapper.realClass(DynamicProxyMapper.java:71)
at 
com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:38)
at 
com.thoughtworks.xstream.mapper.PackageAliasingMapper.realClass(PackageAliasingMapper.java:88)
at 
com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:38)
at 
com.thoughtworks.xstream.mapper.ClassAliasingMapper.realClass(ClassAliasingMapper.java:86)
at 
com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:38)
at 
com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:38)
at 
com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:38)
at 
com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:38)
at 
com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:38)
at 
com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:38)
at 
com.thoughtworks.xstream.mapper.ArrayMapper.realClass(ArrayMapper.java:96)
at 
com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:38)
at 
com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:38)
at 
com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:38)
at 
com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:38)
at 
com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:38)
at 
com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:38)
at 
com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:38)
at 
com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:38)
at hudson.util.XStream2$CompatibilityMapper.realClass(XStream2.java:215)
at 
com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:38)
at hudson.util.xstream.MapperDelegate.realClass(MapperDelegate.java:43)
at 
com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:38)
at 
com.thoughtworks.xstream.mapper.CachingMapper.realClass(CachingMapper.java:56)
at 
com.thoughtworks.xstream.core.util.HierarchicalStreams.readClassType(HierarchicalStreams.java:29)
at 
com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.readItem(AbstractCollectionConverter.java:70)
at 
hudson.util.RobustCollectionConverter.populateCollection(RobustCollectionConverter.java:85)
at 
com.thoughtworks.xstream.converters.collections.CollectionConverter.unmarshal(CollectionConverter.java:61)
at 
hudson.util.RobustCollectionConverter.unmarshal(RobustCollectionConverter.java:76)
at 
com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:82)
at 
com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:63)
at 
com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:76)
at 
hudson.util.RobustReflectionConverter.unmarshalField(RobustReflectionConverter.java:292)
at 
hudson.util.RobustReflectionConverter.doUnmarshal(RobustReflectionConverter.java:234)
at 
hudson.util.RobustReflectionConverter.unmarshal(RobustReflectionConverter.java:181)
at 
com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:82)
at 
com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:63)
at 
com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:76)
at 
com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:60)
at 
com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:137)
at 

Re: Jenkins + Email-ext - How to configure per-project settings?

2012-05-15 Thread John Vacz
I also have the same problem after we upgraded to Jenkins 1.463 + 
Email-ext 2.20.


On 13.05.2012 21:09, v0idnull wrote:
I'm running Jenkins 1.463 and Email Ext 2.20. All post build actions 
are in a drop down menu for me, and they all add form elements except 
for Email Ext


On Sunday, 13 May 2012 15:06:55 UTC-4, Dan Stine wrote:

Editable Email Notification is checkbox-enabled on my installation,
not a drop-down.  I'm running Jenkins 1.448 and Email Ext 2.20.

Dan

On May 13, 1:40 pm, v0idnull v0idn...@gmail.com wrote:
 So I want to get emails from successful builds and it seems that
I need the
 email-ext plugin.

 So I've installed it, set it up to override global settings, set
everything
 correctly.

 But when I goto the project settings, when I try to select
Editable Email
 Notifications from the post build actions drop down, nothing
happens. It's
 not being added to the post build queue.

 So Im not sure what else I have to do to enable it, any help
would be
 greatly appreciated, thanks





Re: EnvInject does not pick up variables injected by ToolEnv plugin (solved)

2012-04-28 Thread John Vacz

On 27.04.2012 22:43, Grégory Boissinot wrote:



On Fri, Apr 27, 2012 at 11:10 AM, John Vacz 
mailing.list.collect...@googlemail.com 
mailto:mailing.list.collect...@googlemail.com wrote:


ToolEnv detects the tools installed automatically without extra
configuration and populated the path into variables with
predicatable name, this is a nice feature for our slave-only setting.


SharedObjects provides exactly the same feature (and more) without any 
extra configuration.

Procedure:
- Install EnvInject plugin and the complement shared objects plugin.
- From the EnvInject configuration
 Prepare an environment for the run   EnvInject Contributions  
check Populate Tool Installations


Path installation will be populated automatically.
Nice! Somehow I managed to completely oversee this option... This 
feature is the exact reason why I installed ToolEnv plugin, now I can 
happly remove it completely.

Thanks for the great work and explanation!


It's somehow more dynamic than EnvInject from this point of view.

It is your point of view.

Can you give me some suggestion how can I achieve the similar with
ShareObjects/EnvInject?


Feel free to report a feature request to the ToolEnv plugin.

Done


As someone has suggested before, it would be very nice if ToolEnv
and EnvInject can be merged together.

Am 27.04.2012 08 tel:27.04.2012%2008:34, schrieb Grégory Boissinot:

At the moment, ToolEnv is not aware of the EnvInject plugin.
Technically ToolEnv doesn't export its new environment variables
by an EnvironmentContribution action.
Therefore, EnvInject cannot capture environment variables
populated by the ToolEnv plugin.

However, you can install the SharedObjects plugin (this plugin is
a complement to the EnvInject plugin by providing the ability to
shared objects as environment variables. These objects can be
Tools and their installation paths are exposed as environment
variables.

On Thu, Apr 26, 2012 at 11:13 PM, John Vacz
mailing.list.collect...@googlemail.com
mailto:mailing.list.collect...@googlemail.com wrote:


Jenkins 1.460, debian native package (winstone)
EnvInject 1.46
ToolEnv 1.0



 Original Message 
Subject:EnvInject does not pick up variables injected by
ToolEnv plugin
Date:   Thu, 26 Apr 2012 23:04:24 +0200
From:   John Vacz mailing.list.collect...@googlemail.com
mailto:mailing.list.collect...@googlemail.com
To: Jenkins Users jenkinsci-users@googlegroups.com
mailto:jenkinsci-users@googlegroups.com



A trival job:
1. ToolEnv injected a enviroment variable JDK_1_6_HOME,
2. build step 1: shell script:  echo  -- Before envinject:
JDK1_6_HOME=$JDK1_6_HOME
3. build step 2: EnvInject injected another variable
SOME_ARG=$JDK1_6_HOME
Console output:

Started by user tester
[EnvInject] - Loading node environment variables.
Building remotely onslave4  
https://comitdev1/jenkins/computer/comitdev4  in workspace 
/home/jenkins-slave/jenkins-slave-fs-root/workspace/envinject-vs-toolenv
Setting 
JDK1_6_HOME=/home/jenkins-slave/jenkins-slave-fs-root/tools/jdk1.6/jdk1.6.0_26
[envinject-vs-toolenv] $ /bin/sh -xe /tmp/hudson2392984131553273240.sh
+ echo  -- Before envinject: 
JDK1_6_HOME=/home/jenkins-slave/jenkins-slave-fs-root/tools/jdk1.6/jdk1.6.0_26
  -- Before envinject: 
JDK1_6_HOME=/home/jenkins-slave/jenkins-slave-fs-root/tools/jdk1.6/jdk1.6.0_26
[EnvInject] - Injecting environment variables from a build step.
[EnvInject] - Injecting as environment variables the properties content
SOME_ARG=$JDK1_6_HOME

[EnvInject] - Variables injected successfully.
[EnvInject] - Unset unresolved 'SOME_ARG' variable.
Notifying upstream projects of job completion
Finished: SUCCESS
 




Build step 1 shows that $JDK1_6_HOME was correctly injected,
but EnvInject in build step 2 did not pick up the  variable
injected by ToolEnv plugin in pre-build stage. Variable
SOME_ARG remains empty. Is this a bug of EnvInject or just my
misunderstanding?

-- jv










EnvInject does not pick up variables injected by ToolEnv plugin

2012-04-26 Thread John Vacz

A trival job:
1. ToolEnv injected a enviroment variable JDK_1_6_HOME,
2. build step 1: shell script:  echo  -- Before envinject: 
JDK1_6_HOME=$JDK1_6_HOME

3. build step 2: EnvInject injected another variable SOME_ARG=$JDK1_6_HOME
Console output:

Started by user tester  https://comitdev1/jenkins/user/hzhang
[EnvInject] - Loading node environment variables.
Building remotely onslave4  https://comitdev1/jenkins/computer/comitdev4  in 
workspace /home/jenkins-slave/jenkins-slave-fs-root/workspace/envinject-vs-toolenv
Setting 
JDK1_6_HOME=/home/jenkins-slave/jenkins-slave-fs-root/tools/jdk1.6/jdk1.6.0_26
[envinject-vs-toolenv] $ /bin/sh -xe /tmp/hudson2392984131553273240.sh
+ echo  -- Before envinject: 
JDK1_6_HOME=/home/jenkins-slave/jenkins-slave-fs-root/tools/jdk1.6/jdk1.6.0_26
 -- Before envinject: 
JDK1_6_HOME=/home/jenkins-slave/jenkins-slave-fs-root/tools/jdk1.6/jdk1.6.0_26
[EnvInject] - Injecting environment variables from a build step.
[EnvInject] - Injecting as environment variables the properties content
SOME_ARG=$JDK1_6_HOME

[EnvInject] - Variables injected successfully.
[EnvInject] - Unset unresolved 'SOME_ARG' variable.
Notifying upstream projects of job completion
Finished: SUCCESS



Build step 1 shows that $JDK1_6_HOME was correctly injected, but 
EnvInject in build step 2 did not pick up the  variable injected by 
ToolEnv plugin in pre-build stage. Variable SOME_ARG remains empty. Is 
this a bug of EnvInject or just my misunderstanding?


-- jv




Fwd: EnvInject does not pick up variables injected by ToolEnv plugin

2012-04-26 Thread John Vacz


Jenkins 1.460, debian native package (winstone)
EnvInject 1.46
ToolEnv 1.0


 Original Message 
Subject:EnvInject does not pick up variables injected by ToolEnv plugin
Date:   Thu, 26 Apr 2012 23:04:24 +0200
From:   John Vacz mailing.list.collect...@googlemail.com
To: Jenkins Users jenkinsci-users@googlegroups.com



A trival job:
1. ToolEnv injected a enviroment variable JDK_1_6_HOME,
2. build step 1: shell script:  echo  -- Before envinject: 
JDK1_6_HOME=$JDK1_6_HOME

3. build step 2: EnvInject injected another variable SOME_ARG=$JDK1_6_HOME
Console output:

Started by user tester
[EnvInject] - Loading node environment variables.
Building remotely onslave4  https://comitdev1/jenkins/computer/comitdev4  in 
workspace /home/jenkins-slave/jenkins-slave-fs-root/workspace/envinject-vs-toolenv
Setting 
JDK1_6_HOME=/home/jenkins-slave/jenkins-slave-fs-root/tools/jdk1.6/jdk1.6.0_26
[envinject-vs-toolenv] $ /bin/sh -xe /tmp/hudson2392984131553273240.sh
+ echo  -- Before envinject: 
JDK1_6_HOME=/home/jenkins-slave/jenkins-slave-fs-root/tools/jdk1.6/jdk1.6.0_26
 -- Before envinject: 
JDK1_6_HOME=/home/jenkins-slave/jenkins-slave-fs-root/tools/jdk1.6/jdk1.6.0_26
[EnvInject] - Injecting environment variables from a build step.
[EnvInject] - Injecting as environment variables the properties content
SOME_ARG=$JDK1_6_HOME

[EnvInject] - Variables injected successfully.
[EnvInject] - Unset unresolved 'SOME_ARG' variable.
Notifying upstream projects of job completion
Finished: SUCCESS



Build step 1 shows that $JDK1_6_HOME was correctly injected, but 
EnvInject in build step 2 did not pick up the  variable injected by 
ToolEnv plugin in pre-build stage. Variable SOME_ARG remains empty. Is 
this a bug of EnvInject or just my misunderstanding?


-- jv




Re: promotion plugin: multiple levels of promotion

2012-04-10 Thread John Vacz
See the 'Criteria' section of each promotion process in job config 
screen. This one: when the following upsstream promotions are promoted 
might basically do what you want.


On 09.04.2012 23:08, Brian J. Murrell wrote:

The Promoted Builds Plugin description page
(https://wiki.jenkins-ci.org/display/JENKINS/Promoted+Builds+Plugin) says:

   In more complicated scenarios, one can set up multiple levels of
   promotions. This fits nicely in an environment where there are
   multiple stages of testings (for example, QA testing, acceptance
   testing, staging, and production.)

That's exactly the scenario I want to set up.  I have the promotion
plugin installed and I created a promotion called blessed.  I promoted
one of my builds with it just fine.

I'm at a loss however how I create a promotion option that will let me
promote (only) blessed promotions to my next level acceptance.

Any hints would be appreciated.

Thanks,
b.

   




Re: EnvInject: injecting environment variables from URL

2012-03-26 Thread John Vacz

Thanks for this quick upgrade!

However I got exception in log file (complete stacktrace in attachment):
 java.io.FileNotFoundException: /var/lib/jenkins/sharedObjects.xml (Is 
a directory)
I tried to remove the directory sharedObjects.xml, but it was created 
again when I pressed the save button. No error message on GUI.


Jenkins 1.455 (Debian native installation, winstone container)
envinject1.44
shared-objects0.20

If you need more information please let me know.

On 25.03.2012 16:02, Grégory Boissinot wrote:

It should be fix with SharedObjects plugin 0.20.

On Fri, Mar 23, 2012 at 7:13 AM, John Vacz 
mailing.list.collect...@googlemail.com 
mailto:mailing.list.collect...@googlemail.com wrote:


I have form submission problem on the shared objects configure
page when I access Jenkins through a local proxy (ssl tunneling).
I got  a server not found page when I click the save button,
Jenkins was trying to submit/redirect to
https://real-server-name/jenkins//manage, instead of (my guess)
https://my-local-proxy/jenkins/manage.

Is there any way to get around this? I tried lynx/w3m on the
remote server, but they seem to have difficulties dealing with the
drop down button gadget.

On 18.03.2012 22:51, Grégory Boissinot wrote:

Thanks for testing EnvInject plugin.

EnvInject is aimed at managing environment variables.
For your need, you can use the Shared Objects plugin.
It's a complement to the EnvInject plugin. It enables you to
share objects in your environment (such as in your case a
properties files through an URL) and inject its content as
environment variables with the EnvInject plugin.

You define your shared objects in the global Jenkins
configuration (Manage Jenkins Shared Objects) and check
'Propagate shared objects' in the 'Prepare an environment for the
job run' section.
Shared objects will be computed dynamically and the results will
be injected as environment variables for each job build.

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


On Fri, Mar 16, 2012 at 10:43 AM, John Vacz
mailing.list.collect...@googlemail.com
mailto:mailing.list.collect...@googlemail.com wrote:

Can EnvInject plugin inject enviroment variables defined in
.properties file from a URL? I tried but it did not work.
Have i missed something obvious?

Our particular use case is that we need to inject some mail
address lists as environment variables to be used by
Email-ext plugin, and it would be very handy if we can just
inject those variables directly from a http server (or our
anonymous SVN in this particular case). Meanwhile I add a
shell script to  download the .properties file and then use
EnvInject to inject them.

Furthermore, the variables are actually global, it would be
great if we do not need to inject them in every job, but
globally in Jenkins. I noticed that in Jenkins configure
screen, there is a Prepare jobs environment section
(provided by EnvInject?), it seems that one can inject
viarables from a file with absolute path. But have some
concerns: a) this injection is rather static, as the help
stated You must restart the node (master/slave) for the
consideration of this property, that means the variables
cannot be changed on the fly (I did not get a chance to test
this, so I might be wrong); b) I am not sure if this
injection is transparent in a master-slave setting.

Any suggestion is appreciated.







org.jenkinsci.plugins.sharedobjects.SharedObjectException: java.io.FileNotFoundException: /var/lib/jenkins/sharedObjects.xml (Is a directory)
at org.jenkinsci.plugins.sharedobjects.service.SharedObjectDataStore.writeSharedObjectsFile(SharedObjectDataStore.java:25)
at org.jenkinsci.plugins.sharedobjects.SharedObjectManagementResult.doSaveConfig(SharedObjectManagementResult.java:57)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:288)
at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:151)
at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:90)
at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:111)
at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:563)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:648)
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java

Re: EnvInject: injecting environment variables from URL

2012-03-26 Thread John Vacz
Sorry, forgot to say, that the redirection on save button works. The 
errors are only present in log file, no error messages on web pages, but 
the objects are not saved.


On 25.03.2012 16:02, Grégory Boissinot wrote:

It should be fix with SharedObjects plugin 0.20.

On Fri, Mar 23, 2012 at 7:13 AM, John Vacz 
mailing.list.collect...@googlemail.com 
mailto:mailing.list.collect...@googlemail.com wrote:


I have form submission problem on the shared objects configure
page when I access Jenkins through a local proxy (ssl tunneling).
I got  a server not found page when I click the save button,
Jenkins was trying to submit/redirect to
https://real-server-name/jenkins//manage, instead of (my guess)
https://my-local-proxy/jenkins/manage.

Is there any way to get around this? I tried lynx/w3m on the
remote server, but they seem to have difficulties dealing with the
drop down button gadget.

On 18.03.2012 22:51, Grégory Boissinot wrote:

Thanks for testing EnvInject plugin.

EnvInject is aimed at managing environment variables.
For your need, you can use the Shared Objects plugin.
It's a complement to the EnvInject plugin. It enables you to
share objects in your environment (such as in your case a
properties files through an URL) and inject its content as
environment variables with the EnvInject plugin.

You define your shared objects in the global Jenkins
configuration (Manage Jenkins Shared Objects) and check
'Propagate shared objects' in the 'Prepare an environment for the
job run' section.
Shared objects will be computed dynamically and the results will
be injected as environment variables for each job build.

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


On Fri, Mar 16, 2012 at 10:43 AM, John Vacz
mailing.list.collect...@googlemail.com
mailto:mailing.list.collect...@googlemail.com wrote:

Can EnvInject plugin inject enviroment variables defined in
.properties file from a URL? I tried but it did not work.
Have i missed something obvious?

Our particular use case is that we need to inject some mail
address lists as environment variables to be used by
Email-ext plugin, and it would be very handy if we can just
inject those variables directly from a http server (or our
anonymous SVN in this particular case). Meanwhile I add a
shell script to  download the .properties file and then use
EnvInject to inject them.

Furthermore, the variables are actually global, it would be
great if we do not need to inject them in every job, but
globally in Jenkins. I noticed that in Jenkins configure
screen, there is a Prepare jobs environment section
(provided by EnvInject?), it seems that one can inject
viarables from a file with absolute path. But have some
concerns: a) this injection is rather static, as the help
stated You must restart the node (master/slave) for the
consideration of this property, that means the variables
cannot be changed on the fly (I did not get a chance to test
this, so I might be wrong); b) I am not sure if this
injection is transparent in a master-slave setting.

Any suggestion is appreciated.









Re: No more scripts in View/Dashboard description

2012-03-21 Thread John Vacz
You can try Page Markup Plugin: 
https://software.sandia.gov/trac/fast/wiki/PageMarkup


With this plugin you can effectivly inject your javascript into page head.


On 07.03.2012 12:14, Daniel Tkatch wrote:

Hey,

if this is related I don't understand how.
Any way what additional security hole could a JavaScript functionality
introduce. I was really helpful to be able to run additional
JavaScript from a view's description.

:/

Daniel


On Mar 7, 11:40 am, Ullrich Hafnerullrich.haf...@gmail.com  wrote:
   

On 03/07/2012 11:31 AM, Daniel Tkatch wrote:  It's possible to use HTML in the 
view description in Jenkins. I also
 

used a JavaScriptscript  there, but since the last Jenkins update it
has no effect. Any idea how to get this back?
   

I'm not sure if this is 
related:http://jenkins-ci.org/content/critical-security-advisory-jenkins-core

Ulli
 




EnvInject: injecting environment variables from URL

2012-03-16 Thread John Vacz
Can EnvInject plugin inject enviroment variables defined in .properties 
file from a URL? I tried but it did not work. Have i missed something 
obvious?


Our particular use case is that we need to inject some mail address 
lists as environment variables to be used by Email-ext plugin, and it 
would be very handy if we can just inject those variables directly from 
a http server (or our anonymous SVN in this particular case). Meanwhile 
I add a shell script to  download the .properties file and then use 
EnvInject to inject them.


Furthermore, the variables are actually global, it would be great if 
we do not need to inject them in every job, but globally in Jenkins. I 
noticed that in Jenkins configure screen, there is a Prepare jobs 
environment section (provided by EnvInject?), it seems that one can 
inject viarables from a file with absolute path. But have some concerns: 
a) this injection is rather static, as the help stated You must 
restart the node (master/slave) for the consideration of this property, 
that means the variables cannot be changed on the fly (I did not get a 
chance to test this, so I might be wrong); b) I am not sure if this 
injection is transparent in a master-slave setting.


Any suggestion is appreciated.


Re: Mixing automatic and scheduled builds

2012-02-23 Thread John Vacz

On 23.02.2012 08:36, Sason wrote:

Hi there,

I'd like to set up two dependent build projects for the same software
product as follows:
- have a quick build run every time a developer commits changes,
i.e. using the SCM polling trigger. This will only be an incremental
build, followed by unit tests.
- run a scheduled full nightly build using the full test suite,
setup creation etc. once a day using the same SCM revision number as
the last successful/stable quick build (if there is one, and if that
revision number has increased since last time the nightly build
ran).

I wonder how this could be archived? My current understanding is that
it's hard to mix these two concepts in Jenkins. I know about the
Parameterized Trigger plugin which covers the use the same SCM
revision number requirement, but not the requirement of running only
once a day.

Thanks!
   
I think you can use copy artifacts plugin. The quick build job write its 
revision number in a file, which is archived as artifact. The nightly 
job just copy the archived file from the latest stable build of the 
quick job, and begin to build the same revision number. The nightly job 
may have some logic to check whether the latest stable revision number 
has been built (again, this can be done by archiving artifact and copy 
artifacts plugin). Or this logic can be isolated in an intermediate job 
that checkes the stable revision number of the quick job and trigger the 
nightly build if necessary.





Re: Monitor build file size (JavaScript and CSS in my case)

2012-02-14 Thread John Vacz

On 03.02.2012 01:25, Lindsey Simon wrote:
Actually, it looks like this just gives me the size of the workspace 
per build, not the individual files in that workspace.
In my case I care about the size of about a dozen files and want to 
monitor those in particular. Maybe it's time to get custom ;0

maybe this one?
https://wiki.jenkins-ci.org/display/JENKINS/Plot+Plugin