We have a custom deployment step that sends a message to our teams server when the deployment succeeds, fails or is stopped. I want to add the changeset data to the message. How can I access the change set log of the build that is being deployed so that I can add the change set data to the message posted to our teams server?
Currently the step is a Build > Shell/Batch Command. Below is the current script running.
#!/bin/bash
echo "Successful deploy for environment: ${vars.getValue("TARGET_ENV")} ${vars.getValue("TRC_SCM_BRANCH_NAME")}"
curl --location --request POST "https://teams.server.com/webhook/9999/IncomingWebhook/9999" --header "Content-Type: application/json" --data '{"@type": "MessageCard","@context": "https://schema.org/extensions","summary": "Deploy Notification","themeColor": "0078D7","sections": [{"activityImage": "https://image.server.com/is/image/XXXXX/success","activityTitle": "Deploy Successful **${vars.getValue("TARGET_ENV")}**","activitySubtitle": "${vars.getValue("TRC_SCM_BRANCH_NAME")}","activityText": ""}]}'
Any help would be appreciated
- solved #2
- replies 1
- views 1289
- stars 1