-
Notifications
You must be signed in to change notification settings - Fork 60
95 lines (90 loc) · 3.03 KB
/
jumpstart.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
name: Full Deployment incl. setup
on: [workflow_dispatch]
jobs:
#rather auxiliary job to avoid hitting storage limits in the GitHub free plan if you store the MTA files
cleanup:
runs-on: ubuntu-latest
steps:
- uses: kolpav/purge-artifacts-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
expire-in: 0days # Setting this to 0 will delete all artifacts
setup:
runs-on: ubuntu-latest
steps:
- name: checkout repository
uses: actions/checkout@v2
- name: Downloads SAPCP CLI
run: .github/workflows/scripts/download_cli
env:
GLOBAL_ACCOUNT: ${{ secrets.GLOBAL_ACCOUNT }}
CF_USERNAME: ${{ secrets.CF_USERNAME }}
CF_PASSWORD: ${{ secrets.CF_PASSWORD }}
- name: Assign Entitlements
run: .github/workflows/scripts/assign_entitlements
env:
GLOBAL_ACCOUNT: ${{ secrets.GLOBAL_ACCOUNT }}
- name: subscribe to apps
run: .github/workflows/scripts/subscribe
- name: create SAP HANA Cloud instance if not existing
run: .github/workflows/scripts/hana_cloud_setup
env:
CF_USERNAME: ${{ secrets.CF_USERNAME }}
CF_ORG: ${{ secrets.CF_ORG }}
CF_PASSWORD: ${{ secrets.CF_PASSWORD }}
CF_SPACE: ${{ secrets.CF_SPACE }}
CF_API: ${{ secrets.CF_API }}
build:
needs: setup
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: 14
- name: Install MTA Build Tool
run: npm install -g mbt
- name: Disable package-lock.json
run: npm config set package-lock false
- name: Build MTA
run: mbt build -p cf --mtar BPVerification.mtar -e trial.mtaext
- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: mta
path: ./mta_archives/BPVerification.mtar
deploy:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download Artifact
uses: actions/download-artifact@v2
with:
name: mta
path: ./
- name: Deploy to Cloud Foundry
uses: guerric-p/cf-cli-action@master
with:
cf_api: ${{ secrets.CF_API }}
cf_username: ${{ secrets.CF_USERNAME }}
cf_password: ${{ secrets.CF_PASSWORD }}
cf_org: ${{ secrets.CF_ORG }}
cf_space: ${{ secrets.CF_SPACE }}
command: deploy ./BPVerification.mtar -f
assignrolecollections:
needs: deploy
runs-on: ubuntu-latest
steps:
- name: checkout repo
uses: actions/checkout@v2
- name: Downloads SAPCP CLI
run: .github/workflows/scripts/download_cli
env:
GLOBAL_ACCOUNT: ${{ secrets.GLOBAL_ACCOUNT }}
CF_USERNAME: ${{ secrets.CF_USERNAME }}
CF_PASSWORD: ${{ secrets.CF_PASSWORD }}
- name: assign RoleCollections
run: .github/workflows/scripts/assign_rolecollections
env:
CF_USERNAME: ${{ secrets.CF_USERNAME }}