Hello,
I previously posted a question regarding updating GitHub Deployment status(thread)
I wanted to trigger webhook within pipeline step rather than using global webhook, but I found identifier of GitHub Deployment is missing as an environment variables.
Since deployment_id is already captured as deploy_id
and stored in builds table, I’m wondering if it would be possible to expose deploy_id
as environment variable like DRONE_DEPLOY_TO.
For example, I’m thinking of doing some thing like this:
- name: webhook
image: plugins/webhook
settings:
urls: http://external-service/webhooks/${DRONE_DEPLOY_TO}
content_type: application/json
template: |
{
"image_tag": "${DRONE_COMMIT_SHA}",
"ref": "{{ build.ref }}",
"environment": "${DRONE_DEPLOY_TO}",
"deploy_id": "${DRONE_DEPLOY_ID}"
}
Thanks!