test url stuff

This commit is contained in:
2021-12-07 12:53:31 +01:00
parent 31a9ba88c6
commit 5b65c6d58a
2 changed files with 14 additions and 2 deletions

View File

@ -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:

View File

@ -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}: