Sandeep Sharma
Sandeep Sharma

Reputation: 111

Drone CI pipeline does not get triggered with Github deployments

I am trying to trigger the Drone pipeline on the deployment events gets published by GitHub onto the webhook(created by Drone), for this i have done the below things:

  1. I have updated GitHub webhook for Drone to only gets triggered when any deployments event is generated by GitHub.

  2. I created a deployment using GitHub API call, below is snippet for same, command executed successfully, i can see the deployment event payload as well in the command output.

    curl -f -u: -X POST --data @jsonfile https://api.github.com/repos/owner-or-org-name/repo-name/deployments

  3. Below are entries of JSONFILE which i am using while creating the GitHUb deployment.

    { "ref": "master", "auto_merge": false, "payload": "{}", "description": "this is test deployment from Jenkins pipeline" }

  4. To cross check if Github triggers the Drone webhook with deployment event, i have checked the GitHub Webhook recent deliveries, there i can see a deployment event entry along with GREEN mark and Response Status is 204, which tells that GitHub generated the deployment event.

  5. Below is the snapshot of .drone.yml, this works well if i remove the when condition, along with updating webhook to accept the push event

    pipeline: s3publish: image: XXXXXXX bucket: XXXXXXXX source: file1 target: file when: event: deployment

Can someone help me on this, do i am missing anything in same, as drone does gets triggered with all above.

Let me know if any other information is required.

Thx, Sandeep

Upvotes: 1

Views: 2084

Answers (1)

kubaj
kubaj

Reputation: 63

There is section "Repository Hooks" in Drone UI in repository settings. You have to check "deployment" event in that section and it'll be working

Upvotes: 2

Related Questions