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')
|
export now=$(TZ=Australia/Sydney date '+%Y%m%d-%H%M%S')
|
||||||
echo $now
|
echo $now
|
||||||
|
make drone-cache
|
||||||
echo "build commences"
|
echo "build commences"
|
||||||
go build -ldflags "-X main.sha1ver=`git rev-parse HEAD` -X main.buildTime=$now" -o smt
|
go build -ldflags "-X main.sha1ver=`git rev-parse HEAD` -X main.buildTime=$now" -o smt
|
||||||
echo "build complete"
|
echo "build complete"
|
||||||
|
35
.drone.yml
35
.drone.yml
@@ -17,6 +17,21 @@ steps:
|
|||||||
- pandoc -s README.md --embed-resources -c www/mvp.css --template template.html -o ./www/index.html
|
- pandoc -s README.md --embed-resources -c www/mvp.css --template template.html -o ./www/index.html
|
||||||
- cp ./www/index.html /shared/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
|
- name: build
|
||||||
image: golang
|
image: golang
|
||||||
volumes:
|
volumes:
|
||||||
@@ -26,6 +41,21 @@ steps:
|
|||||||
- cp /shared/index.html ./www/
|
- cp /shared/index.html ./www/
|
||||||
- sh ./.drone.sh
|
- 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
|
# Copy binary to test server
|
||||||
- name: coadcorp-deploy
|
- name: coadcorp-deploy
|
||||||
image: appleboy/drone-scp
|
image: appleboy/drone-scp
|
||||||
@@ -77,4 +107,7 @@ steps:
|
|||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
- name: shared
|
- name: shared
|
||||||
temp: {}
|
temp: {}
|
||||||
|
- name: cache
|
||||||
|
host:
|
||||||
|
path: /var/lib/cache
|
Reference in New Issue
Block a user