1
- # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
2
-
3
- trigger : none # disable triggers based on commits.
4
- pr : none # disable as a PR gate.
1
+ # This Yaml Document has been converted by ESAI Yaml Pipeline Conversion Tool.
2
+ # Please make sure to check all the converted content, it is your team's responsibility to make sure that the pipeline is still valid and functions as expected.
3
+ # This pipeline will be extended to the OneESPT template
4
+ # If you are not using the E+D shared hosted pool with windows-2022, replace the pool section with your hosted pool, os, and image name. If you are using a Linux image, you must specify an additional windows image for SDL: https://eng.ms/docs/cloud-ai-platform/devdiv/one-engineering-system-1es/1es-docs/1es-pipeline-templates/features/sdlanalysis/overview#how-to-specify-a-windows-pool-for-the-sdl-source-analysis-stage
5
+ # The Task 'PublishBuildArtifacts@1' has been converted to an output named 'Publish Examples to be reviewed as artifact' in the templateContext section.
6
+ trigger : none
7
+ pr : none
5
8
name : ' PowerShellExamplesUpdateV2 Check'
6
9
schedules :
7
- - cron : " 0 3 * * FRI" # every Friday at 3AM UTC (off hours for Redmond, Nairobi and Montréal)
8
- displayName : ' PowerShellExamplesUpdateV2'
9
- branches :
10
- include :
11
- - dev
12
- always : true
10
+ - cron : " 0 3 * * FRI"
11
+ displayName : ' PowerShellExamplesUpdateV2'
12
+ branches :
13
+ include :
14
+ - dev
15
+ always : true
13
16
parameters :
14
17
- name : PipelineTimeout
15
18
displayName : PipelineTimeout
@@ -18,77 +21,85 @@ parameters:
18
21
- name : BuildAgent
19
22
displayName : Build Agent
20
23
default : 1es-windows-ps-compute
21
-
22
24
resources :
23
- repositories :
24
- - repository : msgraph-sdk-powershell
25
- type : github
26
- endpoint : MicrosoftDocs
27
- name : microsoftgraph/msgraph-sdk-powershell
28
- ref : dev
29
-
30
- jobs :
31
- - job : PowerShellExamplesUpdateV2
32
- pool :
33
- name : ${{ parameters.BuildAgent }}
34
- timeoutInMinutes : ${{ parameters.PipelineTimeout }}
35
- steps :
36
- - template : ./common-templates/install-sdk.yml
37
- - task : PowerShell@2
38
- name : " ComputeBranch"
39
- displayName : " Compute weekly examples update branch name"
40
- inputs :
41
- targetType : inline
42
- script : |
43
- $branch = "{0}/{1}" -f "WeeklyExamplesUpdate", (Get-Date -Format yyyyMMddHHmm)
44
- Write-Host "Compute branch: $branch"
45
- Write-Host "##vso[task.setvariable variable=WeeklyExamplesBranch;isOutput=true]$branch"
46
-
47
- - task : Bash@3
48
- displayName : " Create weekly examples branch"
49
- inputs :
50
- targetType : inline
51
- script : |
52
- git status
53
- git branch $(ComputeBranch.WeeklyExamplesBranch)
54
- git checkout $(ComputeBranch.WeeklyExamplesBranch)
55
- git status
56
-
57
- - task : PowerShell@2
58
- displayName : ' Import Examples From API reference - V2'
59
- continueOnError : false
60
- inputs :
61
- targetType : ' filePath'
62
- pwsh : true
63
- filePath : tools\ImportExamples.ps1
64
-
65
- - task : PublishBuildArtifacts@1
66
- displayName : ' Publish Examples to be reviewed as artifact'
67
- inputs :
68
- PathtoPublish : ' examplesreport'
69
- ArtifactName : ' ExamplesToBeReviewed'
70
- publishLocation : ' Container'
71
- # StoreAsTar: true
72
-
73
- - task : PowerShell@2
74
- displayName : Pushing to github
75
- env :
76
- GITHUB_TOKEN : $(GITHUB_TOKEN)
77
- inputs :
78
- targetType : inline
79
- pwsh : true
80
- script : |
81
- git config --global user.email "[email protected] "
82
- git config --global user.name "Microsoft Graph DevX Tooling"
83
- git status
84
- git add .
85
- git commit -m "Updating examples"
86
- git push --set-upstream https://$(GITHUB_TOKEN)@github.com/microsoftgraph/msgraph-sdk-powershell.git $(ComputeBranch.WeeklyExamplesBranch)
87
- git status
88
-
89
- - template : ./common-templates/create-pr.yml
90
- parameters :
91
- BaseBranch : " dev"
92
- TargetBranch : $(ComputeBranch.WeeklyExamplesBranch)
93
- Title : " [v2] Examples Update"
94
- Body : " This pull request was automatically created by Azure Pipelines. **Important** Check for unexpected deletions or changes in this PR."
25
+ repositories :
26
+ - repository : msgraph-sdk-powershell
27
+ type : github
28
+ endpoint : MicrosoftDocs
29
+ name : microsoftgraph/msgraph-sdk-powershell
30
+ ref : dev
31
+ - repository : 1ESPipelineTemplates
32
+ type : git
33
+ name : 1ESPipelineTemplates/1ESPipelineTemplates
34
+ ref : refs/tags/release
35
+ extends :
36
+ template : v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates
37
+ parameters :
38
+ pool : $(BuildAgent)
39
+ sdl :
40
+ credscan :
41
+ suppressionsFile : $(Build.SourcesDirectory)/.azure-pipelines/config/credscan/credscan-suppressions.json
42
+ policheck :
43
+ exclusionFile : $(Build.SourcesDirectory)/.azure-pipelines/config/policheck/policheck-exclusions.xml
44
+ customBuildTags :
45
+ - ES365AIMigrationTooling
46
+ stages :
47
+ - stage : stage
48
+ jobs :
49
+ - job : PowerShellExamplesUpdateV2
50
+ timeoutInMinutes : ${{ parameters.PipelineTimeout }}
51
+ templateContext :
52
+ outputs :
53
+ - output : pipelineArtifact
54
+ displayName : ' Publish Examples to be reviewed as artifact'
55
+ targetPath : ' examplesreport'
56
+ artifactName : ' ExamplesToBeReviewed'
57
+ publishLocation : ' Container'
58
+ steps :
59
+ - template : .azure-pipelines/common-templates/install-sdk.yml@self
60
+ - task : PowerShell@2
61
+ name : " ComputeBranch"
62
+ displayName : " Compute weekly examples update branch name"
63
+ inputs :
64
+ targetType : inline
65
+ script : |
66
+ $branch = "{0}/{1}" -f "WeeklyExamplesUpdate", (Get-Date -Format yyyyMMddHHmm)
67
+ Write-Host "Compute branch: $branch"
68
+ Write-Host "##vso[task.setvariable variable=WeeklyExamplesBranch;isOutput=true]$branch"
69
+ - task : Bash@3
70
+ displayName : " Create weekly examples branch"
71
+ inputs :
72
+ targetType : inline
73
+ script : |
74
+ git status
75
+ git branch $(ComputeBranch.WeeklyExamplesBranch)
76
+ git checkout $(ComputeBranch.WeeklyExamplesBranch)
77
+ git status
78
+ - task : PowerShell@2
79
+ displayName : ' Import Examples From API reference - V2'
80
+ continueOnError : false
81
+ inputs :
82
+ targetType : ' filePath'
83
+ pwsh : true
84
+ filePath : tools\ImportExamples.ps1
85
+ - task : PowerShell@2
86
+ displayName : Pushing to github
87
+ env :
88
+ GITHUB_TOKEN : $(GITHUB_TOKEN)
89
+ inputs :
90
+ targetType : inline
91
+ pwsh : true
92
+ script : |
93
+ git config --global user.email "[email protected] "
94
+ git config --global user.name "Microsoft Graph DevX Tooling"
95
+ git status
96
+ git add .
97
+ git commit -m "Updating examples"
98
+ git push --set-upstream https://$(GITHUB_TOKEN)@github.com/microsoftgraph/msgraph-sdk-powershell.git $(ComputeBranch.WeeklyExamplesBranch)
99
+ git status
100
+ - template : .azure-pipelines/common-templates/create-pr.yml@self
101
+ parameters :
102
+ BaseBranch : " dev"
103
+ TargetBranch : $(ComputeBranch.WeeklyExamplesBranch)
104
+ Title : " [v2] Examples Update"
105
+ Body : " This pull request was automatically created by Azure Pipelines. **Important** Check for unexpected deletions or changes in this PR."
0 commit comments