Giter Club home page Giter Club logo

ci_cd-pipeline-jcasc's Introduction

CI/CD pipeline with Jenkins CASC

This project provides a container prebuilt with a configuration for Jenkins. It avoids the hassles of manually configuring and downloading plugins for Jenkins. It also uses a docker sidecar configuration, meaning docker CLI is included in the container and connects to the docker socket on the host. This enables the pipeline to perform Docker commands exposed by the docker API without the need for special extensions or plugins.

A docker sidecar configuration is useful in todays EAC (everything-as-code) environment where a lot of applications are packaged, distributed and deployed as images and containers.

This project could serve as a template setup for your own pipeline.

All you need is docker.

Example

This example (specified in the Jenkinsfile) will build a unit test image from the Dockerfile.test file and use it to spin up a testrunner. The testrunner will install all necessary dependencies, run the tests and save the results. The jenkins master will then copy the results from the container, remove the container and display the test results.

Jenkins running in docker.

A commit triggers the pipeline.

The production stage is only triggered by a tagged release.

Full unit test integration with blue oceans ui.

Environment

This project assumes the host is running docker on WSL2/Debian/Ubuntu. For a windows setup the docker daemon must be exposed for tcp://localhost:2375

Create a file .env with the following:

JENKINS_ADMIN_ID="your_admin_id"
JENKINS_ADMIN_PASSWORD="your_password"
JENKINS_HOST_URL="your_url"

Make sure rw permissions are set for the docker.sock on the host. > chmod 666 /var/run/docker.sock

Run

docker-compose build && docker-compose up -d

ci_cd-pipeline-jcasc's People

Contributors

clundstrom avatar

Stargazers

 avatar

Watchers

 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.