Re: Jenkins upgrade

2016-07-19 Thread Saggam Raju
Hi,

1. Could you please stop tomcat server(catalina.sh stop/service tomcat 
stop).
2. Take backup of old jenkins war file from tomcat/webaspps(tar czf 
jenkins.backup jenkins.war) and also take backup of jenkins home directory. 
3. Now copy your latest jenkins version to tomcat/webapps directory and 
start tomcat server. 

Thanks,
Raju.

On Monday, July 18, 2016 at 7:16:22 PM UTC+5:30, Prasu S wrote:
>
> I'm upgrading Jenkins from 1.607 version to 1.645 . I replaced the old war 
> file with 1.645 war file and restarted Jenkins Tomcat and also rebooted the 
> server but I still see old version. I tried the same steps on our test 
> instance back in April it worked fine . Why the new version is not getting 
> upgraded? Please help. Thanks in Advance..
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/058255aa-35ef-4bfa-9da7-a62f10e4b58c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Move jenkins jobs from XYZ Folder jobs to Jenkins page using groovy script

2016-07-18 Thread Saggam Raju
Hi All,

I am working on groovy script to move jenkins jobs from Folder XYZ to 
jenkins page.

for example: I have created jenkins folder job 'XYZ' where it contains two 
free style jobs i.e 'a' and 'b'.

Jenkins/XYZ/a
Jenkins/XYZ/b

so, I want move jobs a and b to Jenkins main page 

Jenkins/a
Jenkins/a
Jenkins/XYZ 

Script

import jenkins.*
import hudson.*
import jenkins.model.*
import hudson.model.*
import hudson.tasks.*
import com.cloudbees.hudson.plugins.folder.Folder

def folder = Jenkins.instance.getItem(Jenkins)

def job = Jenkins.instance.getItemByFullName('XYZ');

for(item in job.getItems())
{
  println "$item.name"
  Items.move(item,folder)
}

error:

a

b
java.lang.NullPointerException
at hudson.model.Items.move(Items.java:418)
at hudson.model.Items$move.call(Unknown Source)



I'm getting errors when I run the above code in script console
could you please provide correct me/some support to accomplish this task.

Regards,
Raju.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/395ea22f-3d8f-4626-ae4d-5dd7dacc5655%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.