auto build
continuous-integration/drone/push Build is failing Details

master
kanade 4 years ago
parent e226829e8b
commit 4d21a460a6

@ -0,0 +1,52 @@
kind: pipeline
type: docker
name: master
steps:
- name: restore-cache
image: meltwater/drone-cache
settings:
backend: filesystem
restore: true
cache_key: "gomod"
archive_format: gzip
filesystem_cache_root: "/var/lib/cache"
mount:
- 'mod.pkg'
volumes:
- name: cache
path: "/var/lib/cache"
# Do stuff..
- name: build
image: golang:1.16-alpine3.13
environment:
GOMODCACHE: '/drone/src/mod.pkg'
commands:
- GOPROXY=https://goproxy.cn GOSUMDB=off CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -ldflags '-w -s' -o bin/server
- name: docker
image: plugins/docker
settings:
dockerfile: "Dockerfile.drone"
repo: harbor.oa00.com/library/image
registry: harbor.oa00.com
username:
from_secret: docker_username
password:
from_secret: docker_password
auto_tag: true
- name: rebuild-cache
image: meltwater/drone-cache
settings:
backend: filesystem
rebuild: true
cache_key: "gomod"
archive_format: gzip
filesystem_cache_root: "/var/lib/cache"
mount:
- 'mod.pkg'
volumes:
- name: cache
path: "/var/lib/cache"
volumes:
- name: cache
host:
path: "/var/lib/cache"

@ -0,0 +1,3 @@
| 环境 | 编译 |
| ---- | ---- |
| 正式 | [![Build Status](https://drone.oa00.com/api/badges/ansuex/backend/status.svg?ref=refs/heads/master)](https://drone.oa00.com/ansuex/backend) |
Loading…
Cancel
Save