This repository has been archived by the owner on Mar 30, 2020. It is now read-only.
forked from mickael-kerjean/filestash
-
Notifications
You must be signed in to change notification settings - Fork 2
/
.drone.yml
64 lines (56 loc) · 1.37 KB
/
.drone.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
kind: pipeline
name: default
platform:
os: linux
arch: arm
workspace:
base: /go
path: filestash
clone:
depth: 1
steps:
- name: build_prepare
image: alpine:latest
depends_on: [ clone ]
commands:
- mkdir -p ./dist/data/state/
- cp -R config ./dist/data/state/
- mkdir -p ./filestash/data/state/
- cp -R config ./filestash/data/state/
- name: build_frontend
image: node:12-alpine
depends_on: [ build_prepare ]
commands:
- apk add make git python2 build-base > /dev/null
- npm install --silent
- make build_frontend
- cp -R ./dist/data/public ./filestash/data/public
- name: build_backend
image: golang:1.12-stretch
depends_on: [ build_prepare ]
environment:
CGO_LDFLAGS_ALLOW: "-fopenmp"
GO111MODULE: "on"
commands:
- apt-get update > /dev/null && apt-get install -y libglib2.0-dev curl make > /dev/null
- make build_init
- make build_backend
- timeout 1 ./dist/filestash || true
- cp dist/filestash filestash/
- chmod -R o+r+w+x ./dist/data
- name: release_prepare
image: debian:stable-slim
depends_on: [ build_frontend, build_backend ]
commands:
- chmod -R o-r-w-x- ./filestash
- tar -cf filestash_Linux-armhf.tar ./filestash
- name: publish
image: plugins/github-release
depends_on: [ release_prepare ]
when:
event:
- tag
settings:
api_key:
from_secret: github_token
files: "*.tar"