Steps to Upgrade - quick question

2013-02-02 Thread Z W
Hi All

There are notes on how to install Jenkins.
But there's not many notes on how to upgrade Jenkins or migrate from Hudson.
Are there exact steps on how to upgrade (like what directories to copy
after deploying a new Jenkins war file)
so we don't miss any plugins, artifacts histories and job
configurations, etc...) ?

We like a smooth upgrade or migration.

Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: git: Can I change a barnach in 'Branches to build' in configuration after building a project in a specific branch

2013-02-02 Thread Sami Tikka
Yes, you can change the branch specification later.

I myself always like to explicitly specify the branch instead of leaving it 
blank. I really don't know what the git plugin does when you leave it blank. Is 
there a reason why you cannot specify the name of the branch in the job 
configuration?

And do not care about the (no branch) in the Jenkins workspace. The git plugin 
does not clone or checkout the same way you normally do. That's the reason why 
the workspace looks like it isn't on any branch, but that's just an illusion.

-- Sami

Ahmed Mubbashir Khan  kirjoitti 27.1.2013 kello 14.19:

> Plus on executing 'git branch -a'
> It doesn't list any of the other remote branch, see:
> $ git branch -a
> * (no branch)
>   master
>   remotes/origin/HEAD -> origin/master
>   remotes/origin/master
> 
> 
> 
> On Sunday, 27 January 2013 16:13:09 UTC+4, Ahmed Mubbashir Khan wrote:
> Hi All, 
> I configured a porject with a specific branch, then instead of specifiying a 
> branch I though it would be better if I go with the default behaviour that is 
> build every branch.
> I removed the the branch name from 'Branches to build' but on polling it 
> seems like that it is still looking for changes in the old branch.
> So the question is: Can I change a barnach in 'Branches to build' in 
> configuration after building a project in a specific branch
> 
> Following is the pooling log:
> Polling for changes in
> Seen branch in repository origin/HEAD
> Seen branch in repository origin/master   -> What it seems like that its 
> still looking only changes only in master
> Done. Took 5.1 sec
> No changes
> 
> 
> I am using jenkins version 1.499 and git plugin version 1.1.26
> 
> thoughts?

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Which branch is build if there are multiple branches in a job and job has been configured for all jobs?

2013-02-02 Thread Sami Tikka
I guess you are using git as your version control system and your question is 
specific to the way the Jenkins git plugin works. It really would make 
answering these questions a bit easier if people would tell a little bit what 
kind of setup they have...

If the git plugin has been configured to follow all branches, it wants to build 
every branch at least once. After it has done that, it will only build the 
branches that get new commits.

If you have a lot of branches which have not been built, remove all branches 
you do not need anymore. You can also cancel the builds of branches you don't 
need. Jenkins git plugin consider a branch built when it has started building a 
branch. It does not matter if you cancel the build in mid-flight.

-- Sami

Ahmed Mubbashir Khan  kirjoitti 28.1.2013 kello 10.36:

> Hi All, 
> 
> Which branch is build if there are multiple branches in a job and job has 
> been configured for all jobs?
> What is the workflow? How jenkins determine what to build? 
> 
> Similarly:
> If a job was initially configured for master, and then we switch it to 
> monitor all branches. It seems like its building branches which doesn't have 
> any commits lately.
> The output is something like:
> Checking out Revision b6f8f39... (origin/sprint1)
> No change to record in branch origin/sprint1
> [workspace] $ /bin/sh -xe /home...   --> Still 
> executing.
> 
> Any thoughts?
> 
> --
> Regards, 
> Mubbashir

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: copy artifact fail

2013-02-02 Thread Sami Tikka
It looks like the artifact was being copied to a slave and the connection 
broke. The reason is not clear from the stacktrace. Is there anything in the 
logs on the slave side?

-- Sami

Chris Withers  kirjoitti 29.1.2013 kello 14.21:

