mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 12:56:41 +07:00
added new drone file
This commit is contained in:
parent
6b06d46067
commit
235f7f1209
1 changed files with 13 additions and 69 deletions
82
.drone.yml
82
.drone.yml
|
@ -7,78 +7,22 @@ platform:
|
||||||
arch: amd64
|
arch: amd64
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: compress
|
|
||||||
image: alpine
|
|
||||||
commands:
|
|
||||||
- rm -rf ./app.tar.bz2
|
|
||||||
- tar -cjf ./app.tar.bz2 -C ./ .
|
|
||||||
- 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
|
- name: build
|
||||||
image: appleboy/drone-ssh
|
image: plugins/docker
|
||||||
when:
|
when:
|
||||||
branch:
|
branch:
|
||||||
- master
|
|
||||||
- develop
|
- develop
|
||||||
environment:
|
|
||||||
BUILD_PATH:
|
|
||||||
from_secret: build_path
|
|
||||||
ENV_PATH:
|
|
||||||
from_secret: env_path
|
|
||||||
settings:
|
settings:
|
||||||
host: vault48.org
|
dockerfile: docker/www/Dockerfile
|
||||||
|
tag:
|
||||||
|
- ${DRONE_BRANCH}
|
||||||
|
custom_labels:
|
||||||
|
- commit: DRONE_COMMIT_SHA
|
||||||
username:
|
username:
|
||||||
from_secret: rsync_user
|
from_secret: global_docker_login
|
||||||
key:
|
password:
|
||||||
from_secret: rsync_key
|
from_secret: global_docker_password
|
||||||
envs: [build_path, env_path]
|
repo:
|
||||||
port: 22522
|
from_secret: project_name
|
||||||
script_stop: true
|
registry:
|
||||||
script:
|
from_secret: global_docker_registry
|
||||||
- mkdir -p $${BUILD_PATH}/${DRONE_BRANCH}
|
|
||||||
- rm -rf $${BUILD_PATH}/${DRONE_BRANCH}/*
|
|
||||||
- cd $${BUILD_PATH}/${DRONE_BRANCH}
|
|
||||||
- tar -xjf /tmp/vault-frontend-${DRONE_BRANCH}/app.tar.bz2 -C ./
|
|
||||||
- cp -a $${ENV_PATH}/${DRONE_BRANCH}/. $${BUILD_PATH}/${DRONE_BRANCH}
|
|
||||||
- docker-compose build
|
|
||||||
- docker-compose up -d
|
|
||||||
- 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}}
|
|
||||||
[{{repo.name}} / {{commit.branch}}]({{ build.link }})
|
|
||||||
```
|
|
||||||
{{ commit.message }}
|
|
||||||
```
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue