diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6f461359c1d36b73b4c792ce63056d8c62ef8f2a..9b01979fbf06f1e1880ce936d08e2cf34ae80dea 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -13,15 +13,17 @@ test-pr: only: [ merge_requests ] stage: test script: - - 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 - - docker run --rm -v ${PWD}/:/local openapitools/openapi-generator-cli validate -i /local/spec/updated/full_api.json + - 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 +- docker run --rm -v ${PWD}/:/local openapitools/openapi-generator-cli validate -i /local/spec/updated/full_api.json allow_failure: false test-branch: only: [ branches ] stage: test script: + - echo $CI_COMMIT_BRANCH - 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 - 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