Closed patdelaney closed 1 year ago
You need to save your number as a build variable. Then add the prefix that you chose for it to the config. It will save all variables with that prefix.
But the CR is not created during the build its created during a release task. How would I save it as a build variable in Powershell? (I'm new)
On Tue, Jan 7, 2020 at 7:26 AM Martin Hinshelwood nkdAgility.com < notifications@github.com> wrote:
You need to save your number as a build variable. Then add the prefix that you chose for it to the config. It will save all variables with that prefix.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/nkdAgility/azure-devops-variable-tools/issues/12?email_source=notifications&email_token=AB6FEAZMGDZEHQNPURXM3DDQ4R7GNA5CNFSM4KDHASV2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEII27KY#issuecomment-571584427, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB6FEA3UZA7RM7PJQKT26KDQ4R7GNANCNFSM4KDHASVQ .
I'm not sure of the current method but it's in the documentation.
which documentation are you referring to? please send a link
On Tue, Jan 7, 2020 at 8:21 AM Martin Hinshelwood nkdAgility.com < notifications@github.com> wrote:
I'm not sure of the current method but it's in the documentation.
-MrHinsh
Martin Hinshelwood DevOps & Scrum Consultant
naked Agility Ltd. | https://nkdagility.comhttps://nkdagility.com/
+44 7811 164 522 | +52 1 998 894 1898 | WhatsApp | Messenger< http://m.me/nkdagility> | Direct Message< https://twitter.com/messages/compose?recipient_id=1393710744>
Microsoft MVP: Developer Technologies & DevOps,
Scrumorg Professional Scrum Trainer & Evidence-based Change Consultant
Author of Professional ALM with VS 2013< http://www.wrox.com/WileyCDA/WroxTitle/Professional-Application-Lifecycle-Management-with-Visual-Studio-2013.productCd-1118836588.html>, Creator of Azure DevOps Migration Tools< https://marketplace.visualstudio.com/items?itemName=nkdagility.vsts-sync-migration>, Azure DevOps Process Tools< https://marketplace.visualstudio.com/items?itemName=nkdagility.processtemplate>, & Azure DevOps Git Tools< https://marketplace.visualstudio.com/items?itemName=nkdagility.gittasks>
From: patdelaney notifications@github.com Sent: Tuesday, 7 January 2020 13:31 To: nkdAgility/azure-devops-variable-tools Cc: Martin Hinshelwood nkdAgility.com; Comment Subject: Re: [nkdAgility/azure-devops-variable-tools] Is this workflow supported? (#12)
But the CR is not created during the build its created during a release task. How would I save it as a build variable in Powershell? (I'm new)
On Tue, Jan 7, 2020 at 7:26 AM Martin Hinshelwood nkdAgility.com < notifications@github.com> wrote:
You need to save your number as a build variable. Then add the prefix that you chose for it to the config. It will save all variables with that prefix.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub < https://github.com/nkdAgility/azure-devops-variable-tools/issues/12?email_source=notifications&email_token=AB6FEAZMGDZEHQNPURXM3DDQ4R7GNA5CNFSM4KDHASV2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEII27KY#issuecomment-571584427 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AB6FEA3UZA7RM7PJQKT26KDQ4R7GNANCNFSM4KDHASVQ
.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub< https://github.com/nkdAgility/azure-devops-variable-tools/issues/12?email_source=notifications&email_token=ABHW4R2UGPBENG3NL4VFACDQ4R73BA5CNFSM4KDHASV2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEII3QRA#issuecomment-571586628>, or unsubscribe< https://github.com/notifications/unsubscribe-auth/ABHW4R3NSKU72AFZ4R6IZ3TQ4R73BANCNFSM4KDHASVQ
.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/nkdAgility/azure-devops-variable-tools/issues/12?email_source=notifications&email_token=AB6FEAZIYUFVDEBX77MKNFLQ4SFVXA5CNFSM4KDHASV2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIJAJGA#issuecomment-571606168, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB6FEA2UVR6Q4S6NM42R6KTQ4SFVXANCNFSM4KDHASVQ .
The Microsoft Azure DevOps product documentation for build tools. Check https://docs.microsoft.com/en-us/azure/devops/pipelines/process/variables?view=azure-devops&tabs=classic%2Cbatch#set-variables-in-scripts
Is this workflow possible with this tool.
I have a release base on a build. For this example I have 3 environments. Development, UAT, and Production. After a successful deploy to UAT, (the 1nd environment) I want to run a PowerShell task that creates a ServiceNow Change request ticket via REST API. When I submit the request ServiceNow returns a JSON that I can extract the CR Number. At the end of the script I try to store the CR as a variable
Save the CR# as a variable
$crnumber = $response.result.number Write-Output "CR#= " $crnumber
After that step I am running the Save Build Variables
My question is do I need to define the $crnumber in the save task?