How to restrict user from viewing a particular view?

2012-11-21 Thread Bharathi Ramalingam
Hi All,
   I would like to restrict a set of users from viewing a particular view I 
added with some set of jobs.
Is there any plugin to do the same or Jenkins has any built-in capability 
to acheive it?

Thanks,


How to create a new page view.

2012-11-21 Thread Bharathi Ramalingam
Hi All,
   I am developing a plugin where I want to display Job statistics when 
clicked on the Job link.
My question is how can i define a URL and bind it to the page view.
Really appreciate any clues or help.

Thanks,


Re: Distributed "server", not just agents?

2012-11-21 Thread Les Mikesell
On Wed, Nov 21, 2012 at 12:50 PM, Nathan Neulinger  wrote:
>
> Southern:
>   Project 1, builds, and repositories
>   Periodically sync over builds to California site for product testing
>
> Western:
>   Project 2,3,4,5,6, builds, and repositories
>
> Asia:
>   Currently makes use of build output from projects 3,4,5,6
>
> I'd really like to manage all of the build configurations from one place,
> but I'm not seeing any good way to do that other than stuff like configuring
> it to not archive binaries, but rather do that myself with command/step
> executed at the end of the build or similar. Similarly, being able to define
> the build once centrally, but run it independently at each of three sites so
> a local copy is available at that site, but without constantly sending all
> the resulting build data around. (multiple gigabytes of build output per
> build)
>
> Same sort of concerns as the checkouts from VCS as well - would ideally like
> the checkouts to be maintained at the individual sites so I'm not sending a
> full checkout from the central server.

The bulk of the traffic is going to be between the VCS and the build
slave - plus wherever you collect the build results.   Jenkins
instances aren't particularly hard to manage - and you normally don't
even need to interact with them that much once the job is created in
the first place.  I'm not sure I see what problem you want solve by
combining sites that don't have much in common.  If your connectivity
isn't good, why bother?   I'd just push anything you need across sites
into something like a subversion repository that everything can access
so you only have to move the pieces actually being used.

-- 
   Les Mikesell
  lesmikes...@gmail.com


Re: failure build of jenkins job [ERROR: Failed to create /var/lib/jenkins/.m2]

2012-11-21 Thread Gábor Garami
I guess your Jenkins running under user named 'jenkins' and this user's
home is located there. IIRC there is a env var to specify maven's homedir...

Garami Gábor
gabor.gar...@hron.me
Skype: hron84
Tel: +36 20 235 9621

Sent from my T-Mobile G2
Ezt a levelet telefonról adták fel, ékezethibákat tartalmazhat.
2012.11.21. 20:20, "@tiyou"  ezt írta:

> Hi all,
>
> I'm tired to make a build of some job from svn repository, the checkout
> work's fine but the build fails !
>
> My JENKINS_HOME="/pic/dev/jenkins/vcur/var/lib/jenkins"
>
> So why is jenkins trying to create .m2 folder in /var/lib/jenkins instead
> of /pic/dev/jenkins/vcur/var/lib/jenkins/.m2 ??
>
> Console logs :
>
> Building in workspace /pic/dev/workspace_jenkins/foundation-bom/workspace
> Updating https://180.1.60.67:8443/svn/foundation/trunk/foundation-bom
> At revision 182 no change for
> https://180.1.60.67:8443/svn/foundation/trunk/foundation-bom since the
> previous build
> Parsing POMs
>
> *ERROR: Failed to create /var/lib/jenkins/.m2 
> Finished:
> FAILURE *
>
> Any help ??
>
> tks
>
>
>
>
>


Re: why no uninstall option for unused plugin

2012-11-21 Thread Gábor Garami
These plugins coming from jenkins core itself, so no way to uninstall them
(and it does not make sense).

Garami Gábor
gabor.gar...@hron.me
Skype: hron84
Tel: +36 20 235 9621

Sent from my T-Mobile G2
Ezt a levelet telefonról adták fel, ékezethibákat tartalmazhat.
2012.11.21. 20:20, "Martin d'Anjou"  ezt írta:

>  Hello,
>
> Do you know why there is no uninstall button for some of the unused
> plugins?
>
> For example, the External Monitor Job Plugin has not uninstall option:
>
>
>
> Thanks,
> Martin
>
<>

Are there any known limitations on Passwords Jenkins will/can support?

2012-11-21 Thread Merrow, Frank
We have a large number of Jenkins and use "Python Jenkins" to make 
administering them easier . . .

It was all great . . . it was all working . . . then . . . IT forced me to 
change the service account password.

Now with the SAME ACCOUNT (but of course a new password) those same scripts 
don't work.

They work with another user's username/password, but they don't work with the 
service account's username and new password.

There are only two odd things about the new password:


1.   It is 16 characters which is a little longer than most

2.   It has two "!" characters in it  (I have in the pass used passwords 
with one "!")

Are there any know issues or limitations on what password Jenkins can accept 
via the HTTP authentication?

The ONLY variable here is the new password . . . I am at a lost.

And because of all the windows services and all the jobs and all the places the 
password has to be updated . . . the system is down for almost two days any 
time I change the service account password . . . so moving to a new password is 
not something I want to attempt . . . unless for sure and for real . . . that 
is the issue.

Comments or suggestions welcomed . . .

Frank


Re: uninstallation pending message

2012-11-21 Thread Larry Shatzer, Jr.
It is waiting for you to restart Jenkins.

-- Larry


On Sun, Nov 18, 2012 at 6:43 PM, Martin d'Anjou
wrote:

>  Hi,
>
> Anyone knows what to do about the message "uninstallation pending" in the
> plugin manager after you attempt to uninstall a plugin?
>
>
>
>
>
> Thanks,
> Martin
>
>
<>

Re: Grails: Plugin Perform Maven Release

2012-11-21 Thread Larry Shatzer, Jr.
If you are using the Maven integration for Grails, it should be the same,
but if you are using the Grails plugin, the only thing you can do is use
the standard Release plugin to script it yourself. It's what I did, along
with some script code inside a shared plugin across projects that takes
care of the PreRelease steps and the PostRelease steps that are specific
for situation.


On Wed, Nov 21, 2012 at 5:14 AM, rportix  wrote:

> Hi,
>
> We have a Grails job, and we need the same functionality  that M2 Release
> Plugin for Grails. Dou you know about this?
>
> Thanks in advance
>
>
>
> --
> View this message in context:
> http://jenkins.361315.n4.nabble.com/Grails-Plugin-Perform-Maven-Release-tp4646810.html
> Sent from the Jenkins users mailing list archive at Nabble.com.
>


Re: Query about running different job steps on different slaves

2012-11-21 Thread Jerry
In addition to Jason's suggestion, you might be able to use the Join Plugin 
(https://wiki.jenkins-ci.org/display/JENKINS/Join+Plugin) to achieve what 
you want.

StartingJob triggers Slave1Job and Slave2Job, then runs FinishingJob when 
both are complete.

-- Jerry


On Wednesday, November 21, 2012 9:18:40 AM UTC-5, alok kumar wrote:
>
> Hi,
> Can anyone let me know if it is possible to execute different build steps 
> on different slaves from within a single job?
> Is there any plugin that supports that? If not, what can be the workaround 
> to achieve the same?
>
> Any help would be greatly appreciated.
>
> Thanks,
> Alok
>


Fwd: a lot of jobs

2012-11-21 Thread J Arrizza
It does look similar. However, the parameters it handles ( e.g
blockBuildWhenDownstreamBuilding)
are part of the default Jenkins behavior. At some point, they will also
have to add external plugin support. This is where the bigger problem is
waiting for them. If they can find a very simple, very elegant way to
handle a diversity of Jenkins plugins.

One way is they could use a plugin for each Jenkins plugin. And if they
want to support Hudson and thereby the conversion to Jenkins, they would
have to provide two plugins, one each for Hudson and Jenkins.

The YAML database is a nice touch. It might work well for them, if they
keep it minimal and simple. In their doc they imply it should be checked in
to source control. the idea being that all aspects of the jobs are held in
YAML. I suspect that approach will eventually cause problems for them.

My preference is to build the db every time I run the scripts. This allows
a bunch of fairly complex behavior to be captured by the scripting code. For
example, it is possible to enforce a job naming convention by writing a bit
of code to generate the names. To change the naming convention, I change
that bit of code. If the names are already in YAML, then I'd have to "hack"
the names manually with a text editor.

In any case, it might work quite well for the OP. It all depends on his
exact set up.

John

On Wed, Nov 21, 2012 at 10:03 AM, William Soula <
william.so...@drillinginfo.com> wrote:

>  What you describe sounds very similar to the jenkins-job-builder project
> from openstack:
> https://github.com/openstack-ci/jenkins-job-builder
>
>  Will
>


Re: Distributed builds - quick question

2012-11-21 Thread Jerry
Hi, zw. Correct on both counts. If you are not doing builds on the master, 
then you only need enough RAM and other resources to run the Jenkins 
server, which is pretty minimal. 8GB should be more than adequate.

-- Jerry


On Wednesday, November 21, 2012 12:52:41 PM UTC-5, zw wrote:
>
> Hi All 
>
> New users here. 
> We like to create a distributed build architecture, with 1 master and 
> 3 slaves (all linux boxes) 
> 1 - From what we understand thus far, when jobs are kicked off from 
> the master, we suppose the builds are checkout to the slaves and 
> builds are run on the slaves. Is that correct ? 
> 2 - If the slaves are making builds, we do not need a larger RAM size 
> (8GB) on the master relative to the slaves (16 GB each) if our builds 
> are large. Is that correct ? 
>
> Thanks for your thoughts. 
>


Questions about Jenkins - Master and Slave

2012-11-21 Thread Doron Shai
I have a Question about the Copy to Slave Plugin

I have Jenkins installed on a Windows Server (Master) and I have few shell
scripts that I want to execute on another Linux Server (defined as Slave).



These scripts have to run on the code that I sync to the Master Jenkins
server, and therefore I want to copy it from the Master to the Slave on
each Job iteration.



To do that I am using the Copy to Slave plugin, and here I need your
assistance.



The files on the Windows server that I need to copy are located on : *
"C:\JENKINS\BUILDS\Build_X"*



As the base Folder is *"C:\JENKINS\userConntent"*, then I enter this string
to the *"Files to copy"* box – *"..\BUILDS\$currentBuild\**/*"* ($currentBuild
is a parameter that I save on the Job and it is used to get the latest
Build Number)



Unfortunately, it doesn't work and I believe that I am using a wrong format
/ syntax.



I also tried to test it by trying to copy a file from *"C:\JENKINS"* root
folder which is called *"config.xml"* by putting the string *"..\config.xml
"* in the *"Files to copy"* box, still with no success.



Can you please tell me what I miss?


uninstallation pending message

2012-11-21 Thread Martin d'Anjou

Hi,

Anyone knows what to do about the message "uninstallation pending" in 
the plugin manager after you attempt to uninstall a plugin?






Thanks,
Martin

<>

failure build of jenkins job [ERROR: Failed to create /var/lib/jenkins/.m2]

2012-11-21 Thread @tiyou
Hi all,

I'm tired to make a build of some job from svn repository, the checkout 
work's fine but the build fails !

My JENKINS_HOME="/pic/dev/jenkins/vcur/var/lib/jenkins"

So why is jenkins trying to create .m2 folder in /var/lib/jenkins instead 
of /pic/dev/jenkins/vcur/var/lib/jenkins/.m2 ??

Console logs : 

Building in workspace /pic/dev/workspace_jenkins/foundation-bom/workspace 
Updating https://180.1.60.67:8443/svn/foundation/trunk/foundation-bom 
At revision 182 no change for 
https://180.1.60.67:8443/svn/foundation/trunk/foundation-bom since the 
previous build 
Parsing POMs 

*ERROR: Failed to create /var/lib/jenkins/.m2 
Finished: 
FAILURE *

Any help ??

tks






BuildNumber with groovy and api path ends in authentication required

2012-11-21 Thread Sven Finsterwalder
Hello,

i try that script in the script-console:
import jenkins.*
import jenkins.model.*
import hudson.model.*
import org.apache.commons.httpclient.*
import org.apache.commons.httpclient.auth.*
import org.apache.commons.httpclient.methods.*

def username = "username"
def apiToken = "token"
def client = new HttpClient()
client.state.setCredentials(new 
AuthScope("http://tstbld01c.rz.e-dict.net:8080/hudson/login?from=%2Fhudson%2F",8080,"realm";),new
 
UsernamePasswordCredentials(username, apiToken))
client.params.authenticationPreemptive=true

 
def buildNumber = 2
  println("hello${buildNumber}")
  
def urlDeployment = 
"http://tstbld01c.rz.e-dict.net:8080/hudson/job/selenium2-portalservices-FavoriteGameTests-2.2/";
def urlPart = 
"api/xml?depth=1&xpath=/freeStyleProject/build[action/cause/upstreamProject='dunia'
 
and action/cause/upstreamBuild=${buildNumber}]/number/text()"
 println(urlDeployment +""+urlPart)
  
