Azure管道:DownloadBuildArtifacts @ 0任务itemPattern,无法下载2个具有不同文件后缀和名称模式的文件 [英] Azure pipeline : DownloadBuildArtifacts@0 task itemPattern , can't download 2 files with different file suffixs and name paternes

查看:89
本文介绍了Azure管道:DownloadBuildArtifacts @ 0任务itemPattern,无法下载2个具有不同文件后缀和名称模式的文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用DownloadBuildArtifacts @ 0,我喜欢下载所有* .ipa文件以及manifest.plist文件 .编写时: itemPattern:'**/*.ipa 它下载了我的ipa文件但是当我这样做时:

im using DownloadBuildArtifacts@0 and i like to download all the *.ipa files and also the manifest.plist file . when writing : itemPattern: '**/*.ipa it downloading me the ipa file but when i do :

- job: copy_back_files_to_self_hosted_connect
  dependsOn: mac_agent 
  timeoutInMinutes: 10
  pool: Default
  steps:
    - task: DownloadBuildArtifacts@0
      inputs:
        buildType: 'current'
        downloadType: 'single'
        artifactName: 'Artifacts'
        itemPattern: '**/*.ipa|manifest.plist'
        downloadPath: '$(System.ArtifactsDirectory)'
    - task: CopyFiles@2
      inputs:
        SourceFolder: '$(System.ArtifactsDirectory)'
        Contents: '**/*.ipa|manifest.plist'
        TargetFolder: '$(Agent.HomeDirectory)/../${{parameters.FolderCompile}}'

它下载了我所有的文件,不是ipa,也不是manifest.plist
始终下载正确的模式是什么?

it downloaded me none of the files not ipa and not the manifest.plist
what is the right pattern to download both all the time ?

推荐答案

来自先前的票证....

您需要按照以下格式定义任务:

You need define your task as below format:

- task: DownloadBuildArtifacts@0
  displayName: 'Download Build Artifacts'
  inputs:
    buildType: 'current'
    downloadType: 'single'
    artifactName: Artifacts
    itemPattern: |
     **/*.ipa
     **/manifest.plist

- task: CopyFiles@2
  displayName: 'Copy Files'
  inputs:
    SourceFolder: '$(System.ArtifactsDirectory)'
    Contents: |
     **/*.ipa
     **/manifest.plist
    TargetFolder: '$(Agent.HomeDirectory)/../${{parameters.FolderCompile}}'

由于 .ipa manifest.plist 都来自构建工件:工件,所以它们都在工件文件夹.因此,也请不要忘记使用 **/manifest.plist 来检索所需的文件.

Since .ipa and manifest.plist are all come from the build artifact: Artifacts, both of them are all under the Artifacts folder. So, please also do not forget to use **/manifest.plist to retrieve your needed files.

这篇关于Azure管道:DownloadBuildArtifacts @ 0任务itemPattern,无法下载2个具有不同文件后缀和名称模式的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