mirror of
https://github.com/muerwre/vk-tg-bot.git
synced 2025-04-24 22:46:41 +07:00
72 lines
1.8 KiB
YAML
72 lines
1.8 KiB
YAML
kind: pipeline
|
|
name: build
|
|
type: docker
|
|
|
|
platform:
|
|
os: linux
|
|
arch: amd64
|
|
|
|
steps:
|
|
# - name: build
|
|
# image: plugins/docker
|
|
# when:
|
|
# branch:
|
|
# - develop
|
|
# settings:
|
|
# dockerfile: docker/Dockerfile
|
|
# username:
|
|
# from_secret: docker_login
|
|
# password:
|
|
# from_secret: docker_password
|
|
# repo:
|
|
# from_secret: docker_repo
|
|
# registry:
|
|
# from_secret: docker_registry
|
|
- name: upload
|
|
image: drillster/drone-rsync
|
|
when:
|
|
branch:
|
|
- develop
|
|
environment:
|
|
BUILD_PATH:
|
|
from_secret: build_path
|
|
PLUGIN_ARGS: -zz -O --no-perms
|
|
PLUGIN_HOSTS:
|
|
from_secret: rsync_host
|
|
settings:
|
|
user:
|
|
from_secret: rsync_user
|
|
key:
|
|
from_secret: rsync_key
|
|
port:
|
|
from_secret: rsync_port
|
|
source: ./
|
|
target: $${BUILD_PATH}/${DRONE_BRANCH}
|
|
include:
|
|
- "docker/docker-compose.yml"
|
|
exclude:
|
|
- "*"
|
|
- name: deploy
|
|
image: appleboy/drone-ssh
|
|
when:
|
|
branch:
|
|
- develop
|
|
environment:
|
|
BUILD_PATH:
|
|
from_secret: build_path
|
|
ENV_PATH:
|
|
from_secret: env_path
|
|
settings:
|
|
port:
|
|
from_secret: rsync_port
|
|
host:
|
|
from_secret: rsync_host
|
|
username:
|
|
from_secret: rsync_user
|
|
key:
|
|
from_secret: rsync_key
|
|
envs: [build_path, env_path]
|
|
script_stop: true
|
|
script:
|
|
- DRONE_BRANCH=${DRONE_BRANCH} CONFIG_PATH="$ENV_PATH/${DRONE_BRANCH}/config.yml" docker-compose -f ./docker/docker-compose.yml --env-file ${ENV_PATH}/${DRONE_BRANCH}/.env build
|
|
- DRONE_BRANCH=${DRONE_BRANCH} CONFIG_PATH="$ENV_PATH/${DRONE_BRANCH}/config.yml" docker-compose -f ./docker/docker-compose.yml --env-file ${ENV_PATH}/${DRONE_BRANCH}/.env up -d
|