Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Everything related to Jenkins

GitHub webhooks

Note : Github webhook for apache/incubator-mxnet can only be created by the Apache Infra team. A request needs to be made for setting up a new webhook / updating existing webhook. For ex :

Jira
serverASF JIRA
serverId5aa69414-a9e9-3523-82ec-879b028fb15b
keyINFRA-20085

GitHub webhooks allow to be notified of GitHub events instead of polling. This allows us to operate without running into rate limiting. The configuration in Jenkins has a few catches that can save you quite some time:

Create a webhook at https://github.com/ACCOUNT/REPOSITORY/settings/hooks/. You can use this configuration for reference:

Note : Make sure to include the trailing `/` in the Payload URL section for configuring the webhook on Github. Refer : 302 Github webhook with Jenkins error on StackOverflow.

You will have to create a secret manually. Note it down as it is required to be entered into Jenkins.

...

On "Shared Secret", press "Add". A new window will open up. In the "Kind" dropdown, select "Secret text". Then input something like the following and insert the previously noted down secret:

 


Now go back to the GitHub webhook and press "Redeliver":

Jenkins Job does not get triggered by WebHook

In case the web hook has properly been set up, go to the system log (e.g. http://jenkins.mxnet-ci-dev.amazon-ml.com/log/all) and search for something along the following lines:

Received PULL_REQUEST for https://github.com/MXNetEdge/incubator-mxnet from 192.30.252.40 ⇒ http://jenkins.mxnet-ci-dev.amazon-ml.com:8080/github-webhook

If you don't see this message, this means that the we bhook has not been set up properly. consult the previous guide how to continue. This message is a prerequisite for this guide.

To analyze a certain job, go to that job and look for the entry "Repository Events" (e.g. http://jenkins.mxnet-ci-dev.amazon-ml.com/job/test-marco-mxnet-sanity/indexing/events). You will see something along the following lines:

[Tue Nov 20 14:52:10 UTC 2018] Received Pull request #5 opened in repository MXNetEdge/incubator-mxnet CREATED event from 192.30.252.35 ⇒ http://jenkins.mxnet-ci-dev.amazon-ml.com:8080/github-webhook/ with timestamp Tue Nov 20 14:52:05 UTC 2018
14:52:11 Connecting to https://api.github.com using MXNetEdgeBot/****** Examining MXNetEdge/incubator-mxnet

  Checking branches...

  Getting remote branches...

    Checking branch master

  16 branches were processed

  Checking pull-requests...

  Getting remote pull request #5...

    Checking pull request #5
      ‘ci/jenkins/Jenkinsfile’ not found
    Does not meet criteria

    Checking pull request #5
      ‘ci/jenkins/Jenkinsfile’ not found
    Does not meet criteria

  2 pull requests were processed

Finished examining MXNetEdge/incubator-mxnet

[Tue Nov 20 14:52:12 UTC 2018] Pull request #5 opened in repository MXNetEdge/incubator-mxnet CREATED event from 192.30.252.35 ⇒ http://jenkins.mxnet-ci-dev.amazon-ml.com:8080/github-webhook/ with timestamp Tue Nov 20 14:52:05 UTC 2018 processed in 1.7 sec

Here you can see, for example, that the PR did not contain the requested file. In this particular case, the background was a bit different. See the guide below for details

Jenkinsfile not found or changes not reflected

If you create a new Jenkinsfile and it does not get picked up by Jenkins with the following message if you submit a pull request

Checking pull request #5
  ‘ci/jenkins/Jenkinsfile’ not found
Does not meet criteria

this might not mean that the file is missing but rather be related to the security restrictions Jenkins has. The background here is the fact that Jenkins does not evaluate Jenkinsfiles from people without write permissions to the repository. Request somebody with write permissions to open the pull request instead.

GitHub commit/PR status does not get published 

...