releng/ci-workshop.git
7 years agoInstall ansible plugin 77/9877/2
Anil Belur [Mon, 9 Apr 2018 23:55:19 +0000 (09:55 +1000)]
Install ansible plugin

Ansible plugin also requires ansible binary to be installed
on the docker container.

Include the required dependencies and also format the Dockerfile
to make the dependencies readable.

Change-Id: I3e9e9ce92399e766dbce0c7d068020d8a10764ab
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
7 years agoUpgrade Jenkins Plugins 14/9914/1
Trevor Bramwell [Wed, 11 Apr 2018 18:09:10 +0000 (11:09 -0700)]
Upgrade Jenkins Plugins

Bringing Jenkins plugins up to date to reduce the security warnings and
keep things current.

Change-Id: I41ac6357506e9f888eaeaa19fb4b962853daa45f
Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
7 years agoFix adding of the global-jjb submodule 79/9879/1
Trevor Bramwell [Tue, 10 Apr 2018 13:59:42 +0000 (06:59 -0700)]
Fix adding of the global-jjb submodule

As the URL changed and the path is not explicilty set, this was being
added at jjb/releng-global-jjb instead of jjb/global-jjb.

Change-Id: Ieccc7298aef213eb8997f8e516a3c907e515164f
Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
7 years agoSwitch Global-JJB Submodule URL to Github 07/9807/2
Trevor Bramwell [Fri, 6 Apr 2018 23:38:00 +0000 (16:38 -0700)]
Switch Global-JJB Submodule URL to Github

This is the recommended practice for adding global-jjb as a submodule
to the ci-management repo.

Change-Id: I713da3ec1637dbe2c89ecba5f4b573ed0e81024b
Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
7 years agoMerge "Change 'sandbox' user to 'workshop'"
Thanh Ha [Sat, 7 Apr 2018 14:49:19 +0000 (14:49 +0000)]
Merge "Change 'sandbox' user to 'workshop'"

7 years agoMerge "Add npmrc and pipconf to Config File Provider"
Thanh Ha [Sat, 7 Apr 2018 14:47:37 +0000 (14:47 +0000)]
Merge "Add npmrc and pipconf to Config File Provider"

7 years agoDon't always restart the nginx container 06/9806/2
Trevor Bramwell [Thu, 29 Mar 2018 19:57:50 +0000 (12:57 -0700)]
Don't always restart the nginx container

If there are errors bringing up the docker-compose environment, the
nginx container will still continue to run causing other projects that
expect port 80 to be available to fail.

Change-Id: I33715f5326514ef7945826d717e7a44ac1e5337b
Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
7 years agoAdd npmrc and pipconf to Config File Provider 08/9808/1
Trevor Bramwell [Fri, 6 Apr 2018 23:41:13 +0000 (16:41 -0700)]
Add npmrc and pipconf to Config File Provider

global-jjb requires these file exist in order to run successfully. For
now the don't include any specific content.

Change-Id: I06a037b0ba449fae7a3fc492f5f2f9ae3c40403e
Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
7 years agoChange 'sandbox' user to 'workshop' 05/9805/1
Trevor Bramwell [Fri, 6 Apr 2018 23:13:01 +0000 (16:13 -0700)]
Change 'sandbox' user to 'workshop'

This requires rebuilding the containers and recreating the volumes.

Change-Id: I60e2edf757112024e7315a367bf4ccfe20557c54
Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
7 years agoMerge "Bump the initial global-jjb version to v0.17.0"
Trevor Bramwell [Fri, 6 Apr 2018 23:16:11 +0000 (23:16 +0000)]
Merge "Bump the initial global-jjb version to v0.17.0"

7 years agoKeep Jenkins Job Builder from upgrading to 2.0 97/9797/3
Trevor Bramwell [Fri, 6 Apr 2018 19:56:52 +0000 (12:56 -0700)]
Keep Jenkins Job Builder from upgrading to 2.0

jenkins-job-builder (JJB) 2.0 adds support for the post build script
plugin and defaults to assuming the newest version
(postbuildscript:2.X.X) is installed. The new version of postbuildscript
is not yet supported in global-jjb, so installing a newer version of JJB
breaks the initial population of the ci-management repo.

Change-Id: I873dda9d7c58ae33d4f0c0417eb95929397861ae
Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
7 years agoBump the initial global-jjb version to v0.17.0 98/9798/2
Trevor Bramwell [Fri, 6 Apr 2018 20:01:18 +0000 (13:01 -0700)]
Bump the initial global-jjb version to v0.17.0

Change-Id: I7267f7ab563e8c21ea9a979d49eace0386406bef
Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
7 years agoFix Shellcheck bugs in Gerrit Auth Script 03/9803/1
Trevor Bramwell [Fri, 6 Apr 2018 21:13:38 +0000 (14:13 -0700)]
Fix Shellcheck bugs in Gerrit Auth Script

Change-Id: I7d1846fe50274576e71e30c2bdeeef7578722b04
Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
7 years agoSetup and Configure Nexus 45/7145/4
Trevor Bramwell [Sat, 28 Oct 2017 12:55:56 +0000 (05:55 -0700)]
Setup and Configure Nexus

Adds the Nexus (v2) container and does the following:

 - Creates the initial 'logs' repository
 - Configures Jenkins to be able to talk to Nexus by creating a
   settings.xml, and installing the needed packages on the
   jenkins-agent.
 - Installs required plugins for the jjb logs publishing job, including
   downloading PostBuildScript during the Jenkins container build.
 - Directs requests to 'jenkins.localhost', etc, on the jenkins-agent
   through the nginx container.
 - Sets the Jenkins Markup Formatter to 'Safe HTML' so the logs link can
   be displayed.

Change-Id: I63c783156bcffd1699e9ca7fe1a114ee2ed54bed
Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
7 years agoConfigure GLOBAL_JJB_VERSION Through Environment 44/7144/3
Trevor Bramwell [Sat, 28 Oct 2017 12:51:21 +0000 (05:51 -0700)]
Configure GLOBAL_JJB_VERSION Through Environment

Pulling GLOBAL_JJB_VERSION from the environment allows for creating the
initial ci-management repo with a specific global-jjb version without
having to rebuild the init container.

This also modifies paths to the 'wait-for-it.sh' script to be absolute.

Change-Id: Ic2e7c2a9871fda176a678e245a57d1fde898c0a9
Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
7 years agoConfigure Jenkins Global Properties through Env 43/7143/3
Trevor Bramwell [Sat, 28 Oct 2017 12:48:58 +0000 (05:48 -0700)]
Configure Jenkins Global Properties through Env

By looking for these properties through the Jenkins environment, the
container no longer needs to be rebuilt each time JJB configuration
variables change; it can just be restarted.

Change-Id: I4b96e130ee94963f3ea94c9eb5eb3b5b77a1413f
Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
7 years agoRearrange Jenkins Agent Environment Variables 42/7142/3
Trevor Bramwell [Sat, 28 Oct 2017 12:45:12 +0000 (05:45 -0700)]
Rearrange Jenkins Agent Environment Variables

Moves the public key into config.env, and JAVA_OPTS into
docker-compose.yml since other containers look for the JAVA_OPTS
variable and it contains Jenkins specific information.

Change-Id: I775ac6fee8fdf3ec318368be973c43e8925d0fe5
Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
7 years agoCreate script for uploading ssh pubkey to Gerrit 41/7141/3
Trevor Bramwell [Thu, 26 Oct 2017 18:57:05 +0000 (11:57 -0700)]
Create script for uploading ssh pubkey to Gerrit

'gerrit-auth.sh' takes a single argument of an ssh public-key file to be
added to the sandbox user in Gerrit. This way users don't need to go
through an error-prone setup of copy & pasting the curl command. Some
explainations of curl errors are also provided.

Change-Id: I5b3af284348953b2cea37dedfff5b6bed852e4b7
Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
7 years agoMake Container Versions Configurable 40/7140/2
Trevor Bramwell [Wed, 18 Oct 2017 05:51:28 +0000 (22:51 -0700)]
Make Container Versions Configurable

There is a global 'environment' file for docker-compose called '.env'
which sits in the same directory as the yaml file[1]. Besides a shell
environment, This is where default values passed to the docker-compose
command line can be stored.

By having container specific versions listed here users of
ci-management will have an eaiser time bringing up a matrix of
different infrastructure configurations.

[1] https://docs.docker.com/compose/environment-variables/#the-env-file

Change-Id: Ie2bd92376fa817b13f4eb1d123f9fca8e10b99a5
Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
7 years agoMove LDAP configs to base directory 85/6785/1
Trevor Bramwell [Tue, 10 Oct 2017 23:33:00 +0000 (16:33 -0700)]
Move LDAP configs to base directory

This removes the need for a 'config' directory and config values have
been collapsed to 'config.env' and instance specific configuration is
stored under the instance name.

Change-Id: I64e2c93f42c799750ff2baf47033c2a909279483
Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
7 years agoMove Jenkins Groovy Scripts under jenkins/scripts 84/6784/1
Trevor Bramwell [Tue, 10 Oct 2017 23:31:13 +0000 (16:31 -0700)]
Move Jenkins Groovy Scripts under jenkins/scripts

This should help de-clutter the current jenkins directory containing the
Dockerfile and configs.

Change-Id: Iea68c13640291e9a654424300454319a0df2bd1a
Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
7 years agoCollapse Environment Files 83/6783/1
Trevor Bramwell [Thu, 5 Oct 2017 18:35:37 +0000 (11:35 -0700)]
Collapse Environment Files

Having all the environment variables in one place should help people
track down where settings are instead of having to dig through several
files.

Change-Id: Iceea0e7bf508f7a427a777077ed23b51e6791f0d
Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
7 years agoFull Integration of Jenkins and Gerrit 65/6265/2
Trevor Bramwell [Sun, 13 Aug 2017 06:27:46 +0000 (23:27 -0700)]
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>
7 years agoInitial Commit 01/5801/3
Trevor Bramwell [Wed, 9 Aug 2017 17:47:35 +0000 (10:47 -0700)]
Initial Commit

Change-Id: I8cfcd9adc88146a32c7621470a4dcbf5b5643690
Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
7 years agoSetup initial .gitreview and .gitignore 82/5782/2
Andrew Grimberg [Tue, 8 Aug 2017 22:01:40 +0000 (15:01 -0700)]
Setup initial .gitreview and .gitignore

Configure new repository with .gitreview and .gitignore

Change-Id: I8251a6d0ae1da9f50be57160795055b5c8d3a413
Signed-off-by: Andrew Grimberg <agrimberg@linuxfoundation.org>
7 years agoAdd Coala linting 99/5799/1
Andrew Grimberg [Wed, 9 Aug 2017 17:29:39 +0000 (10:29 -0700)]
Add Coala linting

Change-Id: Id378925dcebe48c23465401240df0f647f8ae1ad
Signed-off-by: Andrew Grimberg <agrimberg@linuxfoundation.org>
7 years agoInitial empty repository
Andrew Grimberg [Tue, 8 Aug 2017 21:59:50 +0000 (21:59 +0000)]
Initial empty repository