azure-devops - azure pipeline TFVC check if a specific Build pipeline artifacts exist for a specific Branch name and specific tag
问题描述
I am using Azure DevOps services and TFVC as my code repository.
I have a build that has a task type "Download build artifacts" (Download files that were saved as artifacts of a completed build).
What i need to check is if there are saved artifacts of a specific completed build for a specific Branch name and tag? because if there isn't the task will fail and i want to fall to a default artifact.
Thanks
解决方案
只需像这样定义此任务:
steps:
- task: DownloadBuildArtifacts@0
displayName: 'Download Build Artifacts'
inputs:
buildType: specific
project: '{project name}'
pipeline: {pipeline name}
buildVersionToDownload: latestFromBranch
branchName: '{Branch name, e.g. $/TFVC}'
tags: {the tag you want to filtered}
downloadType: specific
downloadPath: '$(Build.ArtifactStagingDirectory)'
在此任务定义中,最关键的参数是 ,branchname
因为您使用的是TFVC 存储库。
推荐阅读
- puppeteer - 使用 Apify Puppeteer Scraper 访问和循环外部数据源
- java - 为什么我从java中的除法中得到不好的结果
- android - 无法在 Android Studio 中生成 SIGNEDD APK
- angular - 如何在不将局部变量声明为代理的情况下从 Angular HTML 模板引用导入的常量值?
- data-structures - Red-Black Tree 的每个实现对于相同的输入是否具有相同数量的红色节点?
- jquery - 数据表导出到 csv 如何在字段有逗号时将 divde 修复为两个表
- javascript - 如何在路线角度8之间共享数据
- sql - Oracle 将一张表的数据与另一张表同步
- c++ - 如何检查我打开的文件是否用于在 c 中读取或写入
- c# - 如何在 ASP.NET Core 3.1 MVC 中挂钩视图创建并更改模型和视图名称?