> Hi All,
> 
> I've seen stack traces such as the following a couple of times:
> 
> """
> Deleting project workspace... ERROR: Failed to copy artifacts from
>  with filter: **
> hudson.util.IOException2: Failed to copy
> /var/lib/jenkins/jobs//builds/2013-01-29_08-01-48/archive/source/.tar.gz
> to
> /var/lib/jenkins/workspace//.tar.gz
>   at
> hudson.plugins.copyartifact.FingerprintingCopyMethod.copyOne(FingerprintingCopyMethod.java:91)
>   at 
> hudson.plugins.copyartifact.CopyArtifact.perform(CopyArtifact.java:248)
>   at 
> hudson.plugins.copyartifact.CopyArtifact.perform(CopyArtifact.java:215)
>   at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
>   at
> hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:717)
>   at hudson.model.Build$BuildExecution.build(Build.java:199)
>   at hudson.model.Build$BuildExecution.doRun(Build.java:160)
>   at
> hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:499)
>   at hudson.model.Run.execute(Run.java:1502)
>   at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
>   at hudson.model.ResourceController.execute(ResourceController.java:88)
>   at hudson.model.Executor.run(Executor.java:236)
> Caused by: java.io.InterruptedIOException
>   at hudson.remoting.ProxyOutputStream._write(ProxyOutputStream.java:120)
>   at hudson.remoting.ProxyOutputStream.write(ProxyOutputStream.java:103)
>   at hudson.remoting.RemoteOutputStream.write(RemoteOutputStream.java:110)
>   at java.security.DigestOutputStream.write(DigestOutputStream.java:100)
>   at hudson.remoting.RemoteOutputStream.write(RemoteOutputStream.java:110)
>   at hudson.Util.copyStream(Util.java:414)
>   at hudson.FilePath$33.invoke(FilePath.java:1605)
>   at hudson.FilePath$33.invoke(FilePath.java:1598)
>   at hudson.FilePath.act(FilePath.java:842)
>   at hudson.FilePath.act(FilePath.java:824)
>   at hudson.FilePath.copyTo(FilePath.java:1598)
>   at
> hudson.plugins.copyartifact.FingerprintingCopyMethod.copyOne(FingerprintingCopyMethod.java:74)
>   ... 11 more
> Caused by: java.lang.InterruptedException
>   at java.lang.Object.wait(Native Method)
>   at java.lang.Object.wait(Object.java:167)
>   at hudson.remoting.PipeWindow$Real.get(PipeWindow.java:177)
>   at hudson.remoting.ProxyOutputStream._write(ProxyOutputStream.java:118)
>   ... 22 more
> Build step 'Copy artifacts from another project' marked build as failure
> ...
> """
> 
> What's going on here? What actually failed and how?
> 
> cheers,
> 
> Chris
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
> 
> 

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: How to lauch tomcat6 into /etc/init.d

2013-02-02 Thread Sami Tikka
It is not a good idea to run Jenkins as root. Unless you know what you are 
doing. And even then it is not a good idea.

And if you do not know how to do it, you definitely should not be doing it.

Maybe instead you could explain what you are trying to do and why do you think 
you need Jenkins to have root privileges? I'm sure there are better ways to do 
what you need to do without running Jenkins as root.

-- Sami

adrien ruffie  kirjoitti 29.1.2013 kello 18.40:

> Hello all I have a problem,
>  
> My tomcat is launch on the server with /etc/init.d/tomcat6 start/stop
> And only with following script because several properties were set into
> This script.
>  
> But Jenkins doesn’t have a a root privileges to run this script, how I can do 
> that
> With a job plz ?
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Installing operating systems on slaves via Jenkins

2013-02-02 Thread Sami Tikka
And if your slaves are not virtual machines, take a look at 
https://wiki.jenkins-ci.org/display/JENKINS/PXE+Plugin or 
https://wiki.jenkins-ci.org/display/JENKINS/Scripted+Cloud+plugin

-- Sami

