多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
后端文件上传: ``` # 配置 GOPATH export GOPATH="$JENKINS_HOME/golang_workspace" export GOBINPATH="$GOPATH/bin" export PATH="$PATH:$GOBINPATH" export GO111MODULE=on #export GOPROXY=https://goproxy.cn export GOPROXY=https://goproxy.io #export GOPROXY="https://athens.azurefd.net" # 执行 go get & build 命令 #创建 $GOPATH目录 mkdir -p $GOPATH # 输出当前时间 date go version #构建可执行二进制文件 CGO_ENABLED=0 GOARCH=amd64 go build -o btc-mine server.go #CGO_ENABLED=0 GOARCH=amd64 go build -o testgo test.go #将可执行二进制文件传输到应用服务器 #rsync bh-go-server-user root@172.16.3.41:/home/golang/bh-go-server-user/ rsync btc-mine root@172.104.112.98:/home/golang/btc-mine/ #rsync testgo root@172.16.3.52:/home/golang/bc-mall/ rsync -r config/ root@172.104.112.98:/home/golang/btc-mine/config #rsync -r dumps/ root@172.16.3.52:/home/golang/btc-mine/dumps/ ``` ![](https://img.kancloud.cn/3e/29/3e29ee696a3de601ae3086dfd3598e9d_912x332.png) 前端文件上传: ``` echo "Devops" # 输出当前时间 date # 输出node版本 node -v # 输出npm版本 #npm -v yarn -v # 设置淘宝镜像 #npm config set registry https://registry.npm.taobao.org yarn config set registry=http://registry.npm.taobao.org # 安装 yarn install # build yarn run build || true # 重构web目录 #rm -rf www_root #mv dist www_root # 查看文件目录 #ls -al www_root rsync -r dist/ root@172.104.112.98:/www/wwwroot/admin.kjs-miner.io zip bh-ant-mall.zip bh-ant-mall rsync -aP -e 'ssh -p 23322' bh-ant-mall.zip root@54.169.192.148:/home/golang/bh-ant-mall/ ```