Re: multiple git repos in one job

2012-07-06 Thread Sami Tikka

Chris Withers kirjoitti 6.7.2012 kello 20.25:

> Well, I can't, I don't have the knowledge or experience, but would the 
> maintainers of the git plugin do this if I raised a bug for it?

It doesn't hurt to try.

> I wish I could understand what the current multi-repository support in the 
> plugin is supposed to do... Where can I find out?

You refer to the possibility to set up multiple git repositories in the job 
configuration? That is there because the git plugin fully embraces the 
distributed nature of git.

If you have used subversion, you have become used to the idea there is only one 
repository. When you begin using git, everyone has trouble trying to wrap their 
head around the fact that every checkout is a repository. Usually you just 
ignore it and you have one repo on some server and everyone pulls and pushes to 
that one and your development model does not need to change much from what it 
was when you used subversion.

But git itself does not even have any concept of a "main repository". You might 
(and some have) change your development model so there is no one main 
repository but instead there are many. You could even go so far as to have a 
repository for every developer.

You can configure a Jenkins job with addresses of all your git repos (which are 
all clones of each other, not different projects) and Jenkins can pull from all 
of them, merge the code together and try if it builds and run tests.

Each repository you configure for the job becomes another "remote". See "git 
remote --help" for details.

Also, http://git-scm.com/book/en/Distributed-Git might be useful reading.

-- Sami

Re: [External] Re: Jenkins ssh and pull (copy) files

2012-07-06 Thread Fred G
Oh, ok.
I guess you have a good reason why you are not running a Jenkins slave on 
this remote machine?

It saves a lot of file copying trouble. ;)

On Friday, July 6, 2012 5:29:41 PM UTC+2, Ligade, Shailesh [USA] wrote:
>
> Thanks Fred, 
>
> I guess this would have worked..but I am not deploying to slave..it is 
> totally different VM, where I run bash script via SSH copy plugin.. 
>
> All I need is copy few log files back to master Jenkins, if my script 
> determines that deployment was failure, and attach the files to email. 
>
> Thanks 
>
> S 
>
> -Original Message- 
> From: jenkinsci-users@googlegroups.com [mailto:
> jenkinsci-users@googlegroups.com] On Behalf Of Fred G 
> Sent: Friday, July 06, 2012 9:23 AM 
> To: jenkinsci-users@googlegroups.com 
> Subject: [External] Re: Jenkins ssh and pull (copy) files 
>
> Hi, 
>
> The Copy To Slave Plugin (
> https://wiki.jenkins-ci.org/display/JENKINS/Copy+To+Slave+Plugin) 
> can copy back files to the master. Currently this is only available as a 
> post-build action, so I'm not sure if the files will be available to send 
> them as attachments. 
> Nevertheless it might still be cleaner than using ssh. 
>
> It shouldn't be a big deal to change the plugin so that "copy back to 
> master" is available as a normal build step. 
>
> HTH, 
>
> Fred 
>
> On Thursday, July 5, 2012 3:39:15 PM UTC+2, marathiboy wrote: 
>
> Hello, 
>  
> I need to pull files from remote machine and send it via email as 
> attachment. Once the files are on Jenkins server, I can do the 
> rest. 
>  
> In order to copy (pull) files from the remote server, is there any 
> plugin or 
> how can I use something like 
>  
> ssh target_address cat remotefile > localfile 
>  
> using ssh plugin? 
>  
> Thanks 
>  
> S 
>  
> -- 
> View this message in context: 
> http://jenkins.361315.n4.nabble.com/Jenkins-ssh-and-pull-copy-files-tp4633889.html<
> http://jenkins.361315.n4.nabble.com/Jenkins-ssh-and-pull-copy-files-tp4633889.html>
>  
>   
> Sent from the Jenkins users mailing list archive at Nabble.com. 
>  
>
>

Re: Copy artifacts failure on Windows

2012-07-06 Thread Chris Withers

On 03/07/2012 09:52, B.Latinville wrote:

Have a look at this issue :

https://issues.jenkins-ci.org/browse/JENKINS-13515

Downgrading copy artifacts plugin to 1.21 should solve you problem.


Yep, that fixed it for me.

Chris

--
Simplistix - Content Management, Batch Processing & Python Consulting
- http://www.simplistix.co.uk


Re: multiple git repos in one job

2012-07-06 Thread Chris Withers

On 02/07/2012 22:37, Sami Tikka wrote:


Your choices are (in no particular order):

A) Use git submodules
B) Use git subtrees
>> More importantly, would changes pushed to any of the submodules 
cause that repo to issue a request-to-build to the Jenkins server?
>> (which is ultimately what I'm after here: I want to make sure that 
changes pushed to the repos of both xlrd and xlwt cause the xlutils 
(which depends on both packages) jobs to kick off)

>
> Yes, it would. You would configure Jenkins with the address of the 
parent repo. Any change in the submodule repos does not take effect 
until the parent repo has been updated to refer to the new version of 
the submodule repo.


Doesn't feel like the correct solution here, and won't build the job 
when commits are made to the child repositories... (we disagree about 
this, requiring commits to a "container" repo is not the right thing 
here...)



D) Implement the "right" thing


Well, I can't, I don't have the knowledge or experience, but would the 
maintainers of the git plugin do this if I raised a bug for it?
I wish I could understand what the current multi-repository support in 
the plugin is supposed to do... Where can I find out?



E) Use something else than Jenkins


Well, nothing else comes even close in my opinion ;-)


