admin管理员组文章数量:1434929
I have an Azure DevOps pipeline that builds an Android bundle. After the task that builds my app, there are two tasks as below. Log of the first one shows that $(Build.BinariesDirectory)
folder contains MyApp.aab
and MyApp-Signed.aab
. But the second task doesn't find anything and copies 0 files.
Any ideas why it is happening? I've tried everything including hard-coding /Users/runner/work/1/b/MyApp-Signed.aab
which is the actual path from log of previous tasks.
- task: Bash@3
inputs:
targetType: 'inline'
script: 'ls'
workingDirectory: '$(Build.BinariesDirectory)'
- task: CopyFiles@2
inputs:
Contents: '$(Build.BinariesDirectory)/*.aab'
TargetFolder: '$(Build.ArtifactStagingDirectory)'
OverWrite: true
flattenFolders: true
I have an Azure DevOps pipeline that builds an Android bundle. After the task that builds my app, there are two tasks as below. Log of the first one shows that $(Build.BinariesDirectory)
folder contains MyApp.aab
and MyApp-Signed.aab
. But the second task doesn't find anything and copies 0 files.
Any ideas why it is happening? I've tried everything including hard-coding /Users/runner/work/1/b/MyApp-Signed.aab
which is the actual path from log of previous tasks.
- task: Bash@3
inputs:
targetType: 'inline'
script: 'ls'
workingDirectory: '$(Build.BinariesDirectory)'
- task: CopyFiles@2
inputs:
Contents: '$(Build.BinariesDirectory)/*.aab'
TargetFolder: '$(Build.ArtifactStagingDirectory)'
OverWrite: true
flattenFolders: true
Share
Improve this question
asked Nov 17, 2024 at 6:02
Delphi.BoyDelphi.Boy
1,2264 gold badges20 silver badges41 bronze badges
1 Answer
Reset to default 0I found the solution. The missing piece was SourceFolder
. By default it is set to $(Build.SourcesDirectory)
so it couldn't find the .aab
files. The working version is:
- task: CopyFiles@2
inputs:
Contents: '*.aab'
SourceFolder: '$(Build.BinariesDirectory)'
TargetFolder: '$(Build.ArtifactStagingDirectory)'
OverWrite: true
flattenFolders: true
本文标签: azure devopsCopyFiles Task Doesn39t Find Files in BinariesDirectoryStack Overflow
版权声明:本文标题:azure devops - CopyFiles Task Doesn't Find Files in BinariesDirectory - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745637081a2667625.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论