-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.json
25 lines (25 loc) · 1.26 KB
/
app.json
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
{
"name": "appsheet-api-template",
"env": {
"API_KEY": {
"generator": "secret",
"description": "A secret that to be used to access the API."
}
},
"options": {
"allow-unauthenticated": true
},
"hooks": {
"postbuild": {
"commands": [
"gcloud config set project $GOOGLE_CLOUD_PROJECT",
"gcloud services enable appengine.googleapis.com",
"gcloud services enable firestore.googleapis.com",
"if [[ $(gcloud app describe 2>&1 || true) == *'ERROR'* ]]; then echo 'No app engine or firestore instances found, creating...' && gcloud app create --region=europe-west && gcloud firestore databases create --region=europe-west; fi",
"echo 'Now creating service account with correct permissions..'",
"PROJECTNUMBER=$(gcloud projects list --filter=\"$(gcloud config get-value project)\" --format=\"value(PROJECT_NUMBER)\") && gcloud projects add-iam-policy-binding $GOOGLE_CLOUD_PROJECT --member=\"serviceAccount:[email protected]\" --role='roles/datastore.user'",
"echo 'Now loading some test data..' && ./loaddata.sh"
]
}
}
}