Hello I think the problem I am facing might be a beginner doubt, but here it is:
I have a stage yaml which is called by my main yaml. Stage yaml has a parameter which I want to use in inline script.
Here is the yaml (skeleton)
parameters:
- name: myParam
type: string
stages:
- stage:
dependsOn:
displayName:
pool:
name:
jobs:
- deployment:
displayName:
pool:
name:
environment:
name:
strategy:
runOnce:
deploy:
steps:
- template:
parameters:
azureServiceConnection:
subscriptionId:
- task: AzureCLI@2
displayName: ''
inputs:
workingDirectory: ''
azureSubscription:
scriptType: 'pscore'
scriptLocation: inlineScript
inlineScript: |
Write-Host //I want to print it here or assign to a variable like next line
$paramValue = //here
How can I use myParam here?
Specify an
env
block and reference the value as an environment variable.i.e.