Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 17 additions & 8 deletions .azure-pipelines/weekly-examples-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

trigger: none # disable triggers based on commits.
pr: none # disable as a PR gate.
name: 'PowerShellExamplesUpdate Check'
name: 'PowerShellExamplesUpdateV1 Check'
schedules:
- cron: "0 3 * * FRI" # every Friday at 3AM UTC (off hours for Redmond, Nairobi and Montréal)
displayName: 'PowerShellExamplesUpdate Check'
displayName: 'PowerShellExamplesUpdateV1'
branches:
include:
- dev
Expand All @@ -28,12 +28,11 @@ resources:
ref: dev

jobs:
- job: PowerShellExamplesUpdate
- job: PowerShellExamplesUpdateV1
pool:
name: ${{ parameters.BuildAgent }}
timeoutInMinutes: ${{ parameters.PipelineTimeout }}
steps:
- template: ./common-templates/update-sdkversion.yml

- task: PowerShell@2
name: "ComputeBranch"
Expand All @@ -56,13 +55,21 @@ jobs:
git status

- task: PowerShell@2
displayName: 'Update Examples From Graph Reference'
displayName: 'Update Examples From API reference - V1'
continueOnError: false
inputs:
targetType: 'filePath'
pwsh: true
filePath: tools\ExamplesGenerator.ps1

- task: PublishBuildArtifacts@1
displayName: 'Publish Examples to be reviewed as artifact'
inputs:
PathtoPublish: 'examplesreport'
ArtifactName: 'ExamplesToBeReviewed'
publishLocation: 'Container'
# StoreAsTar: true

- task: PowerShell@2
displayName: Pushing to github
env:
Expand All @@ -71,15 +78,17 @@ jobs:
targetType: inline
pwsh: true
script: |
git config --global user.email "GraphTooling@service.microsoft.com"
git config --global user.name "Microsoft Graph DevX Tooling"
git status
git add .
git commit -m "Updating examples"
git push --set-upstream origin $(ComputeBranch.WeeklyExamplesBranch)
git commit -m "Updating v1 examples"
git push --set-upstream https://$(GITHUB_TOKEN)@github.com/microsoftgraph/msgraph-sdk-powershell.git $(ComputeBranch.WeeklyExamplesBranch)
git status

- template: ./common-templates/create-pr.yml
parameters:
BaseBranch: "dev"
TargetBranch: $(ComputeBranch.WeeklyExamplesBranch)
Title: "[v1] Examples Update"
Body: "This pull request was automatically created by Azure Pipelines. **Important** Check for unexpected deletions or changes in this PR."
Body: "This pull request was automatically created by Azure Pipelines. **Important** Check for unexpected deletions or changes in this PR."
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -358,4 +358,7 @@ MigrationBackup/
.vscode/

#Custom Environment Files
localenv.json
localenv.json

#Wrong Examples report Folder
examplesreport/
Loading