CI test #1
This commit is contained in:
parent
e1f6d3c822
commit
4cab7278a9
|
@ -0,0 +1,44 @@
|
|||
kind: pipeline
|
||||
type: docker
|
||||
name: compile
|
||||
|
||||
steps:
|
||||
- name: restore-pkg
|
||||
image: drillster/drone-volume-cache
|
||||
volumes:
|
||||
- cache:/cache
|
||||
settings:
|
||||
restore: true
|
||||
mount:
|
||||
- $GOPATH/pkg
|
||||
|
||||
# - name: test
|
||||
# image: golang:1.18-alpine
|
||||
# commands:
|
||||
# - go test
|
||||
|
||||
- name: build
|
||||
image: golang:1.18-alpine
|
||||
environments:
|
||||
- CGO_ENABLED=0
|
||||
commands:
|
||||
- go build
|
||||
|
||||
- name: rebuild-pkg
|
||||
image: drillster/drone-volume-cache
|
||||
volumes:
|
||||
- name: cache:/cache
|
||||
settings:
|
||||
rebuild: true
|
||||
mount:
|
||||
- $GOPATH/pkg
|
||||
#当对应条件的时候才会执行
|
||||
when:
|
||||
status:
|
||||
- success
|
||||
- failure
|
||||
|
||||
volumes:
|
||||
- name: cache
|
||||
host:
|
||||
path: /tmp/cache
|
Loading…
Reference in New Issue