1- # Starter pipeline
2- # Start with a minimal pipeline that you can customize to build and deploy your code.
3- # Add steps that build, run tests, deploy, and more:
4- # https://aka.ms/yaml
1+ # Copyright (c) Microsoft Corporation. All rights reserved.
2+ # Licensed under the MIT License.
3+
4+ # Microsoft Graph Explorer API - Sample Queries and Permissions
5+ # This pipeline publishes sample queries and permissions files to Azure Blob Storage.
56
67name : $(BuildDefinitionName)_$(SourceBranchName)_$(Date:yyyyMMdd)$(Rev:.r)
8+
79trigger :
810 branches :
911 include :
1012 - master
1113 - dev
14+ paths :
15+ include :
16+ - ' samples-queries/**'
17+ - ' permissions/**'
18+
1219pr : none
20+
1321resources :
1422 repositories :
1523 - repository : 1ESPipelineTemplates
@@ -25,6 +33,7 @@ extends:
2533 os : windows
2634 customBuildTags :
2735 - ES365AIMigrationTooling
36+
2837 stages :
2938 - stage : CopyArtifactFiles
3039 jobs :
@@ -42,29 +51,30 @@ extends:
4251 Contents : |
4352 **\permissions\**
4453 **\sample-queries\**
45- TargetFolder : ' $(build.artifactstagingdirectory )'
54+ TargetFolder : ' $(Build.ArtifactStagingDirectory )'
4655
4756 - stage : DeployStaging
48- condition : and(contains(variables['build.sourceBranch '], 'refs/heads/ dev'), succeeded())
57+ condition : and(contains(variables['Build.SourceBranchName '], 'dev'), succeeded())
4958 dependsOn : CopyArtifactFiles
5059 jobs :
51- - deployment : staging
60+ - deployment : staging
61+ displayName : ' Deploy to Staging'
62+ environment : graphexplorerapi-staging
5263 templateContext :
5364 type : releaseJob
5465 isProduction : false
5566 inputs :
5667 - input : pipelineArtifact
5768 artifactName : drop
5869 targetPath : $(Build.ArtifactStagingDirectory)
59- environment : graphexplorerapi-staging
6070 strategy :
6171 runOnce :
6272 deploy :
6373 steps :
6474 - task : AzureFileCopy@6
6575 displayName : ' Upload Sample Query files'
6676 inputs :
67- SourcePath : ' $(build.artifactstagingdirectory)/drop /sample-queries/*'
77+ SourcePath : ' $(Build.ArtifactStagingDirectory) /sample-queries/*'
6878 azureSubscription : ' DevX PPE Content Managed Identity Connection'
6979 Destination : AzureBlob
7080 storage : devxapistppeeastus
@@ -73,30 +83,35 @@ extends:
7383 - task : AzureFileCopy@6
7484 displayName : ' Upload Permission Description Files '
7585 inputs :
76- SourcePath : ' $(build.artifactstagingdirectory)/drop /permissions/*'
86+ SourcePath : ' $(Build.ArtifactStagingDirectory) /permissions/*'
7787 azureSubscription : ' DevX PPE Content Managed Identity Connection'
7888 Destination : AzureBlob
7989 storage : devxapistppeeastus
8090 ContainerName : ' staging-permissions'
8191
8292
8393 - stage : DeployProduction
84- condition : and(contains(variables['build.sourceBranch '], 'refs/heads/ master'), succeeded())
94+ condition : and(contains(variables['Build.SourceBranchName '], 'master'), succeeded())
8595 dependsOn : CopyArtifactFiles
8696 jobs :
8797 - deployment : production
98+ displayName : ' Deploy to Production'
99+ environment : graphexplorerapi-production
88100 templateContext :
89101 type : releaseJob
90102 isProduction : true
91- environment : graphexplorerapi-production
103+ inputs :
104+ - input : pipelineArtifact
105+ artifactName : drop
106+ targetPath : $(Build.ArtifactStagingDirectory)
92107 strategy :
93108 runOnce :
94109 deploy :
95110 steps :
96111 - task : AzureFileCopy@6
97112 displayName : ' Upload Sample Query files'
98113 inputs :
99- SourcePath : ' $(build.artifactstagingdirectory)/drop /sample-queries/*'
114+ SourcePath : ' $(Build.ArtifactStagingDirectory) /sample-queries/*'
100115 azureSubscription : ' DevX Prod Content Managed Identity Connection'
101116 Destination : AzureBlob
102117 storage : devxapistprodeastus
@@ -105,7 +120,7 @@ extends:
105120 - task : AzureFileCopy@6
106121 displayName : ' Upload Permission Description Files '
107122 inputs :
108- SourcePath : ' $(build.artifactstagingdirectory)/drop /permissions/*'
123+ SourcePath : ' $(Build.ArtifactStagingDirectory) /permissions/*'
109124 azureSubscription : ' DevX Prod Content Managed Identity Connection'
110125 Destination : AzureBlob
111126 storage : devxapistprodeastus
0 commit comments