Giter Club home page Giter Club logo

jks's Introduction

Jenkins Docker image

Jenkins Docker image with Docker based on jenkinsci/blueocean and some groovy scripts in order to:

  • create an admin user
  • configure the number of executors
  • enable the slave master access control
  • setup an ssh key to clone private git repositories
  • create a seed job that uses the job dsl plugin to create all jobs
  • disable the jenkins cli over remoting
  • disable scripts security for the job dsl scripts

Getting started

> cat jks.env
# Admin credentials
ADMIN_USERNAME=admin
ADMIN_PASSWORD=changeme

# Git repo url for the seed jobs (which uses the groovy job dsl plugin)
SEED_JOBS_URL=https://github.com/thbkrkr/ci

# '<name>:<key.pub.b64>' name and content in base 64 of the public ssh key to clone private repos
SEED_CREDS=ci-bitbucket.id_rsa:Ae7tL11CaUdJ...S0PLX

# Docker registry in base64 (base64 -w0 ~/.docker/config.json)
REGISTRY_AUTH=dezJI...Sn0c
> cat docker-compose.yml
version: '2'
services:
  jks:
    image: krkr/jks
    env_file:
      - ./jks.env
    ports:
      - 8080:8080
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - ./data/var_jenkins_home:/var/jenkins_home
docker-compose up -d

jks's People

Contributors

thbkrkr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

jks's Issues

Have you investigated Docker Secrets instead of less secure Environment Variables?

It requires a bit of refactoring to have the Groovy look to the /run/secrets/secret-name paths, and running docker swarm init and then you need to pre-populate the secrets with docker secret create secret-name file-with-secret or cat ~/.aws/credentials | docker secret create aws-credentials - or echo $(gopass show -o root/my/secret/account) | docker secret create my-secret-account -.

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.