Project 'liermao/microservice-autodevopspipelines' was moved to 'lichunsheng/microservice-autodevopspipelines'. Please update any links and bookmarks that may still have the old path.
Commit 9b8eee2a by 李二毛

Merge branch 'development' into 'rel/major'

修改方法CreateConfig

See merge request liermao/microservice-autodevopspipelines!44
parents 97504dca c93f90f3
Pipeline #4161 failed with stages
in 21 seconds
......@@ -11,12 +11,12 @@ function CreateConfig()
declare createUrl="$3/api/v1/namespaces/$2/configmaps?pretty=true"
echo "[environment: $1, namespace: $2]"
function send()
function Send()
{
set +e
declare deleteUrl="${3}/api/v1/namespaces/${2}/configmaps/$5"
echo ${AccessToken}
curl -X DELETE $deleteUrl -k \
--connect-timeout $2 --max-time $3 --retry $4 \
-H 'Authorization: Bearer '${AccessToken}''
......@@ -47,6 +47,9 @@ function CreateConfig()
declare maxConnectTime=20
declare retryCount=5
send "$4/appsettings.json" $maxConnectTime $maxTime $retryCount "$5.appsettings.json" "appsettings.json"
send "$4/appsettings.$1.json" $maxConnectTime $maxTime $retryCount "$(echo $5.appsettings.$1.json | tr 'A-Z' 'a-z')" "appsettings.$1.json"
ToLower "$5.appsettings.json" configName
ToLower "$5.appsettings.$1.json" configEnvName
Send "$4/appsettings.json" $maxConnectTime $maxTime $retryCount ${configName} "appsettings.json"
Send "$4/appsettings.$1.json" $maxConnectTime $maxTime $retryCount ${configEnvName} "appsettings.$1.json"
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment