Skip to content
.gitlab-ci.yml 1.35 KiB
Newer Older
canterafonsj's avatar
canterafonsj committed
# This file is a template, and might need editing before it works on your project.
# Official framework image. Look for the different tagged releases at:
# https://hub.docker.com/r/library/node/tags/
Stefan Wiedemann's avatar
Stefan Wiedemann committed
image: docker:19.03.12
canterafonsj's avatar
canterafonsj committed

before_script:
Stefan Wiedemann's avatar
Stefan Wiedemann committed
  - docker info
Stefan Wiedemann's avatar
Stefan Wiedemann committed
test-pr:
  only: [ merge_requests ]
  stage: test
canterafonsj's avatar
canterafonsj committed
  script:
Stefan Wiedemann's avatar
Stefan Wiedemann committed
    - echo $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME
    - scripts/setBasePath.sh https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME
    - docker run -i -v ${PWD}/:/data wistefan/redocly-openapi-cli bundle /data/spec/updated/ngsi-ld-spec-open-api.json -o /data/spec/updated/full_api.json
Stefan Wiedemann's avatar
Stefan Wiedemann committed
    - docker run --rm -v ${PWD}/:/local openapitools/openapi-generator-cli validate -i /local/spec/updated/full_api.json
Stefan Wiedemann's avatar
Stefan Wiedemann committed
  allow_failure: false
canterafonsj's avatar
canterafonsj committed

Stefan Wiedemann's avatar
Stefan Wiedemann committed
test-branch:
  only: [ branches ]
  stage: test
  script:
Stefan Wiedemann's avatar
Stefan Wiedemann committed
    - echo $CI_COMMIT_BRANCH
Stefan Wiedemann's avatar
Stefan Wiedemann committed
    - scripts/setBasePath.sh https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master  https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/$CI_COMMIT_BRANCH
Stefan Wiedemann's avatar
Stefan Wiedemann committed
    - docker run -i -v ${PWD}/:/data wistefan/redocly-openapi-cli bundle /data/spec/updated/ngsi-ld-spec-open-api.json -o /data/spec/updated/full_api.json
    - docker run --rm -v ${PWD}/:/local openapitools/openapi-generator-cli validate -i /local/spec/updated/full_api.json
  allow_failure: false