mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 04:46:40 +07:00
changed drone config
This commit is contained in:
parent
b388700e07
commit
6e283112b7
1 changed files with 75 additions and 6 deletions
77
.drone.yml
77
.drone.yml
|
@ -1,13 +1,82 @@
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
name: default
|
name: build
|
||||||
|
type: docker
|
||||||
|
|
||||||
platform:
|
platform:
|
||||||
os: linux
|
os: linux
|
||||||
arch: amd64
|
arch: amd64
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: build-test
|
- name: compress
|
||||||
image: node:10.13
|
image: alpine
|
||||||
commands:
|
commands:
|
||||||
|
- rm -rf ./app.tar.bz2
|
||||||
|
- tar -cjf ./app.tar.bz2 -C ./dist .
|
||||||
|
- name: upload
|
||||||
|
image: drillster/drone-rsync
|
||||||
|
when:
|
||||||
|
branch:
|
||||||
|
- master
|
||||||
|
- develop
|
||||||
|
environment:
|
||||||
|
RSYNC_KEY:
|
||||||
|
from_secret: rsync_key
|
||||||
|
RSYNC_USER:
|
||||||
|
from_secret: rsync_user
|
||||||
|
PLUGIN_ARGS: -zz -O --no-perms
|
||||||
|
settings:
|
||||||
|
port: 22522
|
||||||
|
hosts:
|
||||||
|
- vault48.org
|
||||||
|
source: ./
|
||||||
|
user: ${rsync_user}
|
||||||
|
key: ${rsync_key}
|
||||||
|
target: /tmp/vault-frontend-${DRONE_BRANCH}
|
||||||
|
include:
|
||||||
|
- "app.tar.bz2"
|
||||||
|
exclude:
|
||||||
|
- "*"
|
||||||
|
- name: build
|
||||||
|
image: appleboy/drone-ssh
|
||||||
|
when:
|
||||||
|
branch:
|
||||||
|
- master
|
||||||
|
- develop
|
||||||
|
environment:
|
||||||
|
BUILD_PATH:
|
||||||
|
from_secret: build_path
|
||||||
|
ENV_PATH:
|
||||||
|
from_secret: env_path
|
||||||
|
settings:
|
||||||
|
host: vault48.org
|
||||||
|
username:
|
||||||
|
from_secret: rsync_user
|
||||||
|
key:
|
||||||
|
from_secret: rsync_key
|
||||||
|
envs: [build_path, env_path]
|
||||||
|
port: 22522
|
||||||
|
script_stop: true
|
||||||
|
script:
|
||||||
|
- mkdir -p $${BUILD_PATH}/${DRONE_BRANCH}
|
||||||
|
- cd $${BUILD_PATH}/${DRONE_BRANCH}
|
||||||
|
- rm -rf ./dist
|
||||||
|
- tar -xjf /tmp/vault-frontend-${DRONE_BRANCH}/app.tar.bz2 -C ./
|
||||||
|
- cp -a $${ENV_PATH}/${DRONE_BRANCH}/. $${BUILD_PATH}/${DRONE_BRANCH}
|
||||||
- yarn
|
- yarn
|
||||||
- yarn install
|
- yarn build
|
||||||
|
- name: telgram_notify
|
||||||
|
image: appleboy/drone-telegram
|
||||||
|
when:
|
||||||
|
status:
|
||||||
|
- success
|
||||||
|
- failure
|
||||||
|
settings:
|
||||||
|
token:
|
||||||
|
from_secret: telegram_token
|
||||||
|
to:
|
||||||
|
from_secret: telegram_chat_id
|
||||||
|
format: markdown
|
||||||
|
message: >
|
||||||
|
{{#success build.status}}🤓{{else}}😨{{/success}}
|
||||||
|
{{ datetime build.finished "01.02.2006 15:04:05" "UTC" }} [{{repo.name}} / {{commit.branch}}]({{ build.link }})
|
||||||
|
```{{ commit.message }}```
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue