首页 > 系统服务 > 详细

jenkins shell脚本自动化构建阿里云k8s上应用

时间:2019-01-06 00:24:48      阅读:297      评论:0      收藏:0      [点我收藏+]
#!/bin/bash

source /etc/profile

cd /mnt/workspace/weifeng-ui-pre/

npm i && npm run build 

rm -rf /mnt/workspace/weifeng-ui-pre/dockerfile/build


cd /mnt/workspace/weifeng-ui-pre/dockerfile

mv  ../build  .

sudo docker build -t pre-weifeng-ui -f Dockerfile.pre .

sudo docker login --username=******* -p Zh******k registry-vpc********.aliyuncs.com

sudo docker tag pre-weifeng-ui registry-vpc******liyuncs.com/weifeng-system/pre-weifeng-ui

sudo docker push  registry-*******.aliyuncs.com/weifeng-system/pre-weifeng-ui

curl https://cs.console.aliyun.com/hook/trigger?toke***********************************************7k

if [ $? -eq 0 ]; then
   echo -e "\033[32m[ the application weifeng-ui-pre successfully deployed  ]\033[0m"

else
    echo -e "\033[31m\033[01m[ the application weifeng-ui-pre deploy failed  ]\033[0m"

fi

  

jenkins shell脚本自动化构建阿里云k8s上应用

原文:https://www.cnblogs.com/weifeng1463/p/10226838.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!