GitHub Webhook unable to publish event to CD Director

Document ID : KB000100613
Last Modified Date : 19/06/2018
Show Technical Document Details
Issue:
In reference to section  "Integrate with GitHub" in document  and configuring web-hook as instructed with below configuration

Payload URL: https://cddirector.io/cdd/design/tenant-id/v1/applications/Sample%20Application%201/application-versions/1.0?username=user_name
Content type: application/json

When the code is pushed to Github repository, it publishes an event to CD Director (CDD) and results in failure with error "Something went wrong"
Environment:
CA Continuous Delivery Director(SaaS)
Github
Cause:

Analyzing the issue at Github end we realized that the web-hook while publishing events ignores fraction part of version number. For example if in payload URL the application version is 1.0 the web-hook will publish only an integer part i.e. 1 and ignores .0, which result in an error of 404.

Erroneous body getting published by web-hook when application version in payload URL is 1.0

{"errors":[{"messageCode":"entityNotFound","arguments":[{"name":"entityClassName","value":"ApplicationVersion"},{"name":"entityName","value":"Sample Application/1"}],"type":"general"}]}




 

 

Resolution:
We review in detail and found that there was a mistake in technical document which will be corrected by technical writing team. The error is a typo/glitch where after application_version_name we are missing "/". Use the correct URL in web-hook integration and it will work as expected.

Incorrect:               http://HOST:PORT/cdd/design/tenant_id/v1/applications/application_name/application-versions/application_version_name?username=user_name

                               it should be as below mentioned.

 Correct:                http://HOST:PORT/cdd/design/tenant_id/v1/applications/application_name/application-versions/application_version_name/?username=user_name
 
Additional Information:

https://docops.ca.com/ca-continuous-delivery-director/saas/en/getting-started-saas/tutorial-create-a-release/set-up-a-release