简体   繁体   English

我们能否在一个 azure-pipeline yaml 文件中为一个 repo 设置两个 Build.ArtifactStagingDirectory 位置以发布两个不同的 debian 安装程序

[英]Can we have two Build.ArtifactStagingDirectory location for one repo in one azure-pipeline yaml file to publish two different debian installer

I want to create two debian installers ( packageName1 & packageName2 ) in same repo of azure-pipeline with same feed .我想在具有相同feed的 azure-pipeline 的相同 repo 中创建两个 debian 安装程序( packageName1packageName2 )。 Below is the task of my azure-pipeline.yaml file下面是我的 azure-pipeline.yaml 文件的任务

          - task: PublishBuildArtifacts@1
            displayName: 'Publish artifacts'
            inputs:
              pathtoPublish: '$(Build.ArtifactStagingDirectory)'
              artifactName: 'Installer package and anti-virus scan results'
        
          - task: UniversalPackages@0
            displayName: Publish univeral package-1
            inputs:
              command: publish
              publishDirectory: '$(Build.ArtifactStagingDirectory)'
              vstsFeedPublish: '$(packageFeed)'
              vstsFeedPackagePublish: '$(packageName1)'
              packagePublishDescription: ''
              versionOption: custom
              versionPublish: $(packageVersion1)
            condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))

          - task: UniversalPackages@0
            displayName: Publish univeral package-2
            inputs:
              command: publish
              publishDirectory: '$(Build.ArtifactStagingDirectory)'
              vstsFeedPublish: '$(packageFeed)'
              vstsFeedPackagePublish: '$(packageName2)'
              packagePublishDescription: ''
              versionOption: custom
              versionPublish: $(packageVersion2)
            condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))

But when I am downloading artifact for one of the package installer through az command:但是当我通过 az 命令为 package 安装程序之一下载工件时:

az artifacts universal download \
  --organization "https://myplatform.visualstudio.com/" \
  --feed "my-feed" \
  --name $packageName1 \
  --version $packageVersion1 \
  --path .

the packages and files of packageName2 are also getting downloaded. packageName2的包和文件也正在下载。 I feel that's because I am using same Build.ArtifactStagingDirectory location to store/publish the artifacts for both packages.我觉得那是因为我使用相同的Build.ArtifactStagingDirectory位置来存储/发布两个包的工件。 Can I use different location for both installer packages?我可以为两个安装程序包使用不同的位置吗?

You can create a subfolder under Build.ArtifactStagingDirectory for each project and publish each artifact separately.您可以在Build.ArtifactStagingDirectory下为每个项目创建一个子文件夹并单独发布每个工件。

There aren't 'multiple artifact directories', but you can create as many folders under the directory as you want and then pass the subfolder into the build and publish tasks.没有“多个工件目录”,但您可以根据需要在目录下创建任意多个文件夹,然后将子文件夹传递到构建和发布任务中。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 azure static web 应用程序,如何从同一个 git 回购中构建两个不同的 web 应用程序(一个产品和一个非产品)? - azure static web app, how to have two different web apps (one prod and one non prod) building from the same git repo? 将两个阶段分叉回一个 azure 管道 - Forking two stages back into one azure pipeline 由于 ruamel.yaml,安装 azure-pipeline 时出现问题 - Problem Installing azure-pipeline due to ruamel.yaml 我可以在一个 EC2 实例中挂载两个不同的文件夹吗? - Can I mount two different folders in one EC2 instance? Azure DevOps 管道 yaml 文件 Docker 标签 - Azure DevOps Pipeline yaml file Docker Tag 在创建 YAML Pipeline 时,我们可以使用库变量吗? - While creating a YAML Pipeline, can we use library variables? 我们如何在不同的 Azure 文件共享之间实现跨区域同步? - How can we have sync between different Azure File Shares across regions? Azure 管道无法构建文件范围的项目 - Azure Pipeline cannot build File scoped project 是否可以在一个 Azure function 应用程序中运行两个函数(一个运行 FastAPI - ASGI,一个运行 Flask - WSGI)? - Is it possible to run two functions (one running FastAPI - ASGI, and one running Flask - WSGI), in one Azure function App? Azure Devops:如何配置我的管道脚本以触发具有不同 repo 的另一个管道? - Azure Devops: how configure my pipeline script to trigger another pipeline with different repo?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM