GithubHelp home page GithubHelp logo

philippeboyd / docker-jenkins Goto Github PK

View Code? Open in Web Editor NEW

This project forked from shimmi/docker-jenkins

0.0 0.0 0.0 843 KB

Jenkins with Blue Ocean and support for builiding jobs in Docker

License: MIT License

docker-jenkins's Introduction

Jenkins with Blue Ocean and support for building jobs in Docker

For a new Jenkins experience.

Supported tags and respective Dockerfile links

dockeri.co

GitHub issues GitHub stars

Based on the Official Jenkins Docker image. This image adds support for running Docker CLI inside the Jenkins container and building the jobs using declarative pipelines with Docker. Bundled with Blue Ocean.

Note on the image

The image is automatically built on any change pushed to the Shimmi/docker-jenkins repo and/or when original Jenkins image changes.

What is a Pipeline?

Pipelines are a series of steps that allow you to orchestrate the work required to build, test and deploy applications. Pipelines are defined in a file called Jenkinsfile that is stored in the root of your project’s source repository.

What is a Declarative pipeline?

Announced at Jenkins World on 14th of September 2016 along with the Blue Ocean, the Declarative pipeline is a new way of how to configure the Pipelines rather than script them.

Docker support in Declarative Pipeline allows you to version your application code, Jenkins Pipeline configuration, and the environment where your pipeline will run, all in a single repository. It’s a crazy powerful combination.

Declarative Pipeline introduces the postBuild section that makes it easy to run things conditionally at the end of your Pipeline without the complexity of the try... catch of Pipeline script.

Example of Declarative pipeline

pipeline {
  agent { docker 'php' }
  stages {
    stage('build') {
      steps {
        sh 'php --version'    
      }
    }
  }
}

See additional basic examples in another language.

What is a Blue Ocean?

Blue Ocean is a new project that rethinks the user experience of Jenkins. Designed from the ground up for Jenkins Pipeline and compatible with Freestyle jobs, Blue Ocean reduces clutter and increases clarity for every member of your team.

Blue Ocean

Usage

Please refer to the official documentation description for additional configuration and usage of the Jenkins docker image.

Using docker-compose

  1. Clone the repo or just the docker-compose.yml file.
  2. Go to that folder and run docker-compose up -d.

Upgrading

  1. Prepare Jenkins to shutdown (Manage Jenkins > Prepare for Shutdown).
  2. Go to your docker-compose.yml folder.
  3. Run docker-compose up -d again to recreate the container with new image and run it as a daemon.

Using docker run

You can also run the image without any cloning by using the docker run command.

docker run -d --name my_jenkins -v /your/home/jenkins_home:/var/jenkins_home -v /var/run/docker.sock:/var/run/docker.sock -p 8080:8080 shimmi/jenkins

Please alter the /your/home/jenkins_home path to your needs.

E.g. On windows:

docker run -d --name my_jenkins -v /C/Users/<your-profile>/Documents/docker/jenkins/jenkins_home:/var/jenkins_home -v /var/run/docker.sock:/var/run/docker.sock -p 8080:8080 shimmi/jenkins

Resources

docker-jenkins's People

Contributors

shimmi 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.