22
33trigger : none # disable triggers based on commits.
44pr : none # disable as a PR gate.
5- name : ' PowerShellExamplesUpdate Check'
5+ name : ' PowerShellExamplesUpdateV1 Check'
66schedules :
77 - cron : " 0 3 * * FRI" # every Friday at 3AM UTC (off hours for Redmond, Nairobi and Montréal)
8- displayName : ' PowerShellExamplesUpdate Check '
8+ displayName : ' PowerShellExamplesUpdateV1 '
99 branches :
1010 include :
1111 - dev
@@ -28,12 +28,11 @@ resources:
2828 ref : dev
2929
3030jobs :
31- - job : PowerShellExamplesUpdate
31+ - job : PowerShellExamplesUpdateV1
3232 pool :
3333 name : ${{ parameters.BuildAgent }}
3434 timeoutInMinutes : ${{ parameters.PipelineTimeout }}
3535 steps :
36- - template : ./common-templates/update-sdkversion.yml
3736
3837 - task : PowerShell@2
3938 name : " ComputeBranch"
@@ -56,13 +55,21 @@ jobs:
5655 git status
5756
5857 - task : PowerShell@2
59- displayName : ' Update Examples From Graph Reference '
58+ displayName : ' Update Examples From API reference - V1 '
6059 continueOnError : false
6160 inputs :
6261 targetType : ' filePath'
6362 pwsh : true
6463 filePath : tools\ExamplesGenerator.ps1
6564
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+
6673 - task : PowerShell@2
6774 displayName : Pushing to github
6875 env :
@@ -71,15 +78,17 @@ jobs:
7178 targetType : inline
7279 pwsh : true
7380 script : |
81+ git config --global user.email "[email protected] " 82+ git config --global user.name "Microsoft Graph DevX Tooling"
7483 git status
7584 git add .
76- git commit -m "Updating examples"
77- git push --set-upstream origin $(ComputeBranch.WeeklyExamplesBranch)
85+ git commit -m "Updating v1 examples"
86+ git push --set-upstream https://$(GITHUB_TOKEN)@github.com/microsoftgraph/msgraph-sdk-powershell.git $(ComputeBranch.WeeklyExamplesBranch)
7887 git status
7988
8089 - template : ./common-templates/create-pr.yml
8190 parameters :
8291 BaseBranch : " dev"
8392 TargetBranch : $(ComputeBranch.WeeklyExamplesBranch)
8493 Title : " [v1] Examples Update"
85- Body : " This pull request was automatically created by Azure Pipelines. **Important** Check for unexpected deletions or changes in this PR."
94+ Body : " This pull request was automatically created by Azure Pipelines. **Important** Check for unexpected deletions or changes in this PR."
0 commit comments