Mark Waite  kirjoitti 30.1.2013 kello 14.31:

> If you need to restore an existing operating system to a known good state 
> each time, you could consider using a virtual machine and reverting to a 
> snapshot of the virtual machine.  There are several plugins for virtual 
> machine control from Jenkins.  The plugin you use depends on the virtual 
> machine hypervisor you choose.
> 
> If you need to install a new operating system (possibly you're testing an 
> operating system distribution that is changing?), you might consider "puppet" 
> or "chef" as ways to install a new operating system under Jenkins control.  I 
> believe the puppet team has one or more tutorials on how to use puppet with 
> Jenkins.
> 
> Mark Waite
> 
> From: Manish Singh 
> To: jenkinsci-users@googlegroups.com 
> Sent: Wednesday, January 30, 2013 12:06 AM
> Subject: Installing operating systems on slaves via Jenkins
> 
> Hello All,
> 
> I have a requirement, where I need to reinstall OS on slave machines before a 
> job is executed. This is needed as we need a clean OS before executing the 
> tests.
> 
> What are the best ways to do this via Jenkins?
> 
> -Manish
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  
> 
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Jenkins/Slave connection via TelNet

2013-02-02 Thread Sami Tikka
Which Jenkins version are you using? Recent Jenkins versions allowed 
unauthenticated access to the slave-agent.jnlp URL, which makes starting JNLP 
slaves a bit more difficult.

I'm pretty sure the slave startup does not use -auth option to provide a 
username and password. Where did you pick that up?

You can use a browser to authenticate and download the slave-agent.jnlp and 
save file on the slave local disk. Then start the slave and profile a 
file://localhost/path/to/slave-agent.jnlp as URL on the slave command line.

-- Sami

Mehdi Hayani Soujaa  kirjoitti 1.2.2013 kello 11.38:

> Hii,
> 
> From the "Jenkins-The Definitive Guide" book we've tried to add the slave 
> based on the command line strategy. So, as mentioned in the book, we used the 
> following command: 
> 
> java -jar slave.jar -jnlpUrl 
> _http://**.**.**.**:/cip/computer/NewNode/slave-agent.jnlp -auth 
> user:password
> 
> But, the problem is that each time we execute this command, we get this error:
> 
> Failing to obtain 
> http://**.**.**.***:/cip/computer/NewNode/slave-agent.jnlp
> java.io.IOException: Failed to load 
> _http://**.**.**.***:/cip/computer/NewNode/slave-agent.jnlp: 404 Not Found
> at hudson.remoting.Launcher.parseJnlpArguments(Launcher.java:238)
> at hudson.remoting.Launcher.run(Launcher.java:200)
> at hudson.remoting.Launcher.main(Launcher.java:173)
> Waiting 10 seconds before retry
> 
> It seems that it can't find the slave agent file, But if we copy the URL in a 
> browser manually, the file is downloaded.
> 
> 
> Any idea about this issue ?? 
> 
> 
> Regards 
> Mehdi 
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Why are my build slaves being used to sync files when all executor threads are busy

2013-02-02 Thread Sami Tikka

Chris Withers  kirjoitti 1.2.2013 kello 13.39:

> On 01/02/2013 11:30, Thomas Fields wrote:
>> Slave1
>> 1. Building project1, #345
>> 2. Building project2, #125
>> 3. Building project3, #455
>> 4. Building project4, #34
>> Building project5, #12
>> Building project6, #122
>> Building project7, #142
>> Building project8, #27
>> Building project9, #29
>> 
>> Because the extra jobs are syncing I'm running out of disk on my slaves
>> all the time. Is there any way to disable these extra builds/syncs on
>> the slaves?
> 
> I think you're experiencing the same problem that I did:
> 
> https://groups.google.com/forum/?fromgroups=#!topic/jenkinsci-users/JAE9lxU4jZ8
> 
> The hack that is the Matrix Tie Parent plugin will help you, but you still 
> need a sacrificial machine to tie to where all that syncing will happen...
> 
> This feels like a bug/bad design in the way marix jobs works (when/how is 
> that source control management on the parent job ever going to be used?) but 
> I don't know where/how to raise it to get it fixed...

