Showing posts with label continuous integration. Show all posts
Showing posts with label continuous integration. Show all posts

Sunday, February 26, 2017

Importing jobs from one jenkins installation to another

Using Job import plugin, we can import Jenkins job from another machine to our machines. This is useful in migrating jobs from one setup to another or a new Jenkins setup. 

Below are the steps to copy jobs from one Jenkins set up to another.

  • We require Job Import plugin to be installed to import job from one machine to another. In case plugin is not installed, Go to Manage Jenkins > Manage Plugins. 
  • Click on Available tab and search for Job import plugin.

  • Select the checkbox and click on Install without restart.
  • Once Jenkins is installed, Job Import plugin will be displayed in the menu.
  • Next to import the jobs from another Jenkins URL, click on Job Import plugin
  • Provide the Remote Jenkins URL and credential to connect to Jenkins and click on Query!
  • Once we click on Query!, Jenkins job will be displayed from the remote Jenkins.
  • Select jobs to be imported and click on import.
  • Jobs will be imported once user clicks on Import.

Saturday, February 25, 2017

How to run Jenkins on port other than 8080

By default Jenkins start at port 8080, but at times port 8080 is already used by some other application. We can run Jenkins on port other than 8080 by following below steps:
  • In case jenkins is running through command prompt, we can start jenkins to run at port 9090 or any other port using below command:
java -jar jenkins.war --httpPort=9090
  • To change the port permanently, follow below steps:
    • Go to jenkins home folder. The jenkins home folder is usually at C:\Program Files (x86)\Jenkins in case jenkins is installed from microsoft installer (MSI) file or it can be c:\Users\<UserName>\.jenkins folder.
    • Open the jenkins.xml file.
    • Change the port number in the file to the required port number.
    • Save the file.
    • Restart the window service for jenkins.

Friday, December 23, 2016

Install Jenkins as a Windows service

Once we have installed the jenkins setup, we need to launch jenkins.war file manually before accessing jenkins as shown below. To avoid running jenkins.war manually to start jenkins, we can install jenkins as a window service.


Steps to install Jenkins as window service:


1. From the localhost jenkins machine, run the jenkins.war files as shown above.

2. Once Jenkins is up and running, open localhost:8080 in the browser.

3. Go to Manage Jenkins> Install as Windows Service.

4. Follow steps in below screenshot to install Window Service.


5. Go to run>services.msc. Jenkins should be installed as a service.