C) Use repo
About C: repo is the tool Android project uses to manage multiple git 
repositories (http://source.android.com/source/version-control.html). There is 
a Jenkins plugin for that: 
https://wiki.jenkins-ci.org/display/JENKINS/Repo+Plugin


Thanks, I'll take a look :-)

cheers,

Chris

--
Simplistix - Content Management, Batch Processing & Python Consulting
- http://www.simplistix.co.uk


Re: Git and build workflow

2012-07-06 Thread Sami Tikka

aditya kirjoitti 6.7.2012 kello 6.22:

> Hello, 
>   I am new to Jenkins, so please excuse me for asking very simple question. 
> 
> I have a git repository with 2 branches on github (master and develop)
> 
> So what I want to accomplish is this automated work-flow
>   • When I commit to develop branch, the github triggers the jenkins, 
> which makes pull request
>   • Then it builds and runs the necessary tests
>   • If it passes, it somehow send a trigger to github to merge/rebase the 
> master with the develop branch
>   • When the branch is merged I did like that the master branch send a 
> separate hook to deploy it on to a staging server.
> 
> Can you please let me know if this is possible? If yes, how does one 
> implement such a workflow and recommended plugins to use.
> I have some idea regarding step 1 and step 2. Its more the step 3 and 4, I am 
> a bit confused.

You need to install the Git plugin. If you want to use service hooks from 
Github, I would also recommend the Github plugin.

In the job configuration, set "Repository URL" to your git repo.

Set "Branches to build" to "develop".

Click on the Advanced button (not the Advanced button under the Repository URL 
but the other Advanced :)

Check the box "Merge before build". Enter "master" into "Branch to merge to".

Now we have completed step 1.

It is usually a good idea to also check the box "Clean after checkout", just to 
be sure your build runs with a clean working directory.

Add the build steps to build and test your software. We have completed step 2.

When the job runs, you have a local git repository into which Jenkins has 
checked out master and merged any changes you had in develop into master. So 
I'm deviating from your specification above by making Jenkins perform the 
merge, not Github. But I think it is better this way.

If the build steps are successful, Jenkins will proceed into the post-build 
actions. 

Click on the "Add post-build action". Choose "Git publisher". Check the boxes: 
"Push only if build succeeds", "Merge results". Click on "Add branch". Fill in 
"Branch to push" = "master" and "Target remote name" = "origin" (or whatever 
you named your repository).

Now we have completed step 3: If the build and test succeeded, Jenkins will 
push the master from the local repo to your Github repo.

For step 4, depending on what you want to do, you might want to do the 
deployment in a build step in the same job or maybe trigger another job. Or is 
the deployment happening somehow outside of Jenkins? You need Github to notify 
some other system when master on Github is updated? If that's the case, you 
should maybe look into the notification hooks Github provides.

-- Sami

Re: very similar jobs as separate jobs

2012-07-06 Thread Benjamin Lau
I've dealt with this by having multiple upstream jobs and using the shell
to figure out which job triggered the real job and using that to apply the
minor tweaks.
I do this for a couple of different situations but the most interesting
deals with automatic merging of git branches. I needed to have different
behaviors for my daily merge and an hourly merge. The daily merge compiles
each of the component branches before merging... So it can take hours to
run (depending on how many branches are weing merged). The hourly just does
a code merge and stops. For the hourly and daily merges I have a very
simple job with some scheduling and something to set up a properties file
with the configuration for the downstrean build. I usually extract this
information by using the xml api to get the build metadata and parse it
using xmlstarlet[1] to extract the values I need.

I've also done this with matrix builds but I've dealt with all the
differences in my build scripts (Ant). I can then use the different axes
values to do various things. For all the builds these are used to setup
various keys and credentials needed for the finished application. And in
some cases there are extra changes like use of other bits of code (copied
over from another location depending on build parameters) or extra build
steps.

I'm a huge fan of bash and ant which I've used extensively over the past 7
years to automate all sorts of build tasks. I actually prefer doing a lot
of my build logic for Jenkins using bash/ant and just store it along with
my project in source control so I can keep records of the changes to the
build process over time. The scm checkout logic usually lives in Jenkins
(using either the git or svn components... though lately I've been using
bash for this as well since my source checkout rules have become a wee bit
more complicated than the scm plug-ins can deal with). But you can get a
long way with just stock Jenkins and the parameterized trigger plug-in. :-)

Ben
[1] http://xmlstar.sourceforge.net/
On Jul 6, 2012 10:14 AM, "Sami Tikka"  wrote:

>
> Bram de Jong kirjoitti 6.7.2012 kello 11.00:
>
> > On Tue, Jun 19, 2012 at 8:50 PM, Sami Tikka  wrote:
> >> So, you have a number of jobs that are mostly identical but there's a
> >> little bit that should work differently for them.
> >>
> >> To me this sounds like a perfect case of multi-configuration job.
> >> https://wiki.jenkins-ci.org/display/JENKINS/Building+a+matrix+project
> >>
> >> Essentially, Jenkins will run your job a number of times but each run
> >> will have a different value for an environment variable. You can then
> >> vary the build behavior based on the environment variable.
> >
> > This actually sounds good for us?
> >
> > * Is there any way to do inter-matrix-job dependencies - or possibly a
> > way to trigger another build for some of the matrix points?
>
> AFAIK, no. You can configure a matrix job to execute some configurations
> first, but not real dependencies.
>
> > * Will jobs share the same checkout on disk or will a different
> > checkout be created for each point in the matrix?
>
> Each matrix configuration acts like it was a job of it's own. Each
> configuration checks out the source separately.
>
> > * Can some points in the matrix be hardwired to certain nodes? (for
> > example mac <-> windows)
>
> Yes, a configuration axis can also be a slave name or label.
>
> -- Sami


Re: The authorization of the Artifactory in Jenkins does not work.

2012-07-06 Thread Noam Y. Tenne
Hi, 

What version of Maven do you use?
Try running within the same environment "*mvn help:effective-settings*" and 
make sure that the configuration you expect actually applies.

-Noam