https://issues.jenkins-ci.org/ is the Jenkins bug database.

If this is really a big problem for you and you are willing to pay to get it 
fixed, I'm sure there are people who can help you. There's also 
http://www.cloudbees.com/jenkins-enterprise-by-cloudbees-overview.cb

There are some things you can do to cope with the problem:

* Add more disk space to the slaves or

* Limit the number of executors on the slaves (and maybe add more slaves) or

* Make sure the jobs clean up after the build is done (maybe use PostBuildStep 
plugin to execute a clean up script as the last operation or use Delete 
workspace plugin) or

* Turn off flyweight tasks. This makes the matrix parent build consume a real 
executor which limits the number of parent builds a single slave is forced to 
deal with. See 
https://wiki.jenkins-ci.org/display/JENKINS/Features+controlled+by+system+properties
 or

* Use https://wiki.jenkins-ci.org/display/JENKINS/Exclude+flyweight+tasks 
plugin to exclude flyweight tasks (= matrix parent builds) from slaves that 
cannot take the hit.

Or maybe use a combination of some of the above.

-- Sami

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: All my added build descriptions and "keep build forever" annotations gone!

2013-02-02 Thread Sami Tikka
Did you upgrade or downgrade Jenkins? Has it restarted? What is in the log 
file? Did you have job config history plugin installed? And if not, why? Is 
your Jenkins configured to require login allowing changes?

-- Sami

Steve K  kirjoitti 2.2.2013 kello 0.13:

> Has anyone else encountered this?
> 
> I actually spent a fair amount of time adding my own build descriptions and, 
> for a long time, they were visible in my project's build history.
> I also designated several of the builds as "Keep Forever".
> 
> Now, they are all gone.  I know I didn't delete them and no one with the 
> required privileges admits to removing them.  There were LOTS of them, so it 
> is unlikely that they were removed by mistake.
> 
> Could this be a bug or do I have a determined and diabolical saboteur in the 
> ranks?
> 
> I'm running Jenkins version  1.480.1
> 
> I'd appreciate any clues you may be able to provide.
> 
> Thank you.
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: multi-configuration project - how to use - quick question

2013-02-02 Thread Les Mikesell
On Fri, Feb 1, 2013 at 7:36 PM, zw  wrote:
> Hi Les
>
> Thanks for responding.
> We're new to Groovy too.
> Any concrete example to show how to get it to work on both platforms in a
> single job ?

Try the Xshell plugin with  shell script (not extension) and batch
file (.bat) extension with the same basename first because it is easy.
 I'm good with groovy either, but if you need to use it, you can run
OS commands by adding the .execute() method to a quoted string.

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

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: "keep this build forever" via rest api?

2013-02-02 Thread Bruno Cunha
Hello Chris.

The /toggleLogKeep URL in the job can do that.

For example:
http://[url]/job/[JOB-NAME]/20/toggleLogKeep

This URL will change the lock status of the build 20.


There's an interesting thing that you can use too: you can list all the
keep forever builds by using this URL:
http://
[url]/api/xml?depth=2&xpath=/hudson/job/build[keepLog=%22true%22]/url&wrapper=forever


Hope this helps.

Regards,
Bruno Candido Volpato da Cunha

On Thu, Jan 31, 2013 at 6:30 PM, Chris Withers wrote:

> Hi All,
>
> What url would I hit to make sure a build of a job is marked as "keep
> forever"?
>
> Chris
>
> --
> Simplistix - Content Management, Batch Processing & Python Consulting
>- http://www.simplistix.co.uk
>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to 
> jenkinsci-users+unsubscribe@**googlegroups.com
> .
> For more options, visit 
> https://groups.google.com/**groups/opt_out
> .
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.