增加构建完成钉钉通知 修改打包环境开启c go
continuous-integration/drone/push Build is failing Details

This commit is contained in:
giaogiao 2023-09-25 15:58:21 +08:00
parent e8b476d099
commit ff2209a2ee
2 changed files with 12 additions and 2 deletions

View File

@ -44,6 +44,7 @@ steps:
- sed -i 's?/favicon.ico?/static/favicon.ico?g' ./app/index.html - sed -i 's?/favicon.ico?/static/favicon.ico?g' ./app/index.html
- sed -i 's?/logo192.png?/static/logo192.png?g' ./app/index.html - sed -i 's?/logo192.png?/static/logo192.png?g' ./app/index.html
- sed -i 's?/manifest.json?/static/manifest.json?g' ./app/index.html - sed -i 's?/manifest.json?/static/manifest.json?g' ./app/index.html
- apt install build-essential -y
- bash bulid.sh - bash bulid.sh
- name: 打包Docker镜像并推送 - name: 打包Docker镜像并推送
@ -63,7 +64,16 @@ steps:
when: when:
event: push event: push
branch: master branch: master
- name: 钉钉通知
image: lddsb/drone-dingtalk-message
settings:
token: e53b19defd95a6f27ca766051b3ba047328760b0bbcd7c9fb6e74bc33635eb07
type: markdown
secret: SECad13514bd7dee3fa73eeec19c32cfa2495a0f94976162f8534af956be30870e4
debug: true
when:
status: [failure, success]
volumes: volumes:
- name: outdir - name: outdir
host: host:

View File

@ -46,6 +46,6 @@ do
echo "Start compiling the system:${array[0]} architecture:${array[1]}" echo "Start compiling the system:${array[0]} architecture:${array[1]}"
# echo "CGO_ENABLED=0 GOOS=${array[0]} GOARCH=${array[1]} go build -o /root/web/${array[0]}_${array[1]}_main${extension}" # echo "CGO_ENABLED=0 GOOS=${array[0]} GOARCH=${array[1]} go build -o /root/web/${array[0]}_${array[1]}_main${extension}"
# CGO_ENABLED=0 GOOS=${array[0]} GOARCH=${array[1]} go build -o /root/web/${array[0]}_${array[1]}_main${extension} # CGO_ENABLED=0 GOOS=${array[0]} GOARCH=${array[1]} go build -o /root/web/${array[0]}_${array[1]}_main${extension}
CGO_ENABLED=0 GOOS=${array[0]} GOARCH=${array[1]} go build -o ${array[0]}_${array[1]}_main${extension} CGO_ENABLED=1 GOOS=${array[0]} GOARCH=${array[1]} go build -o ${array[0]}_${array[1]}_main${extension}
cp ${array[0]}_${array[1]}_main${extension} /root/web/ cp ${array[0]}_${array[1]}_main${extension} /root/web/
done done