.gitlab-ci.yml 932 Bytes
Newer Older
canterafonsj's avatar
canterafonsj committed
1

2
before_script:
Stefan Wiedemann's avatar
Stefan Wiedemann committed
3
  - docker info
4 5

stages:
Stefan Wiedemann's avatar
Stefan Wiedemann committed
6
  - prepare
7 8
  - test

Stefan Wiedemann's avatar
Stefan Wiedemann committed
9
build:
Stefan Wiedemann's avatar
Stefan Wiedemann committed
10
  stage: prepare
Stefan Wiedemann's avatar
Stefan Wiedemann committed
11 12 13 14
  image: docker:19.03.12
  script:
    - scripts/setBasePath.sh https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master http://localhost:8080
    - docker build -t ngsi-local -f docker/Dockerfile .
Stefan Wiedemann's avatar
Stefan Wiedemann committed
15
  allow_failure: false
Stefan Wiedemann's avatar
Stefan Wiedemann committed
16

Stefan Wiedemann's avatar
Stefan Wiedemann committed
17
test:
18
  stage: test
Stefan Wiedemann's avatar
Stefan Wiedemann committed
19
  image: docker:19.03.12
Stefan Wiedemann's avatar
Stefan Wiedemann committed
20
  services:
Stefan Wiedemann's avatar
Stefan Wiedemann committed
21
    - ngsi-local
canterafonsj's avatar
canterafonsj committed
22
  script:
Stefan Wiedemann's avatar
Stefan Wiedemann committed
23
    - echo ${TEST}
Stefan Wiedemann's avatar
Stefan Wiedemann committed
24
    - scripts/setBasePath.sh https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master http://localhost:9090
Stefan Wiedemann's avatar
Stefan Wiedemann committed
25 26
    - docker run --network host -i -v ${PWD}/:/data wistefan/redocly-openapi-cli bundle /data/spec/updated/ngsi-ld-spec-open-api.json -o /data/spec/updated/generated/full_api.json
    - docker run --network host --rm -v ${PWD}/:/local openapitools/openapi-generator-cli validate -i /local/spec/updated/generated/full_api.json
Stefan Wiedemann's avatar
Stefan Wiedemann committed
27
  allow_failure: false
canterafonsj's avatar
canterafonsj committed
28

Stefan Wiedemann's avatar
Stefan Wiedemann committed
29
# TODO: after gitlab update, the ci should publish the bundled api