File tree Expand file tree Collapse file tree 1 file changed +69
-0
lines changed
Expand file tree Collapse file tree 1 file changed +69
-0
lines changed Original file line number Diff line number Diff line change 1+ pr : none
2+ trigger : none
3+
4+ schedules :
5+ - cron : " 0 6 * * 5"
6+ branches :
7+ include :
8+ - master
9+ displayName : Weekly report of onboarded RPs
10+
11+ jobs :
12+ - job : Generate
13+ timeoutInMinutes : 180
14+
15+ pool :
16+ vmImage : ' ubuntu-latest'
17+
18+ steps :
19+ - checkout : self
20+ clean : true
21+
22+ - task : DownloadSecureFile@1
23+ name : schemasDeployKey
24+ inputs :
25+ secureFile : schemas_rsa
26+ displayName : " Download GitHub Deploy Key"
27+
28+ - task : NodeTool@0
29+ inputs :
30+ versionSpec : ' 14.x'
31+
32+ - script : |
33+ set -Eeuxo pipefail
34+ mkdir ~/.ssh && mv $(schemasDeployKey.secureFilePath) ~/.ssh/schemas_rsa
35+ chmod 700 ~/.ssh
36+ chmod 600 ~/.ssh/schemas_rsa
37+ git config user.name "Autogenerator Pipeline"
38+ git config user.email "azure-resource-manager-schemas@noreply.github.com"
39+ git config core.sshCommand "ssh -i ~/.ssh/schemas_rsa -F /dev/null"
40+ git remote set-url origin git@github.com:Azure/azure-resource-manager-schemas.git
41+ ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts
42+ git fetch
43+ displayName: Configure git
44+
45+ - script : |
46+ set -Eeuxo pipefail
47+ git checkout $(Build.SourceBranchName)
48+ displayName: Checkout repo
49+
50+ - script : |
51+ set -Eeuxo pipefail
52+ cd generator
53+ npm install
54+ displayName: 'Install packages'
55+
56+ - script : |
57+ set -Eeuxo pipefail
58+ cd generator
59+ npm run generate-onboarded-report
60+ displayName: 'Generate report'
61+
62+ - script : |
63+ set -Eeuxo pipefail
64+ git add --all onboarded-report
65+ if ! git diff-index --quiet HEAD --; then
66+ git commit -m "Generated report"
67+ git push origin $(Build.SourceBranchName)
68+ fi
69+ displayName: Commit report
You can’t perform that action at this time.
0 commit comments