def get = new GetMethod()
  get.setURI(new URI(urlDeployment+""+urlPart,false))
  println("here")
get.doAuthentication=true
  println("there")
client.executeMethod(get)
  println("wow")
response = get.getResponseBodyAsString()
println(response)

The Result is not what i have expected it got that:

hello2
http://tstbld01c.rz.e-dict.net:8080/hudson/job/selenium2-portalservices-FavoriteGameTests-2.2/api/xml?depth=1&xpath=/freeStyleProject/build[action/cause/upstreamProject='dunia'
 and action/cause/upstreamBuild=2]/number/text()
here
there
wow
window.location.replace('/hudson/login?from=%2Fhudson%2Fjob%2Fselenium2-portalservices-FavoriteGameTests-2.2%2Fapi%2Fxml%3Fdepth%3D1%26xpath%3D%2FfreeStyleProject%2Fbuild%255Baction%2Fcause%2FupstreamProject%3D%27dunia%27%2520and%2520action%2Fcause%2FupstreamBuild%3D2%255D%2Fnumber%2Ftext%28%29');*Authentication 
required*


*How can i resolve the authentication problem?*
*
*
Thanks for your help.


Perform Maven Release without Specify SCM login/password

2012-11-21 Thread rportix
Hi

I'm using the plugin Perform Maven Release without Specify SCM
login/password, but I've introduced the username a d password with the
servlet:  hudson/scm/SubversionSCM/enterCredential. I received the error:

Provider message:
The svn command failed.
Command output:
svn: Commit failed (details follow):
svn: OPTIONS of 'http://x/trunk': authorization failed: Could not
authenticate to server: rejected Basic challenge (http://1)

Please, help!!!

Thanks in advance



--
View this message in context: 
http://jenkins.361315.n4.nabble.com/Perform-Maven-Release-without-Specify-SCM-login-password-tp4646812.html
Sent from the Jenkins users mailing list archive at Nabble.com.


Grails: Plugin Perform Maven Release

2012-11-21 Thread rportix
Hi,

We have a Grails job, and we need the same functionality  that M2 Release
Plugin for Grails. Dou you know about this?

Thanks in advance



--
View this message in context: 
http://jenkins.361315.n4.nabble.com/Grails-Plugin-Perform-Maven-Release-tp4646810.html
Sent from the Jenkins users mailing list archive at Nabble.com.


why no uninstall option for unused plugin

2012-11-21 Thread Martin d'Anjou

Hello,

Do you know why there is no uninstall button for some of the unused plugins?

For example, the External Monitor Job Plugin has not uninstall option:



Thanks,
Martin
<>

Need help to perform a Maven release with Jenkins and Gitorious

2012-11-21 Thread lacribeir...@gmail.com
Hi everyone,
I need your help to solve a problem that I have when performing a Maven
Release in our new server with Gitorious.
When we where in the old server it was working fine, but now that we change
to a new server (a vm in amazon cloud) the release isn't working.
I can pull, commit or push from the machine with Jenkins. Only Maven Release
is missing.

Environment:
Jenkins ver. 1.460
Jenkins Maven Release Plug-in Plug-in ver: 0.9.1

pom.xml(127.0.0.1 because I don't want to give the real address):


scm:git:git://127.0.0.1:/gitserver/gitserver.git

developerConnection>scm:git:git@127.0.0.1:gitserver/gitserver.git


Jenkins job configuration:
Build Environment
Enable Artifactory release management: Unchecked
Maven release build: Checked
Release goals and options: -X -Dresume=false release:prepare release:perform
DryRun goals and options: -Dresume=false -DdryRun=true release:prepare
Default versioning mode: None
Preselect custom SCM comment prefix: Unchecked
Preselect append Hudson username: Unchecked
Preselect 'specify SCM login/password': Unchecked
Resolve artifacts from Artifactory: Unchecked

Gitorious Project:
Clone & oush urls;ssh;  git@127.0.0.1:gitserver/gitserver.git

Run results:
[INFO] [INFO] --- maven-failsafe-plugin:2.12:verify (verify) @
com.project.core.dom ---
…..
[INFO] [INFO] Reactor Summary:
[INFO] [INFO] 
[INFO] [INFO] proj-core .. SUCCESS
[0.201s]
[INFO] [INFO] dependency.package.gui  SUCCESS
[0.008s]
[INFO] [INFO] dependency.package.spring . SUCCESS
[0.012s]
….
[INFO] Executing: /bin/sh -c cd
/var/lib/jenkins/jobs/maven23_testbuild_maven_01/workspace && git push
gam.build@gitserver .com:gitserver/gitserver .git
develop_core_1_0:develop_core_1_0
[INFO] Working directory:
/var/lib/jenkins/jobs/maven23_testbuild_maven_01/workspace
mojoFailed org.apache.maven.plugins:maven-release-plugin:2.2.2(default-cli)
projectFailed com.gitserver :proj-core:1.0.92-SNAPSHOT
sessionEnded
[INFO]

[INFO] Reactor Summary:
[INFO] 
[INFO] proj-core .. FAILURE
[2:00.141s]
[INFO] dependency.package.gui  SKIPPED
[INFO] dependency.package.spring . SKIPPED
…..
Waiting for Jenkins to finish collecting data
mavenExecutionResult exceptions not empty
message : Failed to execute goal
org.apache.maven.plugins:maven-release-plugin:2.2.2:prepare (default-cli) on
project proj-core: Unable to commit files
Provider message:
The git-push command failed.
Command output:
ssh: connect to host gitserver.com port 22: Connection refused
fatal: The remote end hung up unexpectedly

cause : Unable to commit files
Provider message:
The git-push command failed.
Command output:
ssh: connect to host gitserver.com port 22: Connection refused
fatal: The remote end hung up unexpectedly

Stack trace : 
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute
goal org.apache.maven.plugins:maven-release-plugin:2.2.2:prepare
(default-cli) on project gam-core: Unable to commit files
Provider message:
The git-push command failed.
Command output:
ssh: connect to host gitserver.com port 22: Connection refused
fatal: The remote end hung up unexpectedly

at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213)
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at
org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at
org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at
org.jvnet.hudson.maven3.launcher.Maven3Launcher.main(Maven3Launcher.java:79)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at
org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:329)
at
org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:239)
at org.jvnet.hudson.maven3.agent.Maven3Main.launch(Maven3Main.java:158)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:98)
at hudson.maven.Maven3Builder.call(Maven3Builder.j

Re: Maven RedeployPublisher gets wrong user.home

2012-11-21 Thread atiyou
Hi Maxim,

Have you resolve the problem with jenkins build ?

I have the same ERROR: Failed to create /var/lib/jenkins/.m2
 
my JENKINS_HOME="/pic/dev/jenkins/vcur/var/lib/jenkins"

So i don't know why he try to creatre .m2 folder into /var/lib/jenkins/
instead of /pic/dev/jenkins/vcur/var/lib/jenkins


Any idea ??

tks for feedback



--
View this message in context: 
http://jenkins.361315.n4.nabble.com/Maven-RedeployPublisher-gets-wrong-user-home-tp3871496p4646370.html
Sent from the Jenkins users mailing list archive at Nabble.com.


Distributed "server", not just agents?

2012-11-21 Thread Nathan Neulinger
Are there any best practice/tutorial/idea documents for using jenkins in a 
distributed fashion - not for distributed builds, but rather for 
distributed sites.

In my case, I've got multiple physical locations, separated by slow(er) 
links. Their is some overlap between sites, but less frequent updates, i.e.:

Southern:
  Project 1, builds, and repositories
  Periodically sync over builds to California site for product testing

Western:
  Project 2,3,4,5,6, builds, and repositories

Asia:
  Currently makes use of build output from projects 3,4,5,6
  
I'd really like to manage all of the build configurations from one place, 
but I'm not seeing any good way to do that other than stuff like 
configuring it to not archive binaries, but rather do that myself with 
command/step executed at the end of the build or similar. Similarly, being 
able to define the build once centrally, but run it independently at each 
of three sites so a local copy is available at that site, but without 
constantly sending all the resulting build data around. (multiple gigabytes 
of build output per build)

Same sort of concerns as the checkouts from VCS as well - would ideally 
like the checkouts to be maintained at the individual sites so I'm not 
sending a full checkout from the central server. 

Is there any recommended approach to this sort of thing? I'm looking at 
possibly moving to Jenkins from a mix of TeamCity servers and some possibly 
from ElectricCommander.

-- Nathan


Retrieve server configuration via http

2012-11-21 Thread Don McNamara
Is there a way to retrieve the jenkins server configuration (config.xml) 
via http?

I can get job configuration no problem via the url: 
http://[servername]/job/[jobname]/config.xml

http://[servername]/config.xml  returns some data, but nothing that seems 
useful and definitely not the full config.xml file.

Thanks,
Don


RE: a lot of jobs

2012-11-21 Thread William Soula
What you describe sounds very similar to the jenkins-job-builder project from 
openstack:
https://github.com/openstack-ci/jenkins-job-builder

Will

From: jenkinsci-users@googlegroups.com [jenkinsci-users@googlegroups.com] on 
behalf of J Arrizza [cppge...@gmail.com]
Sent: Tuesday, November 20, 2012 8:39 PM
To: jenkinsci-users@googlegroups.com
Subject: Re: a lot of jobs

We have 420+ jobs. They are currently in Hudson but I am trying to convert to 
Jenkins, see below.

To manage them I wrote a nice set of ruby scripts where I declared the jobs and 
load them into a database (i.e. a ruby hash).

Then I use that DB to check if a job is new and needs to be created, or if it's 
old and needs to be deleted. The job creation is automated, but I do the job 
deletion manually - just in case.

It also compares the job settings against the DB contents and if they don't 
match, it will show me the differences and then, if I have the save_flag set to 
true, it will also update the Hudson job to match. This is a great feature. If 
someone manually changes the job, I know about it and I can revert their 
changes or change my scripts to match their updates.

I used ruby since I could easily create base classes, derived classes etc to 
accommodate the fact that most of the jobs are nearly identical. There are only 
a few base classes and all the other ones derive from them.

Going back to your post, you can use the same technique. In your case you'd 
have say 10, or most likely fewer, base classes and 2 derived classes, one each 
for the trunk/branch jobs. The jobs would be created from the derived classes 
and then be stored in the DB (again just a simple hash).

Once the DB is setup, a simple loop through it would configure all your jobs in 
one fell swoop. For example, mine sets up email addresses, sets job priorities, 
appointed slave nodes, job triggers, SCM triggers, Timer triggers, Locks, Xvnc, 
SCM repositories and a few others.

I put these scripts into our source control and now I have an audit trail of 
all the changes made to the jobs configurations. If something bad really 
happens, I could even revert to a prior version of the job configurations (it 
may require some changes of course).

And finally, the scripts provide an abstraction layer away from Hudson. I could 
convert to Jenkins by changing the job creation/update/delete portion of the 
scripts and voila, I have the exact same jobs on a Jenkins server.

But all is not peaches and cream.

As I said above I'm using Hudson. I used the ruby gem hudson-remote-api to 
shield me from some of the low level details. Unfortunately that gem does not:

1) handle plug-ins
2) handle Jenkins

The first means I  had to "manually" change the XML nodes for each plugin. 
There is some basic structural similarities in the XML across all plugins but 
there are enough exceptions that it is a headache.

The second means I would have to re-engineer the same hacks against the Jenkins 
XML nodes. There is a gem jenkins-remote-api but it is much less developed than 
hudson-remote-api.

The "solution" to both is to have all Hudson and Jenkins plug-in developers 
provide a uniform scripting front-end to their configuration XML. A highly 
unlikely scenario but you never know...

Not sure how much that helps you, but perhaps it can give you some potential 
avenues to try.


John



On Tue, Nov 20, 2012 at 2:27 PM, Sami Tikka 
mailto:sjti...@gmail.com>> wrote:
I type some Groovy commands into the Script Console you can find under the 
Manage Jenkins link in the sidebar.

-- Sami

Marcin Biegan mailto:marcin.bie...@gmail.com>> 
kirjoitti 15.11.2012 kello 2.39:

> Hi,
>
> I wanted to ask how do you handle configuring multiple jobs. We have
> about 10 maven projects to build in at least 2 versions (trunk/
> branch), which makes 20 jobs, some more for additional tests,
> releases, maybe deployment, verification, etc. Manually adding
> permissions and adjusting configuration of jobs is cumbersome. Is
> there a working plugin which would allow to set some 'parent' job
> which would define default configuration? (Template Project Plugin is
> not enough, because it 'works' only at job creation). I know also
> about Configuration Slicing Plugin, but this will not work in my case
> as it requires admin permissions.
>
> Thanks
> Marcin Biegan




Distributed builds - quick question

2012-11-21 Thread Z W
Hi All

New users here.
We like to create a distributed build architecture, with 1 master and
3 slaves (all linux boxes)
1 - From what we understand thus far, when jobs are kicked off from
the master, we suppose the builds are checkout to the slaves and
builds are run on the slaves. Is that correct ?
2 - If the slaves are making builds, we do not need a larger RAM size
(8GB) on the master relative to the slaves (16 GB each) if our builds
are large. Is that correct ?

Thanks for your thoughts.


Jenkins Executor environment variable set incorrectly?

2012-11-21 Thread David Weintraub
I have an Ivy project, and as part of the build, I do a cleancache each time. 
This makes builds a few seconds longer, but makes sure that I don't have any 
jar problems.

Since I do multiple builds at the same time, I have to make sure each executor 
is using a different Ivy cache. I do this with my ivysettings.xml file:












In theory, each executor gets its own Ivy cache from $HOME/.ivy2/cache-0 to 
$HOME/lvy2/cache-3.

However, I had been having resolution issues with Ivy, and discovered that 
Executor 0 and Executor 1 both have $EXECUTOR_NUMBER set to "0". 

Here's my Ivy configure setup:


http://ant.apache.org/ivy";
resource="org/apache/ivy/ant/antlib.xml">










And here's my output from both Executor 0 and Executor 1:

[ivy:configure] :: Apache Ivy 2.3.0-rc1 - 20120416000235 :: 
http://ant.apache.org/ivy/
 ::
[ivy:configure] :: loading settings :: file = 
/opt/tomcat/jenkins_home/jobs/core-sevices-engine-ivy/workspace/ivy.dir/ivysettings.xml
 [echo] DEBUG: Ivy Cache is set to /opt/tomcat/.ivy2/cache-0


However, Executor 2 and Executor 3 is giving me this:

[ivy:configure] :: Apache Ivy 2.3.0-rc1 - 20120416000235 :: 
http://ant.apache.org/ivy/
 ::
[ivy:configure] :: loading settings :: file = 
/opt/tomcat/jenkins_home/jobs/tc-commons-trunk/workspace/ivy.dir/ivysettings.xml
 [echo] DEBUG: Ivy Cache is set to /opt/tomcat/.ivy2/cache-2

ivy:configure] :: Apache Ivy 2.3.0-rc1 - 20120416000235 :: 
http://ant.apache.org/ivy/
 ::
[ivy:configure] :: loading settings :: file = 
/opt/tomcat/jenkins_home/jobs/tc-commons-trunk/workspace/ivy.dir/ivysettings.xml
 [echo] DEBUG: Ivy Cache is set to /opt/tomcat/.ivy2/cache-3

Is this a bug with Jenkins, or is there some assumption I'm making that's going 
wrong?

--
David Weintraub
qazw...@gmail.com


Sure, call me crazy. They called Eddie Antar crazy too, but
look at these low, low prices on these name brand appliances.



jobs workspaces copied between Windows and Linux - quick question

2012-11-21 Thread Z W
Hi All

Is it possible to copy jobs and workspaces configured on Windows to
Linux Jenkins/Hudson workspaces directories without issues or side
effects ?

Thanks


Re: How to tag Jobs for grouping in Dashboard

2012-11-21 Thread Marco Ambu
Is the filter by regular expression not enough? This is built in in Jenkins
and filters which projects are shown in each view. The procedure is the
same as for a normal jenkins view.


On 20 November 2012 04:41, indiws  wrote:

