fix(CI): 修改只有master可以触发并注释deploy节点
parent
a0b1bb7ace
commit
bb1a33824c
53
.drone.yml
53
.drone.yml
|
|
@ -8,37 +8,26 @@ steps:
|
||||||
commands:
|
commands:
|
||||||
- ls -la
|
- ls -la
|
||||||
- ls -la Dockerfile # 查看当前文件夹是否包含了Dockerfile
|
- ls -la Dockerfile # 查看当前文件夹是否包含了Dockerfile
|
||||||
# - name: publish
|
- name: publish
|
||||||
# image: plugins/docker
|
image: plugins/docker
|
||||||
# settings:
|
|
||||||
# username:
|
|
||||||
# from_secret: nexus_username
|
|
||||||
# password:
|
|
||||||
# from_secret: nexus_password
|
|
||||||
# pull: if-not-exists # 如果镜像不存在则拉取,免去每次都要重新下载
|
|
||||||
# dockerfile: Dockerfile
|
|
||||||
# tags: latest
|
|
||||||
# # you need insecure: true since we don't have a TLS certificate
|
|
||||||
# insecure: true
|
|
||||||
# registry: 192.168.31.104:8082
|
|
||||||
# repo: 192.168.31.104:8082/tiamo/user-point-management
|
|
||||||
# volumes:
|
|
||||||
# - name: dockersock
|
|
||||||
# path: /var/run/docker.sock
|
|
||||||
- name: deploy
|
|
||||||
pull: if-not-exists
|
|
||||||
image: appleboy/drone-ssh
|
|
||||||
settings:
|
settings:
|
||||||
host:
|
username:
|
||||||
- example1.com
|
from_secret: nexus_username
|
||||||
- example2.com
|
|
||||||
username: ubuntu
|
|
||||||
password:
|
password:
|
||||||
from_secret: ssh_password
|
from_secret: nexus_password
|
||||||
port: 22
|
pull: if-not-exists # 如果镜像不存在则拉取,免去每次都要重新下载
|
||||||
command_timeout: 2m
|
dockerfile: Dockerfile
|
||||||
script:
|
tags: latest
|
||||||
- echo "Hello World"
|
# you need insecure: true since we don't have a TLS certificate
|
||||||
|
insecure: true
|
||||||
|
registry: 192.168.31.104:8082
|
||||||
|
repo: 192.168.31.104:8082/tiamo/user-point-management
|
||||||
|
volumes:
|
||||||
|
- name: dockersock
|
||||||
|
path: /var/run/docker.sock
|
||||||
|
# - name: deploy
|
||||||
|
# pull: if-not-exists
|
||||||
|
# image: appleboy/drone-ssh
|
||||||
# settings:
|
# settings:
|
||||||
# host: 192.168.31.104
|
# host: 192.168.31.104
|
||||||
# port: 22
|
# port: 22
|
||||||
|
|
@ -69,6 +58,6 @@ volumes:
|
||||||
host:
|
host:
|
||||||
path: /var/run/docker.sock
|
path: /var/run/docker.sock
|
||||||
|
|
||||||
#trigger:
|
trigger:
|
||||||
# branch:
|
branch:
|
||||||
# - master
|
- master
|
||||||
Loading…
Reference in New Issue