Skip to content

Latest commit

 

History

History
74 lines (52 loc) · 2.2 KB

setting_up_ci_jenkins2.md

File metadata and controls

74 lines (52 loc) · 2.2 KB
layout title permalink redirect_from sitemap
default
Setting up Continuous Integration on Jenkins 2
/setting-up-ci-jenkins2/
/setting_up_ci_jenkins2.html
priority lastmod
0.7
2017-01-19 14:15:00 +0000

Setting up Continuous Integration on Jenkins 2

Installing Jenkins 2

Standard

Install JDK 8 on your machine.

Go to the official site https://jenkins.io/2.0/

Download the jenkins.war

With Docker

Launch the Docker image (the default port has been changed to 18080 since the JHipster app is configured to run on 8080)

docker container run -d --name jenkins2 -p 18080:8080 -p 50000:50000 jenkins/jenkins

You can then access the Jenkins dashboard on

Note: You'll be asked for an initialAdminPassword which you'll find in the logs during your container startup. You can also access it via docker logs jenkins2 e.g.

*************************************************************
*************************************************************
*************************************************************

Jenkins initial setup is required. An admin user has been created and a password generated.
Please use the following password to proceed to installation:

6707db8735be4ee29xy056f65af6ea13

This may also be found at: /var/jenkins_home/secrets/initialAdminPassword

*************************************************************
*************************************************************
*************************************************************

Create a new Job

  • Add New Item
    • Enter an item name
    • Select pipeline
    • Click OK

![Jenkins2 item]({{ site.url }}/images/jenkins2_add_item.png)

  • Definition: Pipeline script from SCM
  • SCM: Git
  • Repositories
    • Repository URL: select your repository here

![Jenkins2 pipeline]({{ site.url }}/images/jenkins2_pipeline.png)

Jenkinsfile

![Jenkins2 result]({{ site.url }}/images/jenkins2_result.png)