Skip to content
This repository has been archived by the owner on Dec 5, 2022. It is now read-only.
/ jenkins-git-sync Public archive

A jenkins docker container which uses a config from a remote repository to start a jenkins server.

License

Notifications You must be signed in to change notification settings

tradebyte/jenkins-git-sync

Repository files navigation

jenkins-git-sync

A jenkins docker container which uses a config from a remote repository to start a jenkins server.

How to use

  1. Copy the docker-compose.yml.dist to docker-compose.yml
  2. Define the JENKINS_CONFIG_BRANCH and JENKINS_CONFIG_REPOSITORY in the docker-compose.yml
  3. (Optional) Use the jenkins-config/plugins.txt to set plugins which are needed for the jenkins configuration. They will be downloaded in the process using the jenkins container.
  4. (Optional) Put a .ssh/ folder beneath jenkins-config/ which will be copied into the jenkins home directory before getting the remote git repository.
  5. Start the container
docker-compose up
  1. Visit jenkins http://localhost:8080/

It creates a volume for the /var/jenkins_home folder. The volume remains if you use "docker-compose down".

Updating the Container

docker-compose down
docker-compose build
docker-compose up

Create a custom plugins.txt

  1. Visit $jenkins-url/script
  2. Paste in and execute
Jenkins.instance.pluginManager.plugins.each{
  plugin -> 
    println ("${plugin.getShortName()}:${plugin.getVersion()}")
}
  1. Copy and paste output to jenkins-config/plugins.txt

Contribution

The bash-scripts are written in bash and use best pratices.

It should pass:

$ shellcheck scripts/*
$ beautysh -f scripts/*

About

A jenkins docker container which uses a config from a remote repository to start a jenkins server.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages