Git Product home page Git Product logo

jbris / jenkins-docker-bats-stack Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 24 KB

A Docker configuration for Jenkins. Includes Bats for testing. Traefik and Portainer are included for container management and routing.

License: MIT License

Dockerfile 30.82% Makefile 18.03% Shell 51.15%
jenkins docker pipelines jenkins-pipeline jenkins-container bats ci-cd groovy groovy-language docker-compose

jenkins-docker-bats-stack's Introduction

jenkins-docker-bats-stack

Table of Contents

Introduction

This repo combines Jenkins, Bats, and Docker together to provide a simple example of the CI/CD process. Execute build.sh to get started.

Jenkins

Execute get-plugins.sh to retrieve a list of installed plugins within your Jenkins master instance. You can use make get-plugins to call the script from within the Jenkins container.

Execute sync-plugins.sh to install all the plugins listed within the plugins.txt file. You can use make sync-plugins to call the script from within the Jenkins container.

During your initial installation of Jenkins, execute make init-admin-password to retrieve the initial, autogenerated administrator password. Note that this password will be visible in the shell.

A fairly simple example Jenkins file has been included. This file will execute the battery of tests included in the tests directory. A test results report will be generated using the TAPS plugin.

Docker

The Jenkins container has access to the Docker socket to facilitate communication with the Docker daemon (note that there are security implications in doing this). Both Docker and docker-compose are installed during the Jenkins build process, allowing docker commands to be executed within your Jenkins pipelines.

Bats

The BATS framework has been included for use during unit and integration testing. See the tests directory for some example tests that will be executed during the Jenkins pipeline. tests.bats contains a battery of simple tests to determine if Docker is correctly installed within the Jenkins container. jenkins_helper.bash is a helper bash script that can contain any reusable variables or functions that you may wish to include in your tests.

jenkins-docker-bats-stack's People

Contributors

jbris avatar

Stargazers

 avatar

Watchers

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