Skip to content

Commit 02f2726

Browse files
committed
new pipeline
1 parent 4b8b0cf commit 02f2726

File tree

1 file changed

+69
-0
lines changed

1 file changed

+69
-0
lines changed
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
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

0 commit comments

Comments
 (0)