Go to Previous Step
Let's create a webhook by going to the repository's Settings, then clicking on Webhooks on the left pane, then clicking on Add webhook:
The Payload URL is the address in which the Docker host is running with its Jenkins container. This address must be such that GitHub is able to connect to it. Make sure you have /github-webhook/ at the end of the URL. The Content type must be application/json. Finally we'll keep the events to just be the push event. Click on Add webhook:
Click on the webhook just created to see if everything is as expected. Once you come back to the Webhooks page you should see a green check next to the webhook.
Let's test this setup! Make a push to change the repository. Once the push is received by GitHub, a webhook is sent to Jenkins, triggering the pipeline. You should see a pending process within Jenkins:
If you're interested in looking at the outputs of this run live, you may click on Console Output:
Notice that the results of the tests are seen in the output:
This concludes this tutorial.
Go to Previous Step