Full Integration of Jenkins and Gerrit 65/6265/2
authorTrevor Bramwell <tbramwell@linuxfoundation.org>
Sun, 13 Aug 2017 06:27:46 +0000 (23:27 -0700)
committerTrevor Bramwell <tbramwell@linuxfoundation.org>
Thu, 7 Sep 2017 19:47:36 +0000 (12:47 -0700)
commit86d43d028dec42a2752874da3c01893b5b4d5612
treefc5ffda85a67eabba18814419801e0de78aa9b70
parent0a00894430dd4bd69567fe9bfcb3b18016e38543
Full Integration of Jenkins and Gerrit

- Run exclusive services with NGINX

  In favor of writing individual configs for NGINX, and since all we're
  doing is reverse proxying, using jwilder/nginx-proxy and setting
  VIRTUAL_HOST should be all we need to get NGINX working and allows for
  individual services to be brought up without causing NGINX to fall
  over due the other upstream not being online.

- Config Jenkins & Gerrit integration through several Groovy scripts

  These scripts provide all the initial configuration needed to get
  Jenkins and Gerrit talking to each other. They include:

  - Disabling the CLI over remoting
  - Enabling CSRF protection
  - Enabling the Agent -> Master subsystem
  - Setting the Jenkins hostname
  - Creating SSH credentials for connecting Jenkins to Gerrit
  - Configuring the Gerrit-Trigger plugins
  - Adding a single Jenkins SSH agent
  - Creating a JJB ini file through the Config Files plugin that Jenkins
    agent will use to configure JJB
  - Setting the global environment variable GIT_URL requires by
    Global-JJB

- Initialization Container

  After the Jenkins and Gerrit are some more work is needed to allow
  them to interact such as:

  - Creating an ssh key in Jenkins home directory
  - Creating a user in Gerrit that Jenkins will use to access the
    event-stream over ssh
  - Writing out the basic configuration for a ci-management repository
  - Bootstrapping JJB jobs into Jenkins
  - Adding the Verified label to Gerrit

  These are all done outside of the context of the Gerrit and Jenkins
  containers because most of them rely on processes already running, and
  allow us to use unmodified upstream containers.

- Updating plugins required by Global-JJB

Change-Id: I13cda69989c4832d451be1b841d177c9fdaf9e27
Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
20 files changed:
README.rst
config/gerrit.env
config/jenkins.env
config/ldap/bootstrap/groups.ldif
config/nginx/gerrit.conf [deleted file]
config/nginx/jenkins.conf [deleted file]
docker-compose.yml
init/Dockerfile [new file with mode: 0644]
init/config-ci-environment.sh [new file with mode: 0644]
jenkins/Dockerfile
jenkins/agent/Dockerfile [new file with mode: 0644]
jenkins/authorization.groovy [deleted file]
jenkins/basic-security-setup.groovy [new file with mode: 0644]
jenkins/create-jenkins-agent.groovy [new file with mode: 0644]
jenkins/create-jjbini.groovy [new file with mode: 0644]
jenkins/gerrit-config.groovy [new file with mode: 0644]
jenkins/global-properties.groovy [new file with mode: 0644]
jenkins/hostname.groovy [deleted file]
jenkins/ldap.groovy
jenkins/plugins.txt