This commit is contained in:
parent
f5208bfb47
commit
217f59a75b
15
.drone.yml
15
.drone.yml
@ -2,22 +2,22 @@ kind: pipeline
|
||||
name: default
|
||||
|
||||
steps:
|
||||
- name: linter
|
||||
- name: 执行代码检查
|
||||
image: golang:latest
|
||||
commands:
|
||||
- go get -u github.com/golangci/golangci-lint/cmd/golangci-lint
|
||||
- golangci-lint run
|
||||
|
||||
- name: build
|
||||
- name: 编译x86_64平台二进制文件
|
||||
image: golang:latest
|
||||
environment:
|
||||
GOOS: linux
|
||||
GOARCH: amd64
|
||||
CGO_ENABLED: 0
|
||||
commands:
|
||||
- go build -o demo-app
|
||||
- go build -o go-app
|
||||
|
||||
- name: docker
|
||||
- name: 打包Docker镜像并推送
|
||||
image: plugins/docker
|
||||
settings:
|
||||
registry: docker.gitee.ltd
|
||||
@ -31,3 +31,10 @@ steps:
|
||||
when:
|
||||
event: push
|
||||
branch: master
|
||||
|
||||
- name: 发送电报通知消息
|
||||
image: appleboy/drone-telegram
|
||||
settings:
|
||||
token: 883905265:AAFv3NAH4ykdh2m_XiQUuyKNJ9XE5RV7ukU
|
||||
to: 365042238
|
||||
message: 项目构建成功
|
@ -11,7 +11,7 @@ RUN mkdir -p /app && sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /et
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY demo-app ./
|
||||
COPY go-app ./
|
||||
ENV TZ=Asia/Shanghai
|
||||
|
||||
EXPOSE 8080
|
||||
|
Loading…
Reference in New Issue
Block a user