Discussion:
Jenkins Batch to Bash
Cornelius Ele
2018-11-23 14:14:01 UTC
Permalink
Hello all,

I am trying to migrate a Jenkins instance from a Windows machine to a Linux
server. Upon doing a quick *.bat search in the C:\Program Files
(x86)\Jenkins folder, I see 238 batch files.
Do these batch files need to be converted for the new Jenkins instance to
perform all its jobs? If so, how can the conversion be done?

Appreciate any kind of feedback.
--
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+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/01fc6bc7-f058-4488-bc28-e13ac01d789d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Simon Richter
2018-11-23 15:39:22 UTC
Permalink
Hi,
Post by Cornelius Ele
Do these batch files need to be converted for the new Jenkins instance
to perform all its jobs? If so, how can the conversion be done? 
The only things that need to be converted are "batch" build steps in
existing jobs if the job is no longer going to be executed on a Windows
agent.

The main Jenkins installation is independent from the agents (and the
executors on the master node behave like an agent, for the most part).

So a Jenkins installation on a Linux system will be able to configure
batch build steps, but not execute them.

Simon
--
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+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/6a465fa5-2e96-f2d6-d152-873eb8b79355%40hogyros.de.
For more options, visit https://groups.google.com/d/optout.
RAJENDRA PRASAD
2018-11-26 08:02:20 UTC
Permalink
Hi Ele,

You dont need to cover ant scripts:

Here is the Jenkins migration Steps from Windows to Linux:

*On Windows Machine Perform Following Activities*
1. First find out the Plugins Installed on windows Jenkins setup
2. Find out Tools like (maven,ant,jdk ..etc) installed on windows Jenkins
server (You can find these on jenkins global tool configuration)
3. Then Stop Jenkins and Copy all jobs files from Windows Jenkins Server:
<Jenkins_home>/jobs Folder
* How to Find Jenkins Home Folder:*
Login to Jenkins
Manage Jenkins
System Configuration
Click the first "advanced" button here you can find
Jenkins_home path

*Then Perform Follwoing Activites on New Linux Jenkins Server;*
1. Install Jenkins on Linux Server nearest version that you installed on
Windows
2. Install the plugs that you have on windows Jenkins server
3. Install the all tools that you had on windows Jenkins server
4. Stop Jenkins Server
5. Copy the all the jobs to in to Linux JENKINS_HOME folder
6. Start Jenkins Server
7. Go to Manage Jenkins Server
8. Click on "Reload Configuration from Disk" link
9. Allow Jenkins relaod takes 10-20 seocds will take
10. Re login and check your jobs , All must be there
wait wait Still porting is not completed.
11 On Linux Each yob you might be running as Batch command
12. Now you must change it Shell to run.

[image: image.png]

13 . And off course you need port changes if you are using any native
batch scripts and need to convert into Bash Scripting.

Let me know if you need any help






*Thanks and Regards,Rajendra Prasad Reddy PenumalliSr. Engineer in
Testing.Mobile:9008566233*
Post by Cornelius Ele
Hello all,
I am trying to migrate a Jenkins instance from a Windows machine to a
Linux server. Upon doing a quick *.bat search in the C:\Program Files
(x86)\Jenkins folder, I see 238 batch files.
Do these batch files need to be converted for the new Jenkins instance to
perform all its jobs? If so, how can the conversion be done?
Appreciate any kind of feedback.
--
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
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/01fc6bc7-f058-4488-bc28-e13ac01d789d%40googlegroups.com
<https://groups.google.com/d/msgid/jenkinsci-users/01fc6bc7-f058-4488-bc28-e13ac01d789d%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
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+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAMrg02RVBAGzp7mYxXB26_YLuo2tnPf8QnXRUbGv8Pxn8zstUg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Cornelius Ele
2018-11-27 18:37:52 UTC
Permalink
Thank you for such a detailed reply!

Just wondering, because there are many plugins and tools, and I want to
maintain the same version as the old Jenkins, would it be possible to copy
the 'plugins' and 'tools' folder as well?
I was originally thinking of copying everything under JENKINS_HOME from
Windows to Linux and configure each of the local references (i.e. JDK)
accordingly.

Thanks,
Ele

On Monday, November 26, 2018 at 3:02:45 AM UTC-5, rajendraprasad reddy
Post by RAJENDRA PRASAD
Hi Ele,
*On Windows Machine Perform Following Activities*
1. First find out the Plugins Installed on windows Jenkins setup
2. Find out Tools like (maven,ant,jdk ..etc) installed on windows Jenkins
server (You can find these on jenkins global tool configuration)
<Jenkins_home>/jobs Folder
* How to Find Jenkins Home Folder:*
Login to Jenkins
Manage Jenkins
System Configuration
Click the first "advanced" button here you can find
Jenkins_home path
*Then Perform Follwoing Activites on New Linux Jenkins Server;*
1. Install Jenkins on Linux Server nearest version that you installed on
Windows
2. Install the plugs that you have on windows Jenkins server
3. Install the all tools that you had on windows Jenkins server
4. Stop Jenkins Server
5. Copy the all the jobs to in to Linux JENKINS_HOME folder
6. Start Jenkins Server
7. Go to Manage Jenkins Server
8. Click on "Reload Configuration from Disk" link
9. Allow Jenkins relaod takes 10-20 seocds will take
10. Re login and check your jobs , All must be there
wait wait Still porting is not completed.
11 On Linux Each yob you might be running as Batch command
12. Now you must change it Shell to run.
[image: image.png]
13 . And off course you need port changes if you are using any native
batch scripts and need to convert into Bash Scripting.
Let me know if you need any help
*Thanks and Regards,Rajendra Prasad Reddy PenumalliSr. Engineer in
Testing.Mobile:9008566233*
Post by Cornelius Ele
Hello all,
I am trying to migrate a Jenkins instance from a Windows machine to a
Linux server. Upon doing a quick *.bat search in the C:\Program Files
(x86)\Jenkins folder, I see 238 batch files.
Do these batch files need to be converted for the new Jenkins instance to
perform all its jobs? If so, how can the conversion be done?
Appreciate any kind of feedback.
--
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
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/01fc6bc7-f058-4488-bc28-e13ac01d789d%40googlegroups.com
<https://groups.google.com/d/msgid/jenkinsci-users/01fc6bc7-f058-4488-bc28-e13ac01d789d%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
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+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/2bea7aa6-2a8c-4ee4-90d0-f7eb15c750c4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...