Wednesday, 9 October 2019

azure devops, debug your pipeline

there are a lot of way to run shell command to list down files or cat files to debug pipeline.

but if you want to download a file and check if it is right, then you can do this:

- task: ArchiveFiles@2
rootFolderOrFile: '/home/vsts/work/_temp/yoursexappsomefolder/'
includeRootFolder: true
archiveType: 'zip'
archiveFile: '$(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip'
replaceExistingArchive: true

- task: PublishPipelineArtifact@1
targetPath: '$(Build.ArtifactStagingDirectory)'
artifact: '$(Build.BuildId).zip'

above "/home/vsts/work/_temp/yoursexappsomefolder/" is the folder you want to check, you will see this in your log. especially when you pipeline failed, you will see some folder info, you can then guess which file is wrong, and you want to check it, then you just put the folder name here.

after you added above task after build it will have the zip file here:

No comments:

Post a comment