> Thanks Larry for the heads up.
> I found a way to accomplish what i require.
>
> I prefixed the label in the Project Name while creating new jobs. like
> Product_component-1,Product_component-2,
> And in Advanced Project Options -> Display name  I gave Component-1 etc.
> So that in the dashboard 'Display Name' will be used, and also i could
> identify the product from the Project name prefix.
>
> Probably a dirty way, but serves my need.
>
> Thanks,
>
>
>
>
>
> On Monday, November 19, 2012 3:23:17 PM UTC, Larry Shatzer, Jr. wrote:
>
>> I started work on a plugin that would allow you to label jobs to group
>> them together by using the JobProperty [1] extension point. I didn't get
>> too far (nothing usable) before I shelved it due to time and work load. You
>> might want to look into that extension point. I envisioned a way similar to
>> labeling nodes to allow you to label jobs that you could make use of in
>> filters for dashboards, and other uses.
>>
>> [1] https://wiki.jenkins-ci.**org/display/JENKINS/Extension+**
>> points#Extensionpoints-hudson.**model.JobProperty
>>
>> -- Larry
>>
>>
>> On Mon, Nov 19, 2012 at 6:10 AM, indiws  wrote:
>>
>>> Hi All,
>>>I am writing a custom portlet derived from Dashboard View. We have
>>> lots of components being built and using the custom portlet I would like to
>>> group them based on the product.Also they should be shown in a single
>>> page,( I dont want to create differents view for components). I am able get
>>> the jobs to be shown in the page.
>>> Is there any way to tag a job so that I could group it in my portlet or
>>> is there any other better way to do that.
>>> Please shed some lights on this.
>>>
>>> Thanks,
>>>
>>
>>


-- 
Marco Ambu
E-mail: marco.a...@gmail.com
LinkedIn profile: 


Re: Query about running different job steps on different slaves

2012-11-21 Thread Jason Swager
As far as I know, there is no plugin that lets you run individual build 
steps on a different slave than the one that job originally started on. 
 But there ways to mimic this behavior.

We do something like this in our own tests.  One job starts up; it has a 
parameter that indicates another slave on which to run parts of the test. 
 The original job (we call it the master job), then uses the Parameterized 
Trigger Plugin's build step plus the NodeLabel Plugin parameter to start 
another job (called a slave job) on the slave in question.  The ParamTrig 
build step can be set to wait until the slave job is finished running - 
that gives us sequential behavior: steps run on the master, then on the 
slave, then on the master.

Sometimes, we have to have steps running in parallel on the master and 
slave.  In that case, the ParamTrig build step can also start the job on 
the slave then immediately return to its own steps.  Synching the two 
executions can be difficult and tricky

On Wednesday, November 21, 2012 6:18:29 AM UTC-8, alok kumar wrote:
>
> Hi,
> Can anyone let me know if it is possible to execute different build steps 
> on different slaves from within a single job?
> Is there any plugin that supports that? If not, what can be the workaround 
> to achieve the same?
>
> Any help would be greatly appreciated.
>
> Thanks,
> Alok
>


Query about running different job steps on different slaves

2012-11-21 Thread alok kumar
Hi,
Can anyone let me know if it is possible to execute different build steps
on different slaves from within a single job?
Is there any plugin that supports that? If not, what can be the workaround
to achieve the same?

Any help would be greatly appreciated.

Thanks,
Alok


Jenkins Job name effects maven build

2012-11-21 Thread DeliveryNinja
Hi,

I have a problem with Jenkins where I cannot use a specific name for a 
build job. This error is driving me crazy.

The name I'm using is cf-corpxml-exp-qa-build-jar, when I run the build I 
get the following error 

Downloading: 
http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.2/maven-clean-plugin-2.2.pom[WARNING]
 Unable to get resource 'org.apache.maven.plugins:maven-clean-plugin:pom:2.2' 
from repository central (http://repo1.maven.org/maven2): Error transferring 
file: Connection timed out: connectDownloading: 
http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.2/maven-clean-plugin-2.2.pom[WARNING]
 Unable to get resource 'org.apache.maven.plugins:maven-clean-plugin:pom:2.2' 
from repository central (http://repo1.maven.org/maven2): Error transferring 
file: Connection timed out: connect[INFO] 
[ERROR] 
BUILD ERROR[INFO] 

[INFO] Error building POM (may not be this project's POM).


It cannot connect to the maven central repository to download the 
maven-clean-plugin. Now I've tried cloinging this job
exactly as it is and calling it CF-Test. This will then download the plugin as 
expected and complete successfully. 

Also changing the name to cf-corpxml-exp-qa-build-jar-2 also causes the job to 
start working. I've deleted the job and created
it again and the same problems persist. I've even gone and done the 
deletion/renaming directly in the jenkins jobs folder which also seems
to make no difference. Why would taking "-2" off the end of the name suddenly 
stop it connecting to maven central? All of our other jobs connect 
with no issues so it is definitely not a networking/firewall problem. 


I have this problem with 2 build jobs and we are running around 100 and 
I've never seen this issue before. I've tried everything and the only thing 
that is consistent is that using the name above causes the job to fail and 
not using the name allows it to download the plugin. 

We are using Maven 2 , Jenkins v1.456 and Java6 u29

Any ideas would be greatly appreciated.


FYI: Jenkins Security Advisory 2012-11-20

2012-11-21 Thread Lars Nordin
I got e-mail of this via cloudbees but wanted to make sure that list members 
were also aware (I didn't see one):
http://www.cloudbees.com/jenkins-advisory/jenkins-security-advisory-2012-11-20.cb

Excerpt from security announcement link above:
Severity:
CloudBees rates these vulnerabilities as high, when combined, as they allow 
malicious users to gain unauthorized access to the information and impersonate 
the administrator of the system. On the other hands, this attack can be only 
mounted passively, and the attacker needs to know the URL of your Jenkins 
installations.
Fix:
*Main line users should upgrade to Jenkins 1.491
*LTS users should upgrade to 1.480.1


Request to Cloudbees: please send a notification of this out on the Jenkins 
user list too



need help groovy script getBuildnumber

2012-11-21 Thread Sven Finsterwalder
Hello,

i hope some one can help me.
I have this groovy script:
import jenkins.*
import jenkins.model.*
import hudson.model.*
import org.apache.commons.httpclient.*
import org.apache.commons.httpclient.auth.*
import org.apache.commons.httpclient.methods.*

def username = "name"
def apiToken = "token"
def client = new HttpClient()
client.getState().setCredentials(new 
AuthScope("http://hudson/login?from=%2Fhudson%2F",8080,"realm";),new 
UsernamePasswordCredentials(username, apiToken))
client.params.authenticationPreemptive=true
 
def buildNumber = 2
  println("hello${buildNumber}")
  
def urlDeployment = 
"http://hudson/job/selenium2-portalservices-FavoriteGameTests-2.2/";
def urlPart = 
"api/xml?depth=1&xpath=/freeStyleProject/build[action/cause/upstreamProject='dunia'
 
and action/cause/upstreamBuild=${buildNumber}]/number/text()"
 println(urlDeployment +""+urlPart)
  
def get = new GetMethod()
  get.setURI(new URI(urlDeployment+""+urlPart,false))
  println("here")
get.setDoAuthentication(true)
get.doAuthentication=true
  println("there "+ get.getDoAuthentication())
  println("wow")
response = get.getResponseBodyAsString()
println(response)

But i do not get the correct answer. I got always:

Authentication required


What is wrong with my script, please help me.



Antwort: Re: Re: GetBuildnumber of started downstrem Job groovy

2012-11-21 Thread Andreas Schilling
hi Sven,

there you go:


http://YOURSERVER/job/$
{buildName}/api/xml?xpath=/*/nextBuildNumber" dest="buildNumber.xml" />






To make this work you need to insert the correct URL of your Jenkins 
instance and the job name you want to get the build number from. In our 
case we pass this in as the property buildName, but for a first test you 
can hardcode it. Or maybe you don't need it configurable at all.

Hope that helps.

Kind regards
 
Andreas Schilling
CAE Processes & Data Management
---
Dipl. Inf. Andreas Schilling
Senior Software Architect

TWT GmbH
Science & Innovation
Bernhäuser Str. 40 - 42
73765 Neuhausen
 
Tel: +49 - 7158 - 17 15 - 673
E-Mail: andreas.schill...@twt-gmbh.de

www.twt-gmbh.de

Geschäftsführung: Dimitrios Vartziotis, Joachim Laicher (stv.)
Registergericht: Amtsgericht Stuttgart, HRB Nr. 212778
Umsatzsteuer: ID-Nr.: DE147841145




Von:Sven Finsterwalder 
An: jenkinsci-users@googlegroups.com
Datum:  21.11.2012 10:34
Betreff:Re: Re: GetBuildnumber of started downstrem Job groovy
Gesendet von:   jenkinsci-users@googlegroups.com



Hi Andreas,

yes please give me the snippet.
I will try it.

Thanks.

Am Mittwoch, 21. November 2012 08:48:52 UTC+1 schrieb Andreas Schilling:
Sven, 

as far as I understood the point is that the order of job 
execution/triggering is important because the build number you want to 
have can then happen to be off by 1 or something? 
If you need the build number of a downstream job at a very specific point 
in time (e.g. right when the upstream job starts but has not yet triggered 
the downstream job) I'd suggest to include that into your build script. I 
can give you a snippet for ant that does that. 

kind regards,

Andreas Schilling
CAE Processes & Data Management
---
Dipl. Inf. Andreas Schilling
Senior Software Architect

TWT GmbH
Science & Innovation
Bernhäuser Str. 40 - 42
73765 Neuhausen

Tel: +49 - 7158 - 17 15 - 673
E-Mail: andreas@twt-gmbh.de

www.twt-gmbh.de

Geschäftsführung: Dimitrios Vartziotis, Joachim Laicher (stv.)
Registergericht: Amtsgericht Stuttgart, HRB Nr. 212778
Umsatzsteuer: ID-Nr.: DE147841145
 



Von:Sven Finsterwalder  
An:jenkins...@googlegroups.com 
Datum:21.11.2012 08:40 
Betreff:Re: GetBuildnumber of started downstrem Job groovy 
Gesendet von:jenkins...@googlegroups.com 



Good morning, 

is there no one who can help me? 

Thanks.

Am Dienstag, 20. November 2012 09:44:24 UTC+1 schrieb Sven Finsterwalder: 
Hi Andreas, 

thanks for that. 

But what if there are some other builds between the startet 
downstreambuild? 
I will explaine it: 

MainJob starts two downstream-jobs (deployment- and test-job) with some 
specific parameter. 
The deploymentjob could be used while the MainJob has triggered the 
downstreamjob. 
So if i use your line of code, i will not get the buildnumber of right 
build. 


Am Dienstag, 20. November 2012 09:26:51 UTC+1 schrieb Andreas Schilling: 
Hi Sven! 

You were nearly there :-) 

println(project.getFullName()+ ' ' + project.getNextBuildNumber()); 

If you need the current build number you have to subtract 1. 

Kind regards,

Andreas Schilling
CAE Processes & Data Management
---
Dipl. Inf. Andreas Schilling
Senior Software Architect

TWT GmbH
Science & Innovation
Bernhäuser Str. 40 - 42
73765 Neuhausen

Tel: +49 - 7158 - 17 15 - 673
E-Mail: andreas@twt-gmbh.de

www.twt-gmbh.de

Geschäftsführung: Dimitrios Vartziotis, Joachim Laicher (stv.)
Registergericht: Amtsgericht Stuttgart, HRB Nr. 212778
Umsatzsteuer: ID-Nr.: DE147841145
 



Von:Sven Finsterwalder  
An:jenkins...@googlegroups.com 
Datum:20.11.2012 09:13 
Betreff:GetBuildnumber of started downstrem Job groovy 
Gesendet von:jenkins...@googlegroups.com 



Hello, 

i try to get the buildnumber of a started downstream Job with groovy. 
Currently i got this: 

def deploymentJob = 
Jenkins.getInstance().getItemByFullName('deployment-universal-automatic-2.2') 

println(deploymentJob.getDownstreamProjects()) 

 List childs = deploymentJob.getDownstreamProjects() 
 for (Iterator iterator = childs.iterator(); 
iterator.hasNext()

Re: Re: GetBuildnumber of started downstrem Job groovy

2012-11-21 Thread Sven Finsterwalder
Hi Andreas,

yes please give me the snippet.
I will try it.

Thanks.

Am Mittwoch, 21. November 2012 08:48:52 UTC+1 schrieb Andreas Schilling:
>
> Sven, 
>
> as far as I understood the point is that the order of job 
> execution/triggering is important because the build number you want to have 
> can then happen to be off by 1 or something? 
> If you need the build number of a downstream job at a very specific point 
> in time (e.g. right when the upstream job starts but has not yet triggered 
> the downstream job) I'd suggest to include that into your build script. I 
> can give you a snippet for ant that does that. 
>
> kind regards,
>
> Andreas Schilling
> CAE Processes & Data Management
> ---
> Dipl. Inf. Andreas Schilling
> Senior Software Architect
>
> TWT GmbH
> Science & Innovation
> Bernhäuser Str. 40 - 42
> 73765 Neuhausen
>
> Tel: +49 - 7158 - 17 15 - 673
> E-Mail: andreas@twt-gmbh.de 
> 
> www.twt-gmbh.de
> 
> Geschäftsführung: Dimitrios Vartziotis, Joachim Laicher (stv.)
> Registergericht: Amtsgericht Stuttgart, HRB Nr. 212778
> Umsatzsteuer: ID-Nr.: DE147841145
>  
>
>
>
> Von:Sven Finsterwalder > 
> An:jenkins...@googlegroups.com  
> Datum:21.11.2012 08:40 
> Betreff:Re: GetBuildnumber of started downstrem Job groovy 
> Gesendet von:jenkins...@googlegroups.com  
> --
>
>
>
> Good morning, 
>
> is there no one who can help me? 
>
> Thanks.
>
> Am Dienstag, 20. November 2012 09:44:24 UTC+1 schrieb Sven Finsterwalder: 
> Hi Andreas, 
>
> thanks for that. 
>
> But what if there are some other builds between the startet 
> downstreambuild? 
> I will explaine it: 
>
> MainJob starts two downstream-jobs (deployment- and test-job) with some 
> specific parameter. 
> The deploymentjob could be used while the MainJob has triggered the 
> downstreamjob. 
> So if i use your line of code, i will not get the buildnumber of right 
> build. 
>
>
> Am Dienstag, 20. November 2012 09:26:51 UTC+1 schrieb Andreas Schilling: 
> Hi Sven! 
>
> You were nearly there :-) 
>
> println(project.getFullName()+ ' ' + project.getNextBuildNumber()); 
>
> If you need the current build number you have to subtract 1. 
>
> Kind regards,
>
> Andreas Schilling
> CAE Processes & Data Management
> ---
> Dipl. Inf. Andreas Schilling
> Senior Software Architect
>
> TWT GmbH
> Science & Innovation
> Bernhäuser Str. 40 - 42
> 73765 Neuhausen
>
> Tel: +49 - 7158 - 17 15 - 673
> E-Mail: andreas@twt-gmbh.de
> *
> **www.twt-gmbh.de* 
> 
> Geschäftsführung: Dimitrios Vartziotis, Joachim Laicher (stv.)
> Registergericht: Amtsgericht Stuttgart, HRB Nr. 212778
> Umsatzsteuer: ID-Nr.: DE147841145
>  
>
>
>
> Von:Sven Finsterwalder  
> An:jenkins...@googlegroups.com 
> Datum:20.11.2012 09:13 
> Betreff:GetBuildnumber of started downstrem Job groovy 
> Gesendet von:jenkins...@googlegroups.com 
>  --
>
>
>
> Hello, 
>
> i try to get the buildnumber of a started downstream Job with groovy. 
> Currently i got this: 
>
> def deploymentJob = 
> Jenkins.getInstance().getItemByFullName('deployment-universal-automatic-2.2') 
> println(deploymentJob.getDownstreamProjects()) 
>
>  List childs = deploymentJob.getDownstreamProjects() 
>  for (Iterator iterator = childs.iterator(); 
> iterator.hasNext();) { 
>AbstractProject project = iterator.next(); 
>println(project.getFullName()); 
>} 
>  
> How can i now get the buildnumber of the DownstreamJob? 
> I have read the 
> *documentation*but
>  i can not find a way to do it, please help me. 
>
> Thanks! 
>


Re: Developing a Jenkins plugin?

2012-11-21 Thread jserup
Thanks!



--
View this message in context: 
http://jenkins.361315.n4.nabble.com/Developing-a-Jenkins-plugin-tp4646762p4646790.html
Sent from the Jenkins users mailing list archive at Nabble.com.


Re: How to create custom table layout

2012-11-21 Thread clem
Hey Bharathi,

im not sure what exactly your needs are, but have a look at this Plugin.
https://wiki.jenkins-ci.org/display/JENKINS/Dashboard+View
(Maybe this will help you for your developing)

Im also using .jelly Files including HTML Tags, or creating HTML Elements 
like tables, so it is possible
through jelly.You also can implement Javascript Files into your .jelly 
File.Just by the way.

Greetings


Am Donnerstag, 15. November 2012 08:32:17 UTC+1 
schrieb Bharathi Ramalingam:
>
>
>
> Hello,
>   I am developing a custom Dashboard portlet for my project, where we want 
> to display child jobs of a component as shown in the below format, 
>
> I am just wondering if it is possible to create the layout of table using 
> jelly. I believe we could embed the HTML tags within jelly, I just want to 
> make sure if its possible through jelly.
>
>
>

Should my Jenkins user be a normal one with GUI?

2012-11-21 Thread frankgarcia
My current Jenkins installation runs in the background with a user that has 
no shell and no GUI

So far that is the normal setup I have read around. However my latest unit 
tests for drag/drop operations are failing because such user does not have 
a running pasteboard service. I am still trying to find out how start that 
service. Googling around I found this:

> nohup /System/Library/CoreServices/pbs &

But that is not working for Mountain Lion. I am no longer looking for a 
solution because now I believe this is not the real problem. I am planning 
to add automated GUI tests for OSX and iOS, therefore I believe I will be 
having more than just a pasteboard server not running problem. 

Should I create a normal system user for my Jenkins server? If so, I guess 
I will have to setup everything so every time the server starts, a full 
blown background user GUI session starts only for Jenkins. Any 
recommendations about how to do the auto-login in the background. I could 
not find that information  and I am wondering what is the normal setup of 
OSX users for Jenkins.

As quick/dirty solution I could just make Jenkins run under the same user I 
normally log in into my server... but that seems kind of... non-ethical?

thanks in advance
Francisco Garcia