Conan 在 Azure Pipelines 中添加远程任务:添加两个远程设备时失败

Conan Add remote Task in Azure Pipelines : Failing when adding two remotes

我有一个 Azure DevOps 管道,我要在其中添加两个遥控器。当对 Azure Pipelines 和包含的柯南上传任务使用 JFrog Extension 时,该任务将不使用配置的远程,但始终使用最后添加的远程。有什么解决办法或者我错过了什么吗?

我希望下面对设置的描述足够好:

服务连接/回购:

售前回购

与技术用户的服务连接以添加、更新、删除预发布的包(通常是基于分支的发布)

 - task: ArtifactoryConan@1
   displayName: "Add conan develop remote"
   inputs:
     conanCommand: "Add Remote"
     remoteName: "develop"
     artifactoryService: "Artifactory_Develop"
     conanRepo: "develop"
     purgeExistingRemotes: false
     conanUserHome: "$(Pipeline.Workspace)"

发布回购

与受限技术用户的服务连接只能添加到发布存储库,不能更新或删除

 - task: ArtifactoryConan@1
   displayName: "Add conan release remote"
   inputs:
     conanCommand: "Add Remote"
     remoteName: "release"
     artifactoryService: "Artifactory_Release"
     conanRepo: "release"
     purgeExistingRemotes: false
     conanUserHome: "$(Pipeline.Workspace)"

上传任务

基于分支,我想使用专用服务连接将我的柯南工件上传并发布到专用存储库:

- task: ArtifactoryConan@1
        displayName: "Conan upload develop repo"
        condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/develop'), ne(variables['Build.Reason'], 'PullRequest'))
        inputs:
          conanCommand: "Upload"
          remoteName: "develop"
          patternOrReference: "$(conan_package_name)/$(conan_package_version)@$(project_name)/$(conan_channel)"
          extraArguments: "--all -c"
          buildName: "$(Build.DefinitionName)"
          buildNumber: "$(Build.BuildNumber)"
          conanUserHome: "$(Pipeline.Workspace)"

结果

柯南上传任务似乎一直在使用上次添加的遥控器?

2020-06-02T10:43:03.3661883Z ##[section]Starting: Conan upload develop repo
2020-06-02T10:43:03.3669805Z ==============================================================================
2020-06-02T10:43:03.3670263Z Task         : Artifactory Conan
2020-06-02T10:43:03.3670628Z Description  : This task runs a Conan command.
2020-06-02T10:43:03.3670974Z Version      : 1.9.4
2020-06-02T10:43:03.3671273Z Author       : JFrog
2020-06-02T10:43:03.3671597Z Help         : Run Conan command.
2020-06-02T10:43:03.3671999Z ==============================================================================
2020-06-02T10:43:03.8219651Z Running Conan build tool from: /usr/local/bin/conan
2020-06-02T10:43:03.8220128Z Conan User Home: /__w/1
2020-06-02T10:43:03.8245768Z Running Conan command at: /__w/1/s
2020-06-02T10:43:03.8257251Z [command]/usr/local/bin/conan upload --all -c HelloWorld/1.0@Hello/develop
2020-06-02T10:43:04.2091929Z Uploading to remote 'release':
2020-06-02T10:43:04.2165470Z 
2020-06-02T10:43:04.2166636Z Uploading HelloWorld/1.0@Hello/develop to remote 'release'     

在 "extraArguments" 中添加“-r (--remote) 选项后,使用了正确的遥控器:

- task: ArtifactoryConan@1
    displayName: "Conan upload develop repo"
    inputs:
      conanCommand: "Upload"
      remoteName: "MYREMOTE" # this is not working
      patternOrReference: "$(conan_package_name)/$(conan_package_version)@$(project_name)/$(conan_channel)"
      extraArguments: "--all -c -r MYREMOTE" # this is
      buildName: "$(Build.DefinitionName)"
      buildNumber: "$(Build.BuildNumber)"
      conanUserHome: "$(Pipeline.Workspace)"