Files
fb-admin/.drone.yml
T
2019-07-07 17:48:05 +00:00

89 lines
1.5 KiB
YAML

kind: pipeline
name: default
steps:
- name: restore cache
image: drillster/drone-volume-cache
settings:
restore: true
mount:
- ./node_modules
volumes:
- name: cache
path: /cache
- name: npm install
image: node:12
commands:
- npm install
- name: npm run build
image: node:12
commands:
- npm run build
- name: rebuild cache
image: drillster/drone-volume-cache
settings:
rebuild: true
mount:
- ./node_modules
volumes:
- name: cache
path: /cache
- name: deliver container
image: plugins/docker
settings:
registry: registry.frontblock.me
insecure: true
repo: registry.frontblock.me/vendor/admin
tags: ${DRONE_BUILD_CREATED}
- name: archive static files
image: alpine:3.9
commands:
- apk add --no-cache zip tar
- mkdir dist
- zip -9r ./dist/${DRONE_REPO_NAME}.zip static
- tar -czf ./dist/${DRONE_REPO_NAME}.tar.gz static
when:
event:
- tag
- name: release static files
image: plugins/gitea-release
settings:
base_url: https://gitea.frontblock.me
api_key:
from_secret: release_token
files:
- dist/*
checksum:
- md5
- sha1
- sha256
- sha512
- adler32
- crc32
when:
event:
- tag
- name: release container
image: plugins/docker
settings:
repo: frontblockme/admin
tags: ${DRONE_TAG}
username: frontblockme
password:
from_secret: docker_password
when:
event:
- tag
volumes:
- name: cache
host:
path: /tmp