fe-drone-ci/.drone.yml

52 lines
1.1 KiB
YAML
Raw Normal View History

2021-06-02 10:00:25 +00:00
kind: pipeline
type: docker
name: vue-admin
trigger:
branch: ci
steps:
2021-06-02 11:01:17 +00:00
2021-06-05 14:26:15 +00:00
- name: build-docker-image
image: plugins/docker
2021-06-03 09:07:09 +00:00
settings:
2021-06-05 14:26:15 +00:00
username:
from_secret: docker_reg_username
password:
from_secret: docker_reg_password
repo: docker.zcj.plus/drone-ci/fe
tags: latest
registry: https://docker.zcj.plus
2021-06-06 02:56:41 +00:00
- name: login-docker
image: appleboy/drone-ssh
settings:
envs:
- docker_reg_username
- docker_reg_password
host:
from_secret: ssh_port
username:
from_secret: ssh_username
password:
from_secret: ssh_password
port:
from_secret: ssh_port
script:
- docker login -u ${DOCKER_REG_USERNAME} -p ${DOCKER_REG_PASSWORD} https://docker.zcj.plus
- docker pull docker.zcj.plus/drone-ci/fe
2021-06-02 14:10:22 +00:00
2021-06-05 14:26:15 +00:00
- name: deploy
image: docker/compose
2021-06-06 00:32:53 +00:00
volumes:
- name: dockersock
path: /var/run/docker.sock
2021-06-05 14:26:15 +00:00
commands:
2021-06-06 02:56:41 +00:00
- up -d
- logs -f
2021-06-06 00:32:53 +00:00
volumes:
- name: dockersock
host:
2021-06-06 00:49:59 +00:00
path: /var/run/docker.sock