CI/CD: publish archive of sources
The generates tarball includes node modules, to permit offline builds
This commit is contained in:
parent
ced46db1b6
commit
b08cc3b67c
38
.drone.yml
38
.drone.yml
|
@ -11,11 +11,47 @@ steps:
|
||||||
- name: frontend
|
- name: frontend
|
||||||
image: node:alpine
|
image: node:alpine
|
||||||
commands:
|
commands:
|
||||||
- apk --no-cache add python2 build-base
|
- apk --no-cache add python2 build-base tar
|
||||||
- yarn config set network-timeout 100000
|
- yarn config set network-timeout 100000
|
||||||
- yarn --cwd htdocs install
|
- yarn --cwd htdocs install
|
||||||
|
- tar --transform="s@.@./happydns-${DRONE_COMMIT}@" --exclude-vcs --exclude=./htdocs/node_modules/.cache -czf /dev/shm/happydns-src.tar.gz .
|
||||||
|
- mv /dev/shm/happydns-src.tar.gz .
|
||||||
- yarn --cwd htdocs --offline build
|
- yarn --cwd htdocs --offline build
|
||||||
|
|
||||||
|
- name: deploy sources
|
||||||
|
image: appleboy/drone-scp
|
||||||
|
settings:
|
||||||
|
tar_tmp_path: /tmp/
|
||||||
|
host: get.happydns.org
|
||||||
|
target: /var/www/happydns.org/get/${DRONE_BRANCH//\//-}
|
||||||
|
source: happydns-src.tar.gz
|
||||||
|
username:
|
||||||
|
from_secret: ssh_username
|
||||||
|
key:
|
||||||
|
from_secret: deploy_key
|
||||||
|
port:
|
||||||
|
from_secret: ssh_port
|
||||||
|
when:
|
||||||
|
event:
|
||||||
|
- push
|
||||||
|
|
||||||
|
- name: deploy sources for release
|
||||||
|
image: appleboy/drone-scp
|
||||||
|
settings:
|
||||||
|
tar_tmp_path: /tmp/
|
||||||
|
host: get.happydns.org
|
||||||
|
target: /var/www/happydns.org/get/${DRONE_TAG}
|
||||||
|
source: happydns-src.tar.gz
|
||||||
|
username:
|
||||||
|
from_secret: ssh_username
|
||||||
|
key:
|
||||||
|
from_secret: deploy_key
|
||||||
|
port:
|
||||||
|
from_secret: ssh_port
|
||||||
|
when:
|
||||||
|
event:
|
||||||
|
- tag
|
||||||
|
|
||||||
- name: backend
|
- name: backend
|
||||||
image: golang:alpine
|
image: golang:alpine
|
||||||
commands:
|
commands:
|
||||||
|
|
Loading…
Reference in New Issue