English 中文(简体)
能否通过使用 a-管道中文档配对模式的档案?
原标题:Can I loop through files using file matching patterns in azure-pipeline.yml?

我知道,我可以在亚穆勒支空地:

steps:
- ${{ each var in split(variables.vars,  ,  ) }}:
  - script: |
      echo ${{ var}}
    displayName: Printing ${{ var }}

http://learn.microsoft.com/en-us/azure/devops/benks/file-matching-patterns?view=azure-devops”rel=“nofollow noreferer”https://learn.microsoft.com/en-us/azure/devops/user/tas/file-matching-pats?view=azure-devops/

我如何将这些内容结合起来,以便我能够操作<代码>dotnet Building,为每个<代码>**/*csproj文档打上<>>。

问题回答

您不能使用一种变量,而这种变量只在操作时间提供,而是可以具体指明一个在汇编时间可查的物体。

# pipeline.yml
trigger: none

steps:
- template: build-projects.yml
  parameters:
    projects:
    - src/project1
    - src/project2
    - scr/project3
# build-projects.yml
parameters:
- name: projects
  type: object

steps:
- ${{ each project in projects }}:
  - task: DotNetCoreCLI@2
    displayName:  Build ${{ project }} 
    inputs:
      command:  build 
      projects: **/*.csproj
      workingDirectory:  $(System.DefaultWorkingDirectory)/${{ project }} 




相关问题
Team foundation server in the cloud?

We have been using TFS on our own server for a while. We would like to move it in the cloud. Is there any good hosted service? Note: we would like to import all our source and projects

热门标签