Your browser was unable to load all of the resources. They may have been blocked by your firewall, proxy or browser configuration.
Press Ctrl+F5 or Ctrl+Shift+R to have your browser try again.

Access Change Set in deployment step #4279

grudzien44140 ·

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.


echo "Successful deploy for environment: ${vars.getValue("TARGET_ENV")} ${vars.getValue("TRC_SCM_BRANCH_NAME")}"

curl --location --request POST "" --header "Content-Type: application/json" --data '{"@type": "MessageCard","@context": "","summary": "Deploy Notification","themeColor": "0078D7","sections": [{"activityImage": "","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 666
  • stars 1
robinshen ADMIN ·

You may get changeset of current build via groovy script like below:

for (buildChangeset in build.changes) {;
  def changeset = buildChangeset.changeset;"changed by: " + changeset.user);"change message: " + changeset.comment);
  for (modification in changeset.modifications) {"action: " +;"path: " + modification.path);

And you may encoded these messages appropriately and use in your shell script.