Two containers are provided to demonstrate continous integration of the monorepo:
- a simple git repo to which the monorepo has been pushed
- a customized Jenkins preconfigured to connect to the git repo and scan for branches with build pipelines
- Run
docker-compose up --build
to build images and spin up containers - Visit Jenkins at http://localhost:8080 - you may need to click "Scan Multibranch Pipeline Now"
- The git repo is available on a non-standard ssh port to avoid port conflicts: hence
export GIT_SSH_COMMAND="ssh -oPort=122 -i $PWD/provision/keypair/.ssh/id_rsa"
- The private key the you need to access the git repo needs closed file permissions:
chmod 600 provision/keypair/.ssh/id_rsa
- Clone the repo:
git clone ssh://git@localhost/home/git/test.git ~/mycheckout
- Play around with the clone; adding a branch, changing some files, pushing and take note of how Jenkins picks different Jenkinsfiles to build.