0

We have an Azure pipeline that performs the App Center Distribute task. When posting to Slack with the build details, we would like to get the release name/id or even better would be the link to the release. Is it possible to obtain any of these values from the distribute task result?

Dhananjay Suresh
  • 1,030
  • 1
  • 14
  • 28
  • How about add the Variables `Release.ReleaseId` and `Release.DefinitionName` in the Release notes in that task? https://learn.microsoft.com/en-us/azure/devops/pipelines/release/?view=azure-devops#how-do-i-manage-the-names-for-new-releases – Leo Liu Jul 10 '19 at 09:49
  • @LeoLiu-MSFT Those two variables would be used to change the default releaseId/name right? We don't mind the sequential numbering, we just would like to get the next number used after the upload. For example if the new build is `723` we would like `723` in a variable or access to it so we can use it later. – Dhananjay Suresh Jul 10 '19 at 20:15
  • How about the issue, is there anything to update? – Leo Liu Jul 15 '19 at 07:10
  • @LeoLiu-MSFT the person who implemented the feature got it to work another way so he didn't get a chance to try the answer below. – Dhananjay Suresh Jul 16 '19 at 16:01

1 Answers1

0

Is it possible to get the release name/id from the App Center Distribute task?

Not very sure if I understand your purpose correctly, the short answer is yes.

We could use the variables Release.ReleaseId and Release.DefinitionName to get the release name/id. Those two variable are pre-defined variables, we could use it directly in the build and release.

If you want to use the next number of the build ID, you could use a simple batch task to overwrite the variable:

echo $(Release.ReleaseId)

set /a TestVar=$(Release.ReleaseId)+1

echo %TestVar%

enter image description here

Then we could use the Logging Command ##vso[task.setvariable variable=testvar]testvalue to set our custom variable.

Hope this helps.

Community
  • 1
  • 1
Leo Liu
  • 71,098
  • 10
  • 114
  • 135