refactor: test

master
howell 4 years ago
parent bb7cc766ee
commit c7ae40b790

@ -63,20 +63,6 @@ steps:
- echo "172.31.211.15 git.oa00.com" >> /etc/hosts - echo "172.31.211.15 git.oa00.com" >> /etc/hosts
- git clone $DRONE_REMOTE_URL . - git clone $DRONE_REMOTE_URL .
- git checkout $DRONE_COMMIT - git checkout $DRONE_COMMIT
- 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 - name: build
image: golang:1.16-alpine3.13 image: golang:1.16-alpine3.13
environment: environment:
@ -84,23 +70,10 @@ steps:
commands: commands:
# - GOPROXY=https://goproxy.cn go get -u github.com/go-bindata/go-bindata/...@v3.1.2 # - GOPROXY=https://goproxy.cn go get -u github.com/go-bindata/go-bindata/...@v3.1.2
- GOPROXY=https://goproxy.cn CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags "-X recook/configs.environment=debug" -tags=jsoniter -v -o ./recook ./main.go - GOPROXY=https://goproxy.cn CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags "-X recook/configs.environment=debug" -tags=jsoniter -v -o ./recook ./main.go
- 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"
- name: scp files - name: scp files
image: appleboy/drone-scp image: appleboy/drone-scp
settings: settings:
host: 112.124.200.206 host: 139.196.147.232
username: username:
from_secret: test_user from_secret: test_user
password: password:
@ -111,7 +84,7 @@ steps:
- name: ssh - name: ssh
image: appleboy/drone-ssh image: appleboy/drone-ssh
settings: settings:
host: 112.124.200.206 host: 139.196.147.232
username: username:
from_secret: test_user from_secret: test_user
password: password:

Loading…
Cancel
Save