feat: add automatic mapping generation

Fixes #6
This commit is contained in:
Anselm Stordeur
2019-02-05 14:54:52 +01:00
committed by Wieland Schöbl
parent 969badfb29
commit 7b198f95ce
13 changed files with 1267 additions and 78 deletions

View File

@@ -56,6 +56,22 @@ routes:
paths:
- routes.md
mapping:
dependencies:
- build
stage: test
services:
- name: registry.gitlab.com/openstapps/database:master
alias: elasticsearch
script:
- npm install @openstapps/core
- node lib/cli.js mapping ./node_modules/@openstapps/core/src mapping.json "pattern,see,minlength"
- curl http://elasticsearch:9200/stapps --upload-file mapping.json -o response.json
- cat response.json
- grep -q "\"acknowledged\":true" response.json
# - curl --show-error --fail http://elasticsearch:9200/stapps --upload-file mapping.json
package:
dependencies:
- build