When I try to run a Powershell script using Azure DevOps pipeline, I'm getting an error "ENOENT: no such file or directory, stat '/azp/agent/_work/1/a/repo1/folder1/Powershell-newscript.ps1
Log file suggest that the file is located at: /azp/agent/_work/1/s/repo1/folder1/Powershell-newscript.ps1
How do I move this file from 's' to 'a'? /azp/agent/_work/1/s to /azp/agent/_work/1/a
- checkout: self
- checkout: IAC
- task: CopyFiles@2
inputs:
targetFolder: '$(Build.ArtifactStagingDirectory)'
- task: PublishBuildArtifacts@1
displayName: 'Building Artifact now'
inputs:
pathToPublish: '$(Build.ArtifactStagingDirectory)'
artifactName: 'drop-self'
steps:
- task: DownloadBuildArtifacts@0
inputs:
artifactName: 'drop-self'
downloadPath: '$(System.ArtifactsDirectory)'
- task: AzurePowerShell@5
inputs:
azureSubscription: ${{parameters.subName}}
ScriptType: 'FilePath'
ScriptPath: '$(System.ArtifactsDirectory)/repo1/folder1/Powershell-newscript.ps1'
azurePowerShellVersion: 'LatestVersion'
Could you please help? Thanks!