Skip to content
forked from atteo/jfactory

Java Software Construction Kit based on Docker, Gerrit, Jenkins, Nexus

License

Notifications You must be signed in to change notification settings

barti271/jfactory

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JFactory

Overview

JFactory is a ready to use CI/CD environment created as a series of a Docker containers. Currently it contains:

  • Gerrit for management of the Git repositories
  • Jenkins for verifying reviews and continuously deploying ready product
  • Nexus for keeping binary files
  • Nginx which acts as a proxy to Gerrit, Jenkins and Nexus

Quick installation instructions

  1. Download starter repository.
git clone https://github.com/atteo/jfactory-starter
  1. Execute:
setup.sh
  1. Edit '.env' file and set at least LDAP_URL and LDAP_ACCOUNT_BASE

  2. Start Docker containers:

docker-compose up

Docker-compose will start Gerrit, Nexus, Jenkins and Nginx. As Gerrit setup is not finished yet, Jenkins might be unable to connect to Gerrit and the following error will be shown in the logs:

com.sonymobile.tools.gerrit.gerritevents.ssh.SshException: com.jcraft.jsch.JSchException: Auth fail

This is normal on first run.

  1. Open Gerrit web page:
http://172.179.0.1/gerrit

Note: URL might be different, if you modified MAIN_URL in .env file

Log in as some user. The first user to log in will have Administrator role in Gerrit. After the first user logs in the batch-user plugin in Gerrit will automatically create another user with appropriate permission for Jenkins Trigger plugin.

Enabling HTTPS

Nginx proxy can optionally use HTTPS instead of plain HTTP. To switch to HTTPS change MAIN_URL property in '.env' file from http:// to https:// . Using HTTPS requires valid SSL certificates. By default self-signed certificates generated by setup.sh script are used. You can provide your own key and certificate files by overwriting the files in which they are stored: certificates/nginx-server.key and certificates/nginx-server.crt.

Users need to have the server certificate imported as a trusted certificate in order for git commands to work without issuing an error.

If you receive the following error when cloning the repo

fatal: unable to access 'https://..../gerrit/example/': server certificate verification failed

the SSL certificate for HTTPS is not trusted on your machine. Import the certificates in your OS store. For ubuntu see this link.

About

Java Software Construction Kit based on Docker, Gerrit, Jenkins, Nexus

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 47.5%
  • Shell 44.1%
  • Nginx 6.9%
  • Groovy 1.5%