On Thursday, July 5, 2012 9:27:25 PM UTC+3, José Ricardo wrote:
>
> Hello,
>
> I´m using Artifactory 2.4.0 and Jenkins 1.438 and I have maven project 
> with several modules. Need to deploy all modules(jars and one resulting 
> war) 
> into remote Artifactory server by Jenkins.
>
> My user admin for artifactory was with default password (password) and all 
> builds that I tried to execute on jenkins works fine.  So when I resolved 
> to change de Artifactory admin password and update my settings with the new 
> credentials of admin, I had the following error on jenkins build log:
>
> Failed to execute goal 
> org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on 
> project pilotoExemplo: Failed to deploy artifacts: 
> Could not transfer artifact 
> br.com.pilotoExemplo:pilotoExemplo:pom:2.1.0.11-20120705.160113-1 from/to 
> snapshot 
> (http://170.20.105.25:8080/artifactory/libs-snapshot-local): Failed to 
> transfer file: 
>
> http://170.20.105.25:8080/artifactory/libs-snapshot-local/br/com/pilotoExemplo/pilotoExemplo/2.1.0.11-SNAPSHOT/pilotoExemplo-2.1.0.11-20120705.160113-1.pom.
>  
>
> Return code is: 401 
>
> Anyone already saw this problem before? I don´t found anything like this 
> search on the google.
>
> Here is my settings.xml:
>
> 
>   
>false
>http
> 172.10.0.145
> 3120
> 
>   
>  
>   
> 
>   *
>   repositorio
>   http://170.20.105.25:8080/artifactory/repo
>   repositorio
> 
>   
>  
>   
> 
>   
> 
>   
> true
>   
>   central
>   libs-release
>   http://170.20.105.25:8080/artifactory/libs-release/
> 
> 
>   
>   snapshots
>   libs-snapshot
>   http://170.20.105.25:8080/artifactory/libs-snapshot/
> 
>   
>   
> 
>   
> false
>   
>   central
>   plugins-release
>   http://170.20.105.25:8080/artifactory/plugins-release
> 
>   
>   artifactory
>   
> 
> release
> http://170.20.105.25:8080/artifactory/libs-release-local/
> 
> 
> 
> snapshot
> http://170.20.105.25:8080/artifactory/libs-snapshot-local/
> 
> 
>   
> 
>   
>  
>   
> artifactory
>   
>  
>   
> 
>   snapshot
>admin
>   newPassword
> 
>  
> 
>   release
>   admin
>   newPassword
> 
>  
> 
>   repositorio
>admin
>   newPassword
> 
>  
>   
>  
>
>
>

Re: How can I configure a different sender email address for each build?

2012-07-06 Thread Aaron Kushner
Here's the answer. Put the following in the pre-send script box.

import javax.mail.Message.RecipientType
import javax.mail.Address
import javax.mail.internet.InternetAddress
import javax.mail.internet.MimeMessage

msg.setFrom(new InternetAddress("john@server.com"))


Re: very similar jobs as separate jobs

2012-07-06 Thread Sami Tikka

Bram de Jong kirjoitti 6.7.2012 kello 11.00:

> On Tue, Jun 19, 2012 at 8:50 PM, Sami Tikka  wrote:
>> So, you have a number of jobs that are mostly identical but there's a
>> little bit that should work differently for them.
>> 
>> To me this sounds like a perfect case of multi-configuration job.
>> https://wiki.jenkins-ci.org/display/JENKINS/Building+a+matrix+project
>> 
>> Essentially, Jenkins will run your job a number of times but each run
>> will have a different value for an environment variable. You can then
>> vary the build behavior based on the environment variable.
> 
> This actually sounds good for us?
> 
> * Is there any way to do inter-matrix-job dependencies - or possibly a
> way to trigger another build for some of the matrix points?

AFAIK, no. You can configure a matrix job to execute some configurations first, 
but not real dependencies.

> * Will jobs share the same checkout on disk or will a different
> checkout be created for each point in the matrix?

Each matrix configuration acts like it was a job of it's own. Each 
configuration checks out the source separately.

> * Can some points in the matrix be hardwired to certain nodes? (for
> example mac <-> windows)

Yes, a configuration axis can also be a slave name or label.

-- Sami

Re: Building the same branch in different repositories/jobs

2012-07-06 Thread Sami Tikka
A pretty pickle you've gotten yourself into.

These are the options that come to mind (in no particular order):

a) Instead of having the 3 jobs with git branch as parameter, make several sets 
of 3 jobs. Each set has a fixed branch they build from. If creating the jobs is 
too much manual work, you can automate the creation of the jobs, either with a 
script or with a Jenkins job.

b) Try to use Parameterized Trigger plugin to trigger downstream builds. Pass a 
"predefined parameter" in the form of BRANCH_TO_BUILD=$GIT_BRANCH. Apparently 
the git plugin sets GIT_BRANCH, I just do not know if that is available in the 
Parameterized Trigger, but I'm fairly sure it should be.

c) Make a new plugin that supports picking up the git branch and passing it on.

d) Install Groovy post build plugin and use a groovy script to dig up the 
branch and pass it on.

-- Sami

Thomas Ferris Nicolaisen kirjoitti 6.7.2012 kello 11.30:

