chore(catalog): add script to add the example entities

This commit is contained in:
Oliver Sand
2020-07-24 12:04:02 +02:00
committed by Dominik Henneke
parent 7c9e84bd1d
commit f33c3dba21
2 changed files with 14 additions and 1 deletions
+2 -1
View File
@@ -18,7 +18,8 @@
"prepack": "backstage-cli prepack",
"postpack": "backstage-cli postpack",
"clean": "backstage-cli clean",
"mock-data": "./scripts/mock-data.sh"
"mock-data": "./scripts/mock-data.sh",
"mock-data:local": "./scripts/mock-data-local.sh"
},
"dependencies": {
"@backstage/backend-common": "^0.1.1-alpha.18",
+12
View File
@@ -0,0 +1,12 @@
#!/usr/bin/env bash
for FILE in \
../../packages/catalog-model/examples/*.yaml \
; do \
curl \
--location \
--request POST 'localhost:7000/catalog/locations' \
--header 'Content-Type: application/json' \
--data-raw "{\"type\": \"file\", \"target\": \"../catalog-model/${FILE}\"}"
echo
done