A software factory that run jobs in docker containers
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
docker
jenkins
LICENSE
README.md
docker-compose.yml

README.md

Sofware factory

The purpose of this project is to create a software factory that run jobs in containers.

Usages

A few usefull commands :

  • run jenkins : docker-compose up then use this url localhost:8080
  • build the new configuration : docker-compose build
  • remove the container : docker-compose rm -f

Pre-requisite

You need to run the job build-job-base in order to create the build-base images locally.

Requirements

You will need

Add a new docker template

  • create the job in jenkins
  • use a Dockerfile it must extend build-base
  • add the specific dependencies of your project (eg : maven, node...)
  • add the new template in jenkins config
  • Using the command docker exec -it autojenkins_udd_1 bash you can connect in the container and get the config file of the jobs created here /var/jenkins_home/jobs/{{ name of the job }}/config.xml
  • put the config file in the repository in jobs/{{ name of the job }}/config.xml
  • rebuild the image : docker-compose build

TODO : This is too complicated, it must be easier

Add a new job

  • create the job in jenkins
  • run it in a docker container and use the correct template
  • Using the command docker exec -it autojenkins_udd_1 bash you can connect in the container and get the config file of the jobs created here /var/jenkins_home/jobs/{{ name of the job }}/config.xml
  • put the config file in the repository in jobs/{{ name of the job }}/config.xml
  • rebuild the image : docker-compose build

Add a new plugin

  • Find the plugin id on jenkins plugin website
  • add the plugin in plugins.txt using the following syntax : {{ id of the plugin }}:{{ version of the plugin }}
  • rebuild the image : docker-compose build

BEWARE : the system doesn't handle plugins dependencies. You should install the dependencies yourself

Todos

  • run jenkins master as jenkins (not as root)
  • run registry with a certificate and https
  • add a notification system to update current env from registry