提交 8d03eeb8 编写于 作者: ibiz4j's avatar ibiz4j

deploy

上级 c410f7ca
......@@ -80,52 +80,52 @@ TARGET=PSSYSTEM
cd ${sys.codeName?lower_case}/
<#if sysrun.getRunMode() == "STARTMSAPP">
mkdir -p /var/lib/jenkins/appcache/${depapp.getId()}
if [ -e app_${pub.getPSApplication().getPKGCodeName()}/.dynamic ]
if [ -e app_${pub.getPSApplication().getPKGCodeName()}/app/vue.config.js ]
then
cd app_${pub.getPSApplication().getPKGCodeName()}
else
cd app_${pub.getPSApplication().getPKGCodeName()}/app
else
cd app_${pub.getPSApplication().getPKGCodeName()}
fi
<#if depapp.getUserParam("dockerimage","")?? && depapp.getUserParam("dockerimage","")!="">
<#if depapp.getUserParam("dockerimage","")?? && depapp.getUserParam("dockerimage","")!="">
sed -i "s#dstimage#${depapp.getUserParam("dockerimage","")}#g" swarm.yaml
docker -H $para1 stack deploy --compose-file=swarm.yaml ${depplatform.getName()} --with-registry-auth
docker -H $para1 stack deploy --compose-file=swarm.yaml ${depplatform.getName()} --with-registry-auth
<#else>
<#if pub.getPSDeployCenter().getCDType()?? && (pub.getPSDeployCenter().getCDType()=="SWARM") >
sed -i "s#dstimage#$para5#g" swarm.yaml
<#if pub.getPSDeployCenter().getCDType()?? && (pub.getPSDeployCenter().getCDType()=="SWARM") >
sed -i "s#dstimage#$para5#g" swarm.yaml
if [[ $para3 = all ]];then
mv Dockerfile-ALL Dockerfile
sed -i "s#/api#/<#if sys.getDeploySysId()??><#if (sys.getDeploySysId()?length gt 16)>${sys.getName()?lower_case}<#else>${sys.getDeploySysId()?lower_case}</#if><#else>${sys.getName()?lower_case}</#if>__${pub.getPSApplication().getPKGCodeName()?lower_case}#g" src/environments/environment.ts
sed -i "s#outputDir#//outputDir#g" vue.config.js
mv Dockerfile-ALL Dockerfile
sed -i "s#/api#/<#if sys.getDeploySysId()??><#if (sys.getDeploySysId()?length gt 16)>${sys.getName()?lower_case}<#else>${sys.getDeploySysId()?lower_case}</#if><#else>${sys.getName()?lower_case}</#if>__${pub.getPSApplication().getPKGCodeName()?lower_case}#g" src/environments/environment.ts
sed -i "s#outputDir#//outputDir#g" vue.config.js
yarn
ln -s /var/lib/jenkins/appcache/${depapp.getId()} node_modules/.cache
yarn build
else
if [ -e .dynamic ]
if [ -e app/vue.config.js ]
then
mv <#if pub?? && pub.getModelFolder?? && pub.getModelFolder()??> ../${pub.getModelFolder()}/PSSYSAPPS/${pub.getPSApplication().getCodeName()}</#if> model
else
mv <#if pub?? && pub.getModelFolder?? && pub.getModelFolder()??> ../../${pub.getModelFolder()}/PSSYSAPPS/${pub.getPSApplication().getCodeName()}</#if> model
else
mv <#if pub?? && pub.getModelFolder?? && pub.getModelFolder()??> ../${pub.getModelFolder()}/PSSYSAPPS/${pub.getPSApplication().getCodeName()}</#if> model
fi
sed -i "s#srcimagename#$para4#g" Dockerfile-MODEL
mv Dockerfile-MODEL Dockerfile
fi
fi
docker build -t $para5 .
docker push $para5
docker -H $para1 stack deploy --compose-file=swarm.yaml ${depplatform.getName()} --with-registry-auth
<#elseif pub.getPSDeployCenter().getCDType()?? && (pub.getPSDeployCenter().getCDType()=="K8S") >
<#elseif pub.getPSDeployCenter().getCDType()?? && (pub.getPSDeployCenter().getCDType()=="K8S") >
if [[ $para3 = all ]];then
mv Dockerfile-ALL Dockerfile
sed -i "s#/api#/<#if sys.getDeploySysId()??><#if (sys.getDeploySysId()?length gt 16)>${sys.getName()?lower_case}<#else>${sys.getDeploySysId()?lower_case}</#if><#else>${sys.getName()?lower_case}</#if>__${pub.getPSApplication().getPKGCodeName()?lower_case}#g" src/environments/environment.ts
sed -i "s#outputDir#//outputDir#g" vue.config.js
mv Dockerfile-ALL Dockerfile
sed -i "s#/api#/<#if sys.getDeploySysId()??><#if (sys.getDeploySysId()?length gt 16)>${sys.getName()?lower_case}<#else>${sys.getDeploySysId()?lower_case}</#if><#else>${sys.getName()?lower_case}</#if>__${pub.getPSApplication().getPKGCodeName()?lower_case}#g" src/environments/environment.ts
sed -i "s#outputDir#//outputDir#g" vue.config.js
yarn
ln -s /var/lib/jenkins/appcache/${depapp.getId()} node_modules/.cache
yarn build
else
if [ -e .dynamic ]
if [ -e app/vue.config.js ]
then
mv <#if pub?? && pub.getModelFolder?? && pub.getModelFolder()??> ../${pub.getModelFolder()}/PSSYSAPPS/${pub.getPSApplication().getCodeName()}</#if> model
else
mv <#if pub?? && pub.getModelFolder?? && pub.getModelFolder()??> ../../${pub.getModelFolder()}/PSSYSAPPS/${pub.getPSApplication().getCodeName()}</#if> model
else
mv <#if pub?? && pub.getModelFolder?? && pub.getModelFolder()??> ../${pub.getModelFolder()}/PSSYSAPPS/${pub.getPSApplication().getCodeName()}</#if> model
fi
sed -i "s#srcimagename#$para4#g" Dockerfile-MODEL
mv Dockerfile-MODEL Dockerfile
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册