0

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

- 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
什么是一直下载的正确模式?

4

2 回答 2

2

来自你以前的票......

您需要将您的任务定义为以下格式:

- 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}}'

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

于 2020-09-23T08:27:45.523 回答
1

你可以这样做:

- task: DownloadBuildArtifacts@0
  inputs:
    buildType: 'current'
    downloadType: 'single'
    artifactName: 'Artifacts'
    itemPattern: |
      **/*.ipa
      manifest.plist
    downloadPath: '$(System.ArtifactsDirectory)'
于 2020-09-23T07:51:07.237 回答