I created this azure-pipelines-regression.yaml file to run tasks in my Azure pipeline, it has those steps:
...... other scripts
- task: NodeTool@0
inputs:
versionSpec: '18'
displayName: 'Install Node.js'
- script: |
cd /home/vsts/work/1/s
npm install --legacy-peer-deps
displayName: 'npm install'
- script: |
cd /home/vsts/work/1/s
dir
displayName: 'List contents 1'
- task: DownloadSecureFile@1
displayName: 'Download env file'
inputs:
secureFile: '.env.local'
- script: |
cd /home/vsts/work/1/s
dir
displayName: 'List contents 2'
...... other scripts
In the pipeline job there are all the steps except the Download env file step. I deliberately created the List contents 1 and List contents 2 steps and they showed in the job, so I'm sure the code change was pushed. Just the step in the middle was skipped?

The
DownloadSecureFile@1task is not skipped but executed as a pre-job right after the initialization.Once downloaded, you can use the
namevalue that is set on the task to reference the path to the secure file on the agent machine. For example, if the task is given the namemySecureFile, its path can be referenced in the pipeline as$(mySecureFile.secureFilePath).The output is: