-
Notifications
You must be signed in to change notification settings - Fork 5
/
azure-pipelines.yml
34 lines (34 loc) · 1.26 KB
/
azure-pipelines.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
jobs:
- job: Checkout
steps:
- checkout: git://your_project/your_repo@featurebranch # e.g. git://MyProject/MyRepo.Generic (git://project/repository)
- 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: Checkout
variables:
- group: MyVariableGroup
steps:
- task: DownloadPipelineArtifact@2
inputs:
artifact: drop
- powershell: |
[string] $collectionUri = $(System.CollectionUri)
echo "##vso[task.setvariable variable=OrganizationName] $($collectionUri -Split '/')[-2]"
- task: PowerShell@2
inputs:
targetType: filePath
filePath: ./Test-YamlADOPipeline.ps1
arguments: >
-OrganizationName $(OrganizationName)
-ProjectName $(System.TeamProject)
-PipelineId $(System.DefinitionId)
-YamlFilePath ./TestFiles/test.yml
-PersonalAccessToken $(PAT)