Jervis generates Jenkins jobs using Travis CI YAML. This project is meant to bootstrap Jenkins from scratch and pre-configure it to use Jervis.
This project uses a submodule. Therefore, cloning it must include also cloning the submodule.
git clone --recursive https://github.com/samrocketman/jenkins-bootstrap-jervis.git
Log into GitHub and generate an API token so that Jervis can authenticate to the GitHub API.
Using Vagrant is the recommended way to provision. Copy
settings.groovy.EXAMPLE
to settings.groovy
and
fill in the GitHub personal access token.
export VAGRANT_JENKINS=1
vagrant up
./jervis_bootstrap.sh
Visit http://localhost:8080/
to see Jenkins running with Jervis. Simply read
the Welcome page for next steps. The first example will guide you through
onboarding the Jervis project for CI.
Jervis built from the main
branch by this Jenkins
instance.
Jervis built from the jervis_simple
branch by
this Jenkins instance.
If you wish to try out this project with webhook integration then I recommend taking advantage of the webhookrelay service.
Provision Jenkins in vagrant and then provision a relay automatically. Pro-tip:
start the relay in a screen
session so it's easy to detach.
vagrant ssh
curl -sSL https://storage.googleapis.com/webhookrelay/downloads/relay-linux-amd64 > relay && chmod +x relay && sudo mv relay /usr/local/bin
relay forward -b jervis -t internal http://localhost:8080/github-webhook/
Username (token Access Key) and password (token Secret Key) comes from webhookrelay tokens.
Update the settings.groovy
file by setting the github_plugin
> hookUrl
setting to the value of the webhookrelay "input".
Example webhookrelay "input" URL:
https://my.webhookrelay.com/v1/webhooks/<uuid>
Configure Jenkins normally and GitHub repository hooks will now be configured with a proper webhook when jobs are generated.