-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathazure-pipelines-ubuntu.yml
57 lines (49 loc) · 1.38 KB
/
azure-pipelines-ubuntu.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
trigger:
branches:
include:
- develop
- main
parameters:
- name: OrganizationName
type: string
default: myorg
values:
- myorg
- name: YamlFilePaths
type: object
default:
- ./TestFiles/test.yml
- ./azure-pipelines.yml
pool:
vmImage: 'ubuntu-latest'
jobs:
- job: BuildArtifact
steps:
- task: CopyFiles@2
inputs:
sourceFolder: $(Build.SourcesDirectory)
targetFolder: $(Build.ArtifactStagingDirectory)
- task: PublishBuildArtifacts@1
inputs:
pathToPublish: $(Build.ArtifactStagingDirectory)
artifactName: drop
- job: Validate_Azure_Pipeline
displayName: "Validate Azure Pipeline YAML"
dependsOn: BuildArtifact
variables:
- group: MyVariableGroup
steps:
- task: DownloadPipelineArtifact@2
inputs:
artifact: drop
- ${{ each YamlFilePath in parameters.YamlFilePaths }}:
- task: PowerShell@2
inputs:
targetType: filePath
filePath: ./Test-YamlADOPipeline.ps1
arguments: >
-OrganizationName ${{parameters.OrganizationName}}
-ProjectName $(System.TeamProject)
-PipelineId $(System.DefinitionId)
-YamlFilePath ${{YamlFilePath}}
-PersonalAccessToken $(PAT)