From 5b65c6d58a4ede7060026acd0c1708dd5ff5636d Mon Sep 17 00:00:00 2001 From: Wolfgang Ludger Hottgenroth Date: Tue, 7 Dec 2021 12:53:31 +0100 Subject: [PATCH] test url stuff --- .gitlab-ci.yml | 14 ++++++++++++++ openapi.yaml | 2 -- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4b60977..d9e774d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -8,6 +8,20 @@ versionize: before_script: - VERSION=`echo -e "import yaml\nwith open('openapi.yaml') as f:d=yaml.load(f)\nprint d['info']['version']" | python` +extract_client_definition: + after_script: + - if [ $CI_COMMIT_BRANCH = test_deployment_v* ]; then + URL="https://test.webservices.krohne.com/" + elif [ $CI_COMMIT_BRANCH = dev_deployment_v* ]; then + URL="https://dev.webservices.krohne.com/" + elif [ $CI_COMMIT_BRANCH = production_deployment_v* ]; then + URL="https://prod.webservices.krohne.com/" + else + echo "no server url set" + exit -1 + fi + - sed -i -e 's,\(openapi:[[:space:]][[:digit:]]\.[[:digit:]]\.[[:digit:]]\),\1\nservers:\n - url: '$URL'\n,' ws.json + .deploy_test_dev: extends: .deploy tags: diff --git a/openapi.yaml b/openapi.yaml index 4066853..b3d5ba3 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -4,8 +4,6 @@ info: title: Generic Database API Service version: "2.0.0" -# servers: -# - url: INSERT_SERVER_URL_HERE paths: /pdb/v2/productionOrder/{productionOrderNumber}: