You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: updated Azure DevOps feature docs for setting ARM outputs (#282)
* docs: added yaml example for Set-AzDevOpsArmOutputsToPipelineVariables
* docs: added yaml example for Set-AzDevOpsArmOutputsToVariableGroup
* docs: added needed variable group permissions for AzDevOpsArmOutputsToVariableGroup
* docs: specified that ArmOutputs variable should only be set for Linux agents
* docs: apply suggestion from code review (double space and quote syntax)
* Apply suggestions from code review
Added newline in between quotation block
Co-authored-by: Frederik Gheysels <frederik.gheysels@telenet.be>
* Apply suggestions from code review
Syntax corrections and added Azure DevOps Example headers
Co-authored-by: Pim Simons <32359437+pim-simons@users.noreply.github.com>
* Apply suggestions from code review
Added danger sign and extra info regarding Azure DevOps variable groups
Co-authored-by: Stijn Moreels <9039753+stijnmoreels@users.noreply.github.com>
Co-authored-by: Alex Spassov Simeonov <alex.spassov@codit.eu>
Co-authored-by: Frederik Gheysels <frederik.gheysels@telenet.be>
Co-authored-by: Pim Simons <32359437+pim-simons@users.noreply.github.com>
Co-authored-by: Stijn Moreels <9039753+stijnmoreels@users.noreply.github.com>
# The pipeline variable $variableName will be updated to value $variableValue as well, so it can be used in subsequent tasks of the current job.
83
84
```
84
85
86
+
**Azure DevOps Example**
87
+
This function is intended to be used from an Azure DevOps pipeline. Internally, it uses some predefined Azure DevOps variables.
88
+
One of the environment variables that is used, is the `SYSTEM_ACCESSTOKEN` variable. However, due to safety reasons this variable is not available out-of-the box.
89
+
To be able to use this variable, it must be explicitly added to the environment-variables.
90
+
91
+
> ⚠ When you are using a Linux agent, you need to pass other environment variables that you want to use as well, because these are not available. To be able to use the `ArmOutputs` environment variable, it must be explicitly added to the environment-variables.
92
+
93
+
Example of how to use this function in an Azure DevOps pipeline:
94
+
95
+
```yaml
96
+
- task: PowerShell@2
97
+
displayName: 'Promote Azure resource outputs to variable group'
98
+
env:
99
+
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
100
+
ArmOutputs: $(ArmOutputs) # only needs to be set for Linux agents
In Azure DevOps, below permissions need to be set on your variable group in order to make the 'Promote Azure resource outputs to variable group' task succeed. For more information on service accounts, see [the official Azure DevOps documentation](https://docs.microsoft.com/en-us/azure/devops/organizations/security/permissions?view=azure-devops&tabs=preview-page#service-accounts).
This function is intended to be used from an Azure DevOps pipeline.
144
+
145
+
> ⚠ When you are using a Linux agent, you need to pass other environment variables that you want to use as well, because these are not available. To be able to use the `ArmOutputs` environment variable, it must be explicitly added to the environment-variables.
146
+
147
+
Example of how to use this function in an Azure DevOps pipeline:
148
+
149
+
```yaml
150
+
- task: PowerShell@2
151
+
displayName: 'Promote Azure resource outputs to pipeline variables'
152
+
env:
153
+
ArmOutputs: $(ArmOutputs) # only needs to be set for Linux agents
# Information on them can be found here: https://docs.microsoft.com/en-us/azure/devops/pipelines/build/variables?view=azure-devops&tabs=yaml
127
177
```
128
178
129
-
This function is intended to be used from an Azure DevOps pipeline. Internally, it uses some predefined Azure DevOps variables.
130
-
One of the environment variables that is used, is the the `SYSTEM_ACCESSTOKEN` variable. However, due to safety reasons this variable is not available out-of-the box.
179
+
**Azure DevOps Example**
180
+
This function is intended to be used from an Azure DevOps pipeline. Internally, it uses some predefined Azure DevOps variables.
181
+
One of the environment variables that is used, is the `SYSTEM_ACCESSTOKEN` variable. However, due to safety reasons this variable is not available out-of-the box.
131
182
To be able to use this variable, it must be explicitly added to the environment-variables.
132
183
133
184
Example of how to use this function in an Azure DevOps pipeline:
0 commit comments