title: OpenShift 3 GitHub Webhook Setup
body: <p>I have managed to create on <strong>OpenShift 3</strong> a project and an app that uses <strong>Tomcat 8</strong>.</p>
  
  <p>I have managed to get it working in <strong>Eclipse Oxygen</strong> and the code can be pushed to <strong>GitHub</strong>.</p>
  
  <p>I can make changes to the code in the <strong>Eclipse IDE</strong>, push the changes to <strong>GitHub</strong> and then in <strong>Openshift Online</strong>, I can manually build. I can see the change out on the web, so all is well so far.</p>
  
  <p>I have tried to get the <strong>GitHub Webhook</strong> working but so far, I am unsuccessful.</p>
  
  <hr>
  
  <p><strong>In OpenShift Online:</strong></p>
  
  <p>Following instructions here: <a href="https://docs.openshift.com/online/dev_guide/builds/triggering_builds.html#webhook-triggers" rel="nofollow noreferrer">Triggering Builds</a></p>
  
  <p>Then running the following command:</p>
  
  <pre><code>./oc describe bc myapp
  </code></pre>
  
  <p>Gives the output:</p>
  
  <pre><code>Name:           myapp
  Namespace:      my-project-1
  Created:        24 hours ago
  Labels:         app=myapp
  Annotations:    openshift.io/generated-by=OpenShiftNewApp
  Latest Version: 8
  
  Strategy:       Source
  URL:            https://github.com/&lt;MyCompanyName&gt;/os-sample-java-web.git
  From Image:     ImageStreamTag openshift/jboss-webserver30-tomcat8-openshift:latest
  Output to:      ImageStreamTag myapp:latest
  
  Build Run Policy:       Serial
  Triggered by:           ImageChange, Config
  Webhook GitHub:
      URL:    https://api.starter-ca-central-1.openshift.com:443/oapi/v1/namespaces/my-project-1/buildconfigs/myapp/webhooks/Geglxxxxxthk0u/github
  Webhook Generic:
      URL:            https://api.starter-ca-central-1.openshift.com:443/oapi/v1/namespaces/my-project-1/buildconfigs/myapp/webhooks/SiyGxxxxxxxx7oHLP/generic
      AllowEnv:       false
  </code></pre>
  
  <hr>
  
  <p><strong>In GitHub Create Webhook:</strong></p>
  
  <p>Payload URL</p>
  
  <pre><code>https://api.starter-ca-central-1.openshift.com/oapi/v1/namespaces/my-project-1/buildconfigs/myapp/webhooks/Geglxxxxxthk0u/github
  </code></pre>
  
  <p>Content Type</p>
  
  <pre><code>application/json
  </code></pre>
  
  <p>Secret</p>
  
  <pre><code>Geglxxxxxthk0u
  </code></pre>
  
  <p>Note. The ping on the webhook in GitHub got a green tick and status 200 so it looks ok.</p>
  
  <hr>
  
  <p>The above password can also be seen in the <strong>OpenShift Online</strong> page <strong>Edit Build Config myapp</strong> as:
  <code>triggers:
      - github:
          secret: Geglxxxxxthk0u
        type: GitHub
  </code></p>
  
  <p>So it looks right to me.</p>
  
  <p><strong>But it does not work, so what am I missing?</strong></p>