This commit is contained in:
parent
f5208bfb47
commit
217f59a75b
17
.drone.yml
17
.drone.yml
@ -2,22 +2,22 @@ kind: pipeline
|
|||||||
name: default
|
name: default
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: linter
|
- name: 执行代码检查
|
||||||
image: golang:latest
|
image: golang:latest
|
||||||
commands:
|
commands:
|
||||||
- go get -u github.com/golangci/golangci-lint/cmd/golangci-lint
|
- go get -u github.com/golangci/golangci-lint/cmd/golangci-lint
|
||||||
- golangci-lint run
|
- golangci-lint run
|
||||||
|
|
||||||
- name: build
|
- name: 编译x86_64平台二进制文件
|
||||||
image: golang:latest
|
image: golang:latest
|
||||||
environment:
|
environment:
|
||||||
GOOS: linux
|
GOOS: linux
|
||||||
GOARCH: amd64
|
GOARCH: amd64
|
||||||
CGO_ENABLED: 0
|
CGO_ENABLED: 0
|
||||||
commands:
|
commands:
|
||||||
- go build -o demo-app
|
- go build -o go-app
|
||||||
|
|
||||||
- name: docker
|
- name: 打包Docker镜像并推送
|
||||||
image: plugins/docker
|
image: plugins/docker
|
||||||
settings:
|
settings:
|
||||||
registry: docker.gitee.ltd
|
registry: docker.gitee.ltd
|
||||||
@ -30,4 +30,11 @@ steps:
|
|||||||
- 0.0.1
|
- 0.0.1
|
||||||
when:
|
when:
|
||||||
event: push
|
event: push
|
||||||
branch: master
|
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
|
WORKDIR /app
|
||||||
|
|
||||||
COPY demo-app ./
|
COPY go-app ./
|
||||||
ENV TZ=Asia/Shanghai
|
ENV TZ=Asia/Shanghai
|
||||||
|
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
|
Loading…
Reference in New Issue
Block a user