> Hi,
> 
> We have a product which is split into a number of different Git repositories. 
> They are built and released separately, but have dependencies on each other 
> that we track by using the same branch-names and tags in each repository.
> 
> To illustrate, here are three repositories with three branches in each:
> 
> * repo "foo-library"
> master
> 2.17.x
> 2.16.x
> 
> * repo "foo-framework" (depends on foo-library)
> master
> 2.17.x
> 2.16.x
> 
> * repo "foo-application" (depends on foo-framework)
> master
> 2.17.x
> 2.16.x
> 
> 
> Each of these repositories have one job in Jenkins to build and deploy them 
> into our Maven repository. The jobs trigger each other respectively.
> 
> This works really well, as long as we stick to using one branch (master). But 
> once we start doing work in the other branches we are running into trouble:
> 
> When "foo-library" builds the 2.16.x branch, it should trigger builds 
> downstream and also order them to build the 2.16.x branches in 
> "foo-framework" and "foo-application". 
> 
> However, normal behavior is to build the branch with the latest changes 
> (which may, or may not be 2.16.x).
> 
> 
> *** Our attempts at a solution ***
> 
> We've tried parameterizing the downstream jobs with a ${GIT_BRANCH}, which is 
> passed properly from the upstream job, and using it as branch-specifier in 
> the downstream jobs: origin/${GIT_BRANCH}
> 
> However, when a downstream job like foo-application is triggered from an SCM 
> change, the GIT_BRANCH parameter is empty, and the build fails with no branch 
> found.
> 
> The knee-jerk reaction to that is to provide a default GIT_BRANCH value in 
> case none is provided, like "origin/master". This limits the SCM-polling to 
> only detect and run builds in the master branch. If we try specifying a 
> default like "origin/*", the wildcard is not evaluated by the Jenkins Git 
> plugin (Could not checkout origin/**).
> 
> If we keep the default GIT_BRANCH as "origin/master", and add more branch 
> specifiers (so we have one "origin/${GIT_BRANCH}" and one "origin/*", we come 
> back to the problem that the latest changed branch is built, also when 
> triggered from upstream.
> 
> *** The sub-optimal solutions ***
> 
> 1) Create SCM-trigger-sister jobs, whose only purpose is to scan for changes 
> in SCM, and notify the real jobs with proper GIT_BRANCH parameters.
> 2) Stick to default GIT_BRANCH=origin/master, and teach our developers to 
> manually trigger jobs in other branches when needed (having them punching in 
> GIT_BRANCH=2.17.x when they want to run that branch).
> 
> Problem with the first one is that we actually have around 40 jobs that do 
> various things with our repositories, and about 30 of these would need new 
> trigger-sister jobs. That's a lot of new Jenkins jobs to maintain, for 
> something which sounds easy in principle..
> 
> Problem with the second one is as with all manual work, it will be forgotten, 
> old build artifacts will be assumed to be freshly built, confusion ensues, 
> etc.
> 
> I've scanned through the Jenkins plugins looking for something like a 
> "conditional branch selector", but haven't found anything. 
> 
> If we express some logic in the Git branch specifier that says "if GIT_BRANCH 
> parameter is null, just use the ** specifier", we'd be fine. 
> 
> Anyone have any ideas how we can pull this off?



Re: Problem running slaves

2012-07-06 Thread Sami Tikka
You can specify path to java command in the slave configuration.

-- Sami

David Mata kirjoitti 6.7.2012 kello 16.09:

> The only way to get it that I found was run the slave by using my own script. 
> Start the slave via SSH option was impossible.
> 
> Thank you
> 
> El jueves, 5 de julio de 2012 21:37:55 UTC+2, David Mata escribió:
> Hello. 
> 
> Does anybody know why jenkisn slave cab give this to me?
> 
> Thank you all
> 
> 21:31:43  java.io.IOException: Cannot run program "java" (in directory 
> "/shared/cis/slavejenkins/
> workspace/ext-libs"): java.io.IOException: error=2, No such file or directory
> 
> 21:31:43  at java.lang.ProcessBuilder.start(ProcessBuilder.java:460)
> 21:31:43  at hudson.Proc$LocalProc.(Proc.java:244)
> 21:31:43  at hudson.Proc$LocalProc.(Proc.java:216)
> 21:31:43  at hudson.Launcher$LocalLauncher.launch(Launcher.java:709)
> 21:31:43  at hudson.Launcher$ProcStarter.start(Launcher.java:338)
> 21:31:43  at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:934)
> 21:31:43  at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:901)
> 21:31:43  at hudson.remoting.UserRequest.perform(UserRequest.java:118)
> 21:31:43  at hudson.remoting.UserRequest.perform(UserRequest.java:48)
> 21:31:43  at hudson.remoting.Request$2.run(Request.java:287)
> 21:31:43  at 
> hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
> 21:31:43  at 
> java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
> 21:31:43  at java.util.concurrent.FutureTask.run(FutureTask.java:138)
> 21:31:43  at 
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> 21:31:43  at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> 21:31:43  at java.lang.Thread.run(Thread.java:662)



Build dependency in jenkins

2012-07-06 Thread sugudheenu
Hi All,

We have a bunch of projects that are dependant on each other and they have 
to be build in a particular order. Each project has "Poll SCM" setup to 
check if there are any changes. We have upstreams and downstreams setup but 
what I really want is before I build my child project I want to check if 
the parents projects have version has changed and build them in the right 
order before the current project is build. I am new to Jenkins any help is 
appreciated. 

Thanks
sugudheenu


multi job plugin

2012-07-06 Thread marathiboy
Hello,

I want to use multi job plugin to build all (9) jobs. I would like to build
all jobs in parallel in one phase. Next phase will deploy them.

I only have 4 executors. So when I kick off my multi job, I starts 3 jobs
(plus on for multi job itself). and I can see 5 jobs in queue. So everything
is great. However, when one of 3 jobs are done, next one is not picked from
the queue. The 5 jobs just stays in queue even if all 3 jobs are done (the
main multi job still occupies one  executor).

Only way to get the queue moving again, is to manually kill original multi
job and suddenly queue is flushed. So the status of multijob is always gray
:-(

Is this normal behavior?

Thanks

S

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


RE: [External] Re: Jenkins ssh and pull (copy) files

2012-07-06 Thread Ligade, Shailesh [USA]
Thanks Fred,

I guess this would have worked..but I am not deploying to slave..it is totally 
different VM, where I run bash script via SSH copy plugin..

All I need is copy few log files back to master Jenkins, if my script 
determines that deployment was failure, and attach the files to email.

Thanks

S

-Original Message-
From: jenkinsci-users@googlegroups.com 
[mailto:jenkinsci-users@googlegroups.com] On Behalf Of Fred G
Sent: Friday, July 06, 2012 9:23 AM
To: jenkinsci-users@googlegroups.com
Subject: [External] Re: Jenkins ssh and pull (copy) files

Hi,

The Copy To Slave Plugin 
(https://wiki.jenkins-ci.org/display/JENKINS/Copy+To+Slave+Plugin)
can copy back files to the master. Currently this is only available as a 
post-build action, so I'm not sure if the files will be available to send them 
as attachments.
Nevertheless it might still be cleaner than using ssh.

It shouldn't be a big deal to change the plugin so that "copy back to master" 
is available as a normal build step.

HTH,

Fred

On Thursday, July 5, 2012 3:39:15 PM UTC+2, marathiboy wrote:

Hello, 

I need to pull files from remote machine and send it via email as 
attachment. Once the files are on Jenkins server, I can do the rest. 

In order to copy (pull) files from the remote server, is there any 
plugin or 
how can I use something like 

ssh target_address cat remotefile > localfile 

using ssh plugin? 

Thanks 

S 

-- 
View this message in context: 
http://jenkins.361315.n4.nabble.com/Jenkins-ssh-and-pull-copy-files-tp4633889.html
 

  
Sent from the Jenkins users mailing list archive at Nabble.com. 




Re: Triggering build twice for each commit

2012-07-06 Thread Johno Crawford


On 6/07/2012 4:56 PM, Varghese Renny wrote:

So how can set it synchronized with my window , linux and svn repo..
any plugin i need to install?
Or we can configure it in jenkin itself?



Thanks in Advance
varghese


Is your SVN repo and Jenkins on the same server? Are they configured 
using the same timezone? Alternatively, appending @HEAD to your SVN url 
may help.


Re: jenkins stability? (jenkins release too frequently)

2012-07-06 Thread Mark Waite
Your last questions were "jieryn makes mention of Jenkins LTS, how do I get 
this? How do I stop Jenkins "offering" me new versions of Jenkins which aren't 
stable or aren't LTS?"

Refer to https://wiki.jenkins-ci.org/display/JENKINS/LTS+Release+Line for 
instructions on how to switch to the long term support release line.

Since Jenkins is an open source project, one really great way to help the 
project is to assist with testing and verification of long term support release 
candidates.  Refer to http://jenkins-ci.org/stable-rc for information on how to 
get the release candidates, if you're available to assist with testing release 
candidates for long term support.

Mark Waite



>
> From: Chris Withers 
>To: jenkinsci-users@googlegroups.com 
>Sent: Thursday, July 5, 2012 11:27 AM
>Subject: jenkins stability? (jenkins release too frequently)
> 
>Hi All,
>
>A little alarmed to read this:
>
>"""
>I have no inclination to continue beyond that version until a new Jenkins LTS 
>is cut. I am not going to be spending any more time or energy supporting 
>plugins beyond the latest Jenkins LTS. I'm sorry, but I have a lot of things I 
>want to do with my time, and constantly putting out new fires for moving 
>target versions of Jenkins isn't even on the first page of the list..
>"""
>from https://issues.jenkins-ci.org/browse/JENKINS-13114.
>
>I can certainly symathise, there seems to be much brown bag-ism in the current 
>releases, not only in the core (such as breaking all matrix configuration jobs 
>as in the current release) but also in the impact the releases are having on 
>third party plugins.
>
>I'm a know-nothing when it comes to Jenkins own development process, but does 
>it perhaps need to slow down a little and focus on quality and stability? Does 
>the Jenkins build process do anything to check what plugins will break with a 
>particular release? Could it?
>
>How does Jenkins do on the API stability front? Sounds like the dropdown views 
>taskbar has been bitten by changing APIs? I wonder if the same is true for the 
>Copy Artifacts plugins that I've also had to downgrade recently?
>
>jieryn makes mention of Jenkins LTS, how do I get this? How do I stop Jenkins 
>"offering" me new versions of Jenkins which aren't stable or aren't LTS?
>
>cheers,
>
>Chris
>
>-- Simplistix - Content Management, Batch Processing & Python Consulting
>            - http://www.simplistix.co.uk
>
>
>

RE: Triggering build twice for each commit

2012-07-06 Thread Mandeville, Rob
NTP is far outside the scope of Jenkins.

If this is indeed the problem (and I believe it is), then the timestamps on 
your machines are out of sync.  You need to find (or be) a sysadmin, with admin 
privileges on Windows and root access on Linux.  Neither Jenkins nor any plugin 
can do what you need done.

--Rob

From: jenkinsci-users@googlegroups.com 
[mailto:jenkinsci-users@googlegroups.com] On Behalf Of Varghese Renny
Sent: Friday, July 06, 2012 10:57 AM
To: jenkinsci-users@googlegroups.com
Subject: Re: Triggering build twice for each commit

So how can set it synchronized with my window , linux and svn repo..
any plugin i need to install?
Or we can configure it in jenkin itself?



Thanks in Advance
varghese

The information in this message is for the intended recipient(s) only and may 
be the proprietary and/or confidential property of Litle & Co., LLC, and thus 
protected from disclosure. If you are not the intended recipient(s), or an 
employee or agent responsible for delivering this message to the intended 
recipient, you are hereby notified that any use, dissemination, distribution or 
copying of this communication is prohibited. If you have received this 
communication in error, please notify Litle & Co. immediately by replying to 
this message and then promptly deleting it and your reply permanently from your 
computer.


Re: Triggering build twice for each commit

2012-07-06 Thread Varghese Renny
So how can set it synchronized with my window , linux and svn repo..
any plugin i need to install?
Or we can configure it in jenkin itself?



Thanks in Advance
varghese


Re: Triggering build twice for each commit

2012-07-06 Thread Les Mikesell
On Fri, Jul 6, 2012 at 9:45 AM, Varghese Renny  wrote:
> i don't know about ntp..

NTP is 'Network Time Protocol' and is the standard way to keep all of
your computer clocks stay synchronized.   Setting it up correctly will
depend somewhat on the operating systems involved.

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


For deploy plugin, content of fields

2012-07-06 Thread Varghese Renny
Hi,
 For using deploy plugin, i want to know what is context path and tomcat
url?
Can anyone give an example for it?



Thanks in Advance,
varghese


Re: Triggering build twice for each commit

2012-07-06 Thread Varghese Renny
i don't know about ntp..
My master is Linux 64 bit.
slave is windows.32 bit
SVN i am using..
In slave i am putting the workspace for jobs.

Thanks in advance
varghese


Re: Triggering build twice for each commit

2012-07-06 Thread Les Mikesell
On Fri, Jul 6, 2012 at 9:38 AM, Varghese Renny  wrote:
> it's synchronised..it has shown as warning message SVN repo is out of sync
> with my system.
> how to solve?


Are they both running ntp?

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


Re: idle jenkings but constantly very high cpu usage

2012-07-06 Thread Les Mikesell
On Fri, Jul 6, 2012 at 8:07 AM, Corin Langosch
 wrote:
>
>>> It's working great so far, but even when idle jenkins constantly consumes
>>> 100 - 200% cpu (8 cores). No jobs are running, no polling i happening
>>> (nothing configured), no "special" plugins are used...
>>
>> That sounds like the linux 'leap-second' bug if the system has been up
>>
>>   since June 30th and is running ntp.   One way to fix it is (as root
>> from the command line):
>> date -s "`date`"
>
>
> Great, that fixed it. Going to update my kernels asap :). Thanks!

No rush - there shouldn't be another leap second for a few years.
Probably long enough to forget how it is supposed to work again...

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


Re: Triggering build twice for each commit

2012-07-06 Thread Varghese Renny
it's synchronised..it has shown as warning message SVN repo is out of sync
with my system.
how to solve?


Thanks in Advance
varghese


Re: Triggering build twice for each commit

2012-07-06 Thread Henk van Voorthuijsen
Have you checked if the clocks on master and slave are in sync?

On Jul 6, 2012, at 9:30 AM, Varghese Renny wrote:

> 
> I have commited to repo and it is triggering build twice. My build is going 
> on slave machine..
> First build will say like no changes
> Second build is detecting the changes.
> 
> How to solve this problem?
> 



Re: Jenkins ssh and pull (copy) files

2012-07-06 Thread Fred G
Hi,

The Copy To Slave Plugin 
(https://wiki.jenkins-ci.org/display/JENKINS/Copy+To+Slave+Plugin)
can copy back files to the master. Currently this is only available as a 
post-build action, so I'm not
sure if the files will be available to send them as attachments.
Nevertheless it might still be cleaner than using ssh.

It shouldn't be a big deal to change the plugin so that "copy back to 
master" is available as a normal
build step.

HTH,

Fred

On Thursday, July 5, 2012 3:39:15 PM UTC+2, marathiboy wrote:
>
> Hello, 
>
> I need to pull files from remote machine and send it via email as 
> attachment. Once the files are on Jenkins server, I can do the rest. 
>
> In order to copy (pull) files from the remote server, is there any plugin 
> or 
> how can I use something like 
>
> ssh target_address cat remotefile > localfile 
>
> using ssh plugin? 
>
> Thanks 
>
> S 
>
> -- 
> View this message in context: 
> http://jenkins.361315.n4.nabble.com/Jenkins-ssh-and-pull-copy-files-tp4633889.html
>  
> Sent from the Jenkins users mailing list archive at Nabble.com. 
>


Re: Problem running slaves

2012-07-06 Thread David Mata
The only way to get it that I found was run the slave by using my own 
script. Start the slave via SSH option was impossible.

Thank you

El jueves, 5 de julio de 2012 21:37:55 UTC+2, David Mata escribió:
>
> Hello. 
>
> Does anybody know why jenkisn slave cab give this to me?
>
> Thank you all
>
> *21:31:43*  java.io.IOException 
> : Cannot 
> run program "java" (in directory 
> "/shared/cis/slavejenkins/workspace/ext-libs"): java.io.IOException: error=2, 
> No such file or directory*21:31:43*at 
> java.lang.ProcessBuilder.start(ProcessBuilder.java:460) 
> *21:31:43*
>   at hudson.Proc$LocalProc.(Proc.java:244) 
> *21:31:43*
> at hudson.Proc$LocalProc.(Proc.java:216) 
> *21:31:43*
> at hudson.Launcher$LocalLauncher.launch(Launcher.java:709) 
> *21:31:43*
> at hudson.Launcher$ProcStarter.start(Launcher.java:338) 
> *21:31:43*
>   at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:934) 
> *21:31:43*
>   at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:901) 
> *21:31:43*
>   at hudson.remoting.UserRequest.perform(UserRequest.java:118) 
> *21:31:43*
>at hudson.remoting.UserRequest.perform(UserRequest.java:48) 
> *21:31:43*
> at hudson.remoting.Request$2.run(Request.java:287) 
> *21:31:43*
>at 
> hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
>  
> *21:31:43*
>   at 
> java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) 
> *21:31:43*
> at java.util.concurrent.FutureTask.run(FutureTask.java:138) 
> *21:31:43*
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>  
> *21:31:43*
>   at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>  
> *21:31:43*
>   at java.lang.Thread.run(Thread.java:662) 
> 
>
>

Re: idle jenkings but constantly very high cpu usage

2012-07-06 Thread Corin Langosch


On 06.07.2012 at 14:56 +0200, Les Mikesell  wrote:

On Fri, Jul 6, 2012 at 4:58 AM, gucki  wrote:



It's working great so far, but even when idle jenkins constantly consumes
100 - 200% cpu (8 cores). No jobs are running, no polling i happening
(nothing configured), no "special" plugins are used...

That sounds like the linux 'leap-second' bug if the system has been up
  since June 30th and is running ntp.   One way to fix it is (as root
from the command line):
date -s "`date`"


Great, that fixed it. Going to update my kernels asap :). Thanks!



Re: idle jenkings but constantly very high cpu usage

2012-07-06 Thread Les Mikesell
On Fri, Jul 6, 2012 at 4:58 AM, gucki  wrote:
> Hi there,
>
> I'm using a fresh debain squeeze system and just installed latest jenkings
> (1.473) using the official debian package.
>
> It's working great so far, but even when idle jenkins constantly consumes
> 100 - 200% cpu (8 cores). No jobs are running, no polling i happening
> (nothing configured), no "special" plugins are used...
>
> jenkins  11653  0.0  0.0  18196   540 ?S11:46   0:00
> /usr/bin/daemon --name=jenkins --inherit --env=JENKINS_HOME=/var/lib/jenkins
> --output=/var/log/jenkins/jenkins.log --pidfile=/var/run/jenkins/jenkins.pid
> -- /usr/bin/java -Djava.net.preferIPv4Stack=true -jar
> /usr/share/jenkins/jenkins.war --webroot=/var/run/jenkins/war
> --httpPort=8080 --ajp13Port=-1 --httpListenAddress=127.0.0.1
> jenkins  11655  178 14.1 1040216 297320 ?  Sl   11:46  16:37
> /usr/bin/java -Djava.net.preferIPv4Stack=true -jar
> /usr/share/jenkins/jenkins.war --webroot=/var/run/jenkins/war
> --httpPort=8080 --ajp13Port=-1 --httpListenAddress=127.0.0.1
>
> To debug this a little I looked at jenkings threads and it seems that 3-4
> threads are constantly running. Strace of any of these threads shows several
>
> futex(0x7f11dc007c28, FUTEX_WAKE_PRIVATE, 1) = 0
> futex(0x7f11dc007c54, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 1,
> {1341568603, 9}, ) = -1 ETIMEDOUT (Connection timed out)
> futex(0x7f11dc007c28, FUTEX_WAKE_PRIVATE, 1) = 0
> futex(0x7f11dc007c54, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 1,
> {1341568603, 555684000}, ) = -1 ETIMEDOUT (Connection timed out)
> futex(0x7f11dc007c28, FUTEX_WAKE_PRIVATE, 1) = 0
> futex(0x7f11dc007c54, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 1,
> {1341568603, 555776000}, ) = -1 ETIMEDOUT (Connection timed out)
> futex(0x7f11dc007c28, FUTEX_WAKE_PRIVATE, 1) = 0
> futex(0x7f11dc007c54, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 1,
> {1341568603, 555871000}, ) = -1 ETIMEDOUT (Connection timed out)
> futex(0x7f11dc007c28, FUTEX_WAKE_PRIVATE, 1) = 0
> futex(0x7f11dc007c54, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 1,
> {1341568603, 555966000}, ) = -1 ETIMEDOUT (Connection timed out)
> futex(0x7f11dc007c28, FUTEX_WAKE_PRIVATE, 1) = 0
> futex(0x7f11dc007c54, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 1,
> {1341568603, 55606}, ) = -1 ETIMEDOUT (Connection timed out)
> futex(0x7f11dc007c28, FUTEX_WAKE_PRIVATE, 1) = 0
> futex(0x7f11dc007c54, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 1,
> {1341568603, 556153000}, ) = -1 ETIMEDOUT (Connection timed out)
>
> per second.
>
> Anybody knows how to debug this further and fix?

That sounds like the linux 'leap-second' bug if the system has been up
 since June 30th and is running ntp.   One way to fix it is (as root
from the command line):
date -s "`date`"

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


RE: [External] Re: Jenkins ssh and pull (copy) files

2012-07-06 Thread Ligade, Shailesh [USA]
Thanks,

No this is doable I guess..what I am trying to do is:

Using ssh plugin, copy wars to target environment, then I run a script on 
target environment to deploy those wars. If within the script, I figure out 
there was error in deployment, I want to get deployment logs back to Jenkins so 
that I can send them as email attachment. 

So I need logs, only if I detect error. And logs can be huge..so I just don't 
want to cat them with in my script and let it go to console out..So I was 
looking for elegent elegant solution. I guess, I can set up another job with 
ssh command you have mentioned, if my deployment job fails due to deployment 
error (some parameter to the new job)..

Thanks

S

-Original Message-
From: jenkinsci-users@googlegroups.com 
[mailto:jenkinsci-users@googlegroups.com] On Behalf Of Sami Tikka
Sent: Thursday, July 05, 2012 4:22 PM
To: jenkinsci-users@googlegroups.com
Subject: [External] Re: Jenkins ssh and pull (copy) files

So, making a free-style job with a shell build step which executes something 
like "ssh target_address cat remotefile > localfile" would not work for you?

-- Sami

marathiboy kirjoitti 5.7.2012 kello 16.39:

> Hello,
> 
> I need to pull files from remote machine and send it via email as 
> attachment. Once the files are on Jenkins server, I can do the rest.
> 
> In order to copy (pull) files from the remote server, is there any 
> plugin or how can I use something like
> 
> ssh target_address cat remotefile > localfile
> 
> using ssh plugin?
> 
> Thanks
> 
> S
> 
> --
> View this message in context: 
> http://jenkins.361315.n4.nabble.com/Jenkins-ssh-and-pull-copy-files-tp
> 4633889.html Sent from the Jenkins users mailing list archive at 
> Nabble.com.



Re: websvn url

2012-07-06 Thread Ullrich Hafner

On 07/06/2012 11:11 AM, tcendrowski wrote:
> Ok, so websvn folder should be in workspace? repname is buildname?
> Path leads to workspace?
>

No, on your web server. The provided URL should return a result in your
browser... You need to replace the word myrepname with your repository
name. But just look at your websvn configuration, this is actually
independent of the jenkins instance.

How do you view the results up to now in your browser? Jenkins just
provides links to these results. Jenkins does not display the results...

Ulli

> On Tuesday, July 3, 2012 3:05:16 PM UTC+2, Ulli Hafner wrote:
>
> Just one additional note: I'm using the websvn2 plugin.
>
> Ulli
>
> On 07/03/2012 03:02 PM, Ullrich Hafner wrote:
> > I'm using something like:
> >
> >
> https://myserver/websvn/listing.php?repname=myreponame&path=/trunk
> 
> >
> > On 07/03/2012 02:33 PM, tcendrowski wrote:
> >> Hi
> >>
> >> I would like to set URL in Repositry Browser section for WebSVN. I
> >> have websvn 2.3.3 in workspace directory, but I don't know how
> exactly
> >> should it look like.
> >>
> >> http://server:8080/ ? ? ?
> >>
> >> Thanks in advance, greets.
> >
>
>




Re: Jenkins, Gerrit-trigger and git submodules

2012-07-06 Thread Karsten Dambekalns
Hi Rens.

On 02.07.2012, at 20:31, Rens Admiraal  wrote:
> I'm searching for a while now for a solution to use continues integration in 
> a good way. I'm using a (base) repository which contains the base structure 
> for my application, and furthermore a lot of git submodules pointing to 
> repositories containing the packages used in my project.

It seems we are the only ones doing that… or not? Consider this mail a "ping" 
for this thread, and a plea for feedback - even if it's only "we need more 
details to provide hints on that one" :)

Regards,
Karsten

idle jenkings but constantly very high cpu usage

2012-07-06 Thread gucki
Hi there,

I'm using a fresh debain squeeze system and just installed latest jenkings 
(1.473) using the official debian package.

It's working great so far, but even when idle jenkins constantly consumes 
100 - 200% cpu (8 cores). No jobs are running, no polling i happening 
(nothing configured), no "special" plugins are used...

jenkins  11653  0.0  0.0  18196   540 ?S11:46   0:00 
/usr/bin/daemon --name=jenkins --inherit 
--env=JENKINS_HOME=/var/lib/jenkins --output=/var/log/jenkins/jenkins.log 
--pidfile=/var/run/jenkins/jenkins.pid -- /usr/bin/java 
-Djava.net.preferIPv4Stack=true -jar /usr/share/jenkins/jenkins.war 
--webroot=/var/run/jenkins/war --httpPort=8080 --ajp13Port=-1 
--httpListenAddress=127.0.0.1
jenkins  11655  178 14.1 1040216 297320 ?  Sl   11:46  16:37 
/usr/bin/java -Djava.net.preferIPv4Stack=true -jar 
/usr/share/jenkins/jenkins.war --webroot=/var/run/jenkins/war 
--httpPort=8080 --ajp13Port=-1 --httpListenAddress=127.0.0.1

To debug this a little I looked at jenkings threads and it seems that 3-4 
threads are constantly running. Strace of any of these threads shows several

futex(0x7f11dc007c28, FUTEX_WAKE_PRIVATE, 1) = 0
futex(0x7f11dc007c54, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 1, 
{1341568603, 9}, ) = -1 ETIMEDOUT (Connection timed out)
futex(0x7f11dc007c28, FUTEX_WAKE_PRIVATE, 1) = 0
futex(0x7f11dc007c54, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 1, 
{1341568603, 555684000}, ) = -1 ETIMEDOUT (Connection timed out)
futex(0x7f11dc007c28, FUTEX_WAKE_PRIVATE, 1) = 0
futex(0x7f11dc007c54, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 1, 
{1341568603, 555776000}, ) = -1 ETIMEDOUT (Connection timed out)
futex(0x7f11dc007c28, FUTEX_WAKE_PRIVATE, 1) = 0
futex(0x7f11dc007c54, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 1, 
{1341568603, 555871000}, ) = -1 ETIMEDOUT (Connection timed out)
futex(0x7f11dc007c28, FUTEX_WAKE_PRIVATE, 1) = 0
futex(0x7f11dc007c54, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 1, 
{1341568603, 555966000}, ) = -1 ETIMEDOUT (Connection timed out)
futex(0x7f11dc007c28, FUTEX_WAKE_PRIVATE, 1) = 0
futex(0x7f11dc007c54, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 1, 
{1341568603, 55606}, ) = -1 ETIMEDOUT (Connection timed out)
futex(0x7f11dc007c28, FUTEX_WAKE_PRIVATE, 1) = 0
futex(0x7f11dc007c54, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 1, 
{1341568603, 556153000}, ) = -1 ETIMEDOUT (Connection timed out)

per second.

Anybody knows how to debug this further and fix?

Corin



Re: websvn url

2012-07-06 Thread tcendrowski
Ok, so websvn folder should be in workspace? repname is buildname? Path 
leads to workspace?

On Tuesday, July 3, 2012 3:05:16 PM UTC+2, Ulli Hafner wrote:
>
> Just one additional note: I'm using the websvn2 plugin. 
>
> Ulli 
>
> On 07/03/2012 03:02 PM, Ullrich Hafner wrote: 
> > I'm using something like: 
> > 
> > https://myserver/websvn/listing.php?repname=myreponame&path=/trunk 
> > 
> > On 07/03/2012 02:33 PM, tcendrowski wrote: 
> >> Hi 
> >> 
> >> I would like to set URL in Repositry Browser section for WebSVN. I 
> >> have websvn 2.3.3 in workspace directory, but I don't know how exactly 
> >> should it look like. 
> >> 
> >> http://server:8080/ ? ? ? 
> >> 
> >> Thanks in advance, greets. 
> > 
>
>
>

Building the same branch in different repositories/jobs

2012-07-06 Thread Thomas Ferris Nicolaisen
Hi,

We have a product which is split into a number of different Git 
repositories. They are built and released separately, but have dependencies 
on each other that we track by using the same branch-names and tags in each 
repository.

To illustrate, here are three repositories with three branches in each:

* repo "foo-library"
master
2.17.x
2.16.x

* repo "foo-framework" (depends on foo-library)
master
2.17.x
2.16.x

* repo "foo-application" (depends on foo-framework)
master
2.17.x
2.16.x


Each of these repositories have one job in Jenkins to build and deploy them 
into our Maven repository. The jobs trigger each other respectively.

This works really well, as long as we stick to using one branch (master). 
But once we start doing work in the other branches we are running into 
trouble:

When "foo-library" builds the 2.16.x branch, it should trigger builds 
downstream and also order them to build the 2.16.x branches in 
"foo-framework" and "foo-application". 

However, normal behavior is to build the branch with the latest changes 
(which may, or may not be 2.16.x).


*** Our attempts at a solution ***

We've tried parameterizing the downstream jobs with a ${GIT_BRANCH}, which 
is passed properly from the upstream job, and using it as branch-specifier 
in the downstream jobs: origin/${GIT_BRANCH}

However, when a downstream job like foo-application is triggered from an 
SCM change, the GIT_BRANCH parameter is empty, and the build fails with no 
branch found.

The knee-jerk reaction to that is to provide a default GIT_BRANCH value in 
case none is provided, like "origin/master". This limits the SCM-polling to 
only detect and run builds in the master branch. If we try specifying a 
default like "origin/*", the wildcard is not evaluated by the Jenkins Git 
plugin (Could not checkout origin/**).

If we keep the default GIT_BRANCH as "origin/master", and add more branch 
specifiers (so we have one "origin/${GIT_BRANCH}" and one "origin/*", we 
come back to the problem that the latest changed branch is built, also when 
triggered from upstream.

*** The sub-optimal solutions ***

1) Create SCM-trigger-sister jobs, whose only purpose is to scan for 
changes in SCM, and notify the real jobs with proper GIT_BRANCH parameters.
2) Stick to default GIT_BRANCH=origin/master, and teach our developers to 
manually trigger jobs in other branches when needed (having them punching 
in GIT_BRANCH=2.17.x when they want to run that branch).

Problem with the first one is that we actually have around 40 jobs that do 
various things with our repositories, and about 30 of these would need new 
trigger-sister jobs. That's a lot of new Jenkins jobs to maintain, for 
something which sounds easy in principle..

Problem with the second one is as with all manual work, it will be 
forgotten, old build artifacts will be assumed to be freshly built, 
confusion ensues, etc.

I've scanned through the Jenkins plugins looking for something like a 
"conditional branch selector", but haven't found anything. 

If we express some logic in the Git branch specifier that says "if 
GIT_BRANCH parameter is null, just use the ** specifier", we'd be fine. 

Anyone have any ideas how we can pull this off?


Re: Triggering build twice for each commit

2012-07-06 Thread Varghese Renny
Both are started by SCM changes
Later in log
One is showing no changes
Second is showing changes found

Thanks


Re: very similar jobs as separate jobs

2012-07-06 Thread Bram de Jong
On Tue, Jun 19, 2012 at 8:50 PM, Sami Tikka  wrote:
> So, you have a number of jobs that are mostly identical but there's a
> little bit that should work differently for them.
>
> To me this sounds like a perfect case of multi-configuration job.
> https://wiki.jenkins-ci.org/display/JENKINS/Building+a+matrix+project
>
> Essentially, Jenkins will run your job a number of times but each run
> will have a different value for an environment variable. You can then
> vary the build behavior based on the environment variable.

This actually sounds good for us?

* Is there any way to do inter-matrix-job dependencies - or possibly a
way to trigger another build for some of the matrix points?
* Will jobs share the same checkout on disk or will a different
checkout be created for each point in the matrix?
* Can some points in the matrix be hardwired to certain nodes? (for
example mac <-> windows)


 - bram


Triggering build twice for each commit

2012-07-06 Thread Varghese Renny

I have commited to repo and it is triggering build twice. My build is going 
on slave machine..
First build will say like no changes
Second build is detecting the changes.

How to solve this problem?


Thanks in Advance