I'm trying to debug a pipeline script in Azure to see what the variables are, but I'm not sure of the syntax.
I have looked through the documentation
What I have tried so far
parameters:
deploymentName: ""
dependsOn: ""
env: ""
dockerfilePath: ""
buildContext: ""
repository: ""
envGroup: ""
dockerRegistryServiceConnection: ""
tag: ""
token: ""
runTests: ""
jobs:
- deployment: ${{ parameters.deploymentName }}
dependsOn: ${{ parameters.dependsOn }}
pool: "Private Docker"
environment: "${{ parameters.envGroup }}"
strategy:
runOnce:
deploy:
steps:
- checkout: self
- task: Docker@2
displayName: "ACR Login"
inputs:
command: login
containerRegistry: "${{ parameters.dockerRegistryServiceConnection }}"
##[debug]Debug!!!!!1 $runTests
##[debug]Debug!!!!!2 $parameters.runTests
##[debug]Debug!!!!!3 ${{parameters.runTests}}
- script: echo runTests in dockerbuild.yml ${{parameters.runTests}}
- script: echo runTests in dockerbuild.yml $parameters.runTests
- script: echo runTests in dockerbuild.yml $runTests
- task: Docker@2
displayName: Build
inputs:
command: build
repository: "${{ parameters.repository }}"
buildContext: "${{ parameters.buildContext }}"
dockerfile: "${{ parameters.dockerfilePath }}"
arguments: "--build-arg TOKEN=${{ parameters.token }} --build-arg RUNTESTS=${{ parameters.runTests }}"
tags: |
$(Build.BuildId)
latest
Problem
The debug and echo do not print anything in the azure pipeline build:
##[debug]Debug!!!!!1 $runTests
##[debug]Debug!!!!!2 $parameters.runTests
##[debug]Debug!!!!!3 ${{parameters.runTests}}
- script: echo runTests in dockerbuild.yml ${{parameters.runTests}}
- script: echo runTests in dockerbuild.yml $parameters.runTests
- script: echo runTests in dockerbuild.yml $runTests
Question
Is this the correct syntax for printing to the azure bash when running the yaml file?
