DriveLinked/.drone.yml

48 lines
875 B
YAML
Raw Normal View History

2022-04-03 18:01:36 +08:00
kind: pipeline
type: docker
name: compile
steps:
2022-04-03 19:40:53 +08:00
# - name: restore-pkg
# image: drillster/drone-volume-cache
# volumes:
# - name: cache
# path: /cache
# settings:
# restore: true
# mount:
# - $GOPATH/pkg
2022-04-03 18:01:36 +08:00
# - name: test
2022-04-03 19:28:55 +08:00
# image: eigeen/golang-devops:1.18
2022-04-03 18:01:36 +08:00
# commands:
# - go test
- name: build
2022-04-03 19:34:15 +08:00
image: golang:1.18
2022-04-03 18:01:36 +08:00
environments:
- CGO_ENABLED=0
2022-04-03 19:34:15 +08:00
- GOOS=linux
- GOARCH=amd64
2022-04-03 18:01:36 +08:00
commands:
- go build
2022-04-03 19:40:53 +08:00
# - name: rebuild-pkg
# image: drillster/drone-volume-cache
# volumes:
# - name: cache
# path: /cache
# settings:
# rebuild: true
# mount:
# - $GOPATH/pkg
# #当对应条件的时候才会执行
# when:
# status:
# - success
# - failure
2022-04-03 18:01:36 +08:00
2022-04-03 19:40:53 +08:00
# volumes:
# - name: cache
# host:
# path: /tmp/cache