mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-25 02:56:41 +07:00
added drone
This commit is contained in:
parent
a3982eddae
commit
a729e0dc7d
1 changed files with 21 additions and 52 deletions
73
.drone.yml
73
.drone.yml
|
@ -7,61 +7,30 @@ platform:
|
||||||
arch: amd64
|
arch: amd64
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: compress
|
- name: build-master
|
||||||
image: alpine
|
image: plugins/docker
|
||||||
commands:
|
|
||||||
- rm -rf ./app.tar.bz2
|
|
||||||
- tar -cjf ./app.tar.bz2 -C ./ .
|
|
||||||
- name: upload
|
|
||||||
image: drillster/drone-rsync
|
|
||||||
when:
|
when:
|
||||||
branch:
|
branch:
|
||||||
- master
|
- master
|
||||||
- develop
|
|
||||||
environment:
|
environment:
|
||||||
RSYNC_KEY:
|
- REACT_APP_PUBLIC_PATH: https://map.vault48.org/
|
||||||
from_secret: rsync_key
|
- REACT_APP_API_ADDR: https://backend.map.vault48.org
|
||||||
RSYNC_USER:
|
- REACT_APP_OSRM_URL: https://vault48.org:5001/route/v1
|
||||||
from_secret: rsync_user
|
- REACT_APP_OSRM_PROFILE: bike
|
||||||
PLUGIN_ARGS: -zz -O --no-perms
|
|
||||||
settings:
|
settings:
|
||||||
port: 22522
|
dockerfile: docker/www/Dockerfile
|
||||||
hosts:
|
build_args_from_env:
|
||||||
- vault48.org
|
- REACT_APP_PUBLIC_PATH
|
||||||
source: ./
|
- REACT_APP_API_ADDR
|
||||||
user: ${rsync_user}
|
- REACT_APP_OSRM_URL
|
||||||
key: ${rsync_key}
|
- REACT_APP_OSRM_PROFILE
|
||||||
target: /tmp/orchid-map-${DRONE_BRANCH}
|
tag:
|
||||||
include:
|
- ${DRONE_BRANCH}
|
||||||
- "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:
|
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]
|
registry:
|
||||||
port: 22522
|
from_secret: global_docker_registry
|
||||||
script_stop: true
|
repo:
|
||||||
script:
|
from_secret: docker_repo
|
||||||
- mkdir -p $${BUILD_PATH}/${DRONE_BRANCH}
|
|
||||||
- rm -rf $${BUILD_PATH}/${DRONE_BRANCH}/*
|
|
||||||
- cd $${BUILD_PATH}/${DRONE_BRANCH}
|
|
||||||
- tar -xjf /tmp/orchid-map-${DRONE_BRANCH}/app.tar.bz2 -C ./
|
|
||||||
- cp -a $${ENV_PATH}/${DRONE_BRANCH}/. $${BUILD_PATH}/${DRONE_BRANCH}
|
|
||||||
- docker-compose build
|
|
||||||
- docker-compose up -d
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue