This commit is contained in:
@@ -5,6 +5,7 @@ export CGO_ENABLED=0
|
||||
|
||||
export now=$(TZ=Australia/Sydney date '+%Y%m%d-%H%M%S')
|
||||
echo $now
|
||||
make drone-cache
|
||||
echo "build commences"
|
||||
go build -ldflags "-X main.sha1ver=`git rev-parse HEAD` -X main.buildTime=$now" -o smt
|
||||
echo "build complete"
|
||||
|
33
.drone.yml
33
.drone.yml
@@ -17,6 +17,21 @@ steps:
|
||||
- pandoc -s README.md --embed-resources -c www/mvp.css --template template.html -o ./www/index.html
|
||||
- cp ./www/index.html /shared/index.html
|
||||
|
||||
- name: restore-cache-with-filesystem
|
||||
image: meltwater/drone-cache
|
||||
pull: true
|
||||
settings:
|
||||
backend: "filesystem"
|
||||
restore: true
|
||||
cache_key: "volume"
|
||||
archive_format: "gzip"
|
||||
# filesystem_cache_root: "/tmp/cache"
|
||||
mount:
|
||||
- 'vendor'
|
||||
volumes:
|
||||
- name: cache
|
||||
path: /tmp/cache
|
||||
|
||||
- name: build
|
||||
image: golang
|
||||
volumes:
|
||||
@@ -26,6 +41,21 @@ steps:
|
||||
- cp /shared/index.html ./www/
|
||||
- sh ./.drone.sh
|
||||
|
||||
- name: rebuild-cache-with-filesystem
|
||||
image: meltwater/drone-cache
|
||||
pull: true
|
||||
settings:
|
||||
backend: "filesystem"
|
||||
rebuild: true
|
||||
cache_key: "volume"
|
||||
archive_format: "gzip"
|
||||
# filesystem_cache_root: "/tmp/cache"
|
||||
mount:
|
||||
- 'vendor'
|
||||
volumes:
|
||||
- name: cache
|
||||
path: /tmp/cache
|
||||
|
||||
# Copy binary to test server
|
||||
- name: coadcorp-deploy
|
||||
image: appleboy/drone-scp
|
||||
@@ -78,3 +108,6 @@ steps:
|
||||
volumes:
|
||||
- name: shared
|
||||
temp: {}
|
||||
- name: cache
|
||||
host:
|
||||
path: /var/lib/cache
|
Reference in New Issue
Block a user