if [[ ${Scope} == "测试环境" ]]; then Branch="release" ScopeName="test" fi if [[ ${Scope} == "预发环境" ]]; then Branch="master" ScopeName="pre" fi if [[ ${Scope} == "生产环境" ]]; then Branch="master" ScopeName="pro" fi
if [[ ${Scope} == "测试环境" ]]; then su - cicd-test -c "kubectl set image deployment cicd-test cicd-test=registry-vpc.cn-beijing.aliyuncs.com/vcg/cicd-test:${ScopeName}-$Time" fi if [[ ${Scope} == "预发环境" ]]; then su - cicd-pre -c "kubectl set image deployment cicd-test cicd-test=registry-vpc.cn-beijing.aliyuncs.com/vcg/cicd-test:${ScopeName}-$Time" fi if [[ ${Scope} == "生产环境" ]]; then su - cicd-pro -c "kubectl set image deployment cicd-test cicd-test=registry-vpc.cn-beijing.aliyuncs.com/vcg/cicd-test:${ScopeName}-$Time" fi