I am trying to trigger Drone pipeline only on deployment event dispatched from GIthub and before jump on, let me give you context about this poc.
Context of this requirement
- Using jenkins for building the artifact
- Drone to do the deployment only, as drone has required permissions to do the deployment
So to accomplish this i am trying use the deployment event only to trigger the drone pipeline, below is the follow of approach:
- Jenkins do all activities till uploading the artifact to centralized location
- then at last jenkins will create github deployment for our repo using API call
- This github deployment will dispatch the deployment event on to drone webhook
- Drone webhook configuration will be updated to only listen for deployment event
- Drone pipeline gets executed on these deployment events.
What i have done so far in same:
- Able to create githhub deployments using curl command calling github API.
- Above command gets executed successfully as i can see the the whole deployment event payload on console.
- To cross check that further i can see new entry in Github webhook Recent Deliveries for deployment event which is dispatched with GREEN in status and 204 response code.
- At Drone site i have defined on pipeline step with when condition like environment: dev and event: deployment, but unfortunately drone pipeline does not gets triggered
Can someone help in this, i mean if this possible in above way, if yes mistake am doing and this approach is not feasible please suggest the alternate approach, i know about one where we can directly use the drone cli to trigger the deployment, but i want to if anything else can be done to achieve this use case.
Let me know if any other information is required from my side.