Code Monkey home page Code Monkey logo

jenkins2-docker's Introduction

Jenkins 2.0 and Docker

The new version of the Jenkins a.k.a Jenkins 2.0 will be released very soon. Jenkins 2.0 will be bringing us some new amazing features.

Pipeline as Code

  • Improved User Interface and User Experience
  • Security & plugin Enhancements
  • New Jenkins WebSite as one stop for getting started guide

USAGE

Setup Docker

  • Clone the repo

       $ git clone https://github.com/Shashikant86/jenkins2-docker
       $ cd jenkins2-docker 
    

Build Images Jenkins Master and Jenkins Data

     $ docker build -t jenkins-data -f Dockerfile-data .
     $ docker build -t jenkins2 .

Now launch Containers

    $ docker run --name=jenkins-data jenkins-data
    $ docker run -p 8080:8080 -p 50000:50000 --name=jenkins-master --volumes-from=jenkins-data -d jenkins2

Now we can see Jenkins 2.0 will be started on Docker host ip and Port 8080 e.g http://192.168.99.100:8080/

image

Setup Jenkins

Now that we are running instance of the Jenkins at ‘http://192.168.99.100:8080/‘ (Assuming 192.168.99.100 is your Docker-Machine or equivalent IP), we can setup up the things

  • Admin Password Jenkins 2.0 will ask for the Admin password stored in the Jenkins Master container. We can get it and paste it in the console

         $ docker exec jenkins-master cat /var/jenkins_home/secrets/initialAdminPassword
    
  • User Details The next step is to fill in the required user details in order to login into the Jenkins.

  • Plugins

You can then install default plugins

Now, we have ready instance of Jenkins to configure Jobs and Pipelines. image

Jenkins 2.0

Jenkins features are explained in the brief above but we will demonstrate two powerful features

Pipeline as Code

In the previous version of the Jenkins. We have

Pipeline as a code has following benefits

  • Easily define simple and complex pipelines through the DSL in a Jenkinsfile.
  • Pipeline as code provides a common language to help teams (e.g. Dev and Ops) work together.
  • Easily share pipelines between teams by storing common “steps” in shared repositories.

Here is the demo how to create a default pipeline using Jenkins 2.o. image

MultiBrnach Pipeline

It creates pipeline for the every branch

image

jenkins2-docker's People

Contributors

shashikant86 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.