forked from p68pgqsh7/simulation_temp
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
882 B
33 lines
882 B
kind: pipeline
|
|
type: docker
|
|
name: deploy
|
|
platform:
|
|
os: linux
|
|
arch: amd64
|
|
volumes:
|
|
- name: cache
|
|
host:
|
|
path: /var/lib/cache
|
|
steps:
|
|
# host、username、password可在参数管理中配置
|
|
- name: 远程主机部署
|
|
image: appleboy/drone-ssh
|
|
pull: if-not-exists # 添加此行,只在本地没有镜像时才拉取
|
|
settings:
|
|
host:
|
|
from_secret: deploy_ip
|
|
username:
|
|
from_secret: deploy_name
|
|
password:
|
|
from_secret: deploy_pwd
|
|
port: 22
|
|
script:
|
|
- echo ====暂停容器开始11=======
|
|
- rm -fr /opt/test
|
|
- git clone https://bdgit.educoder.net/jasder/simulation_temp.git /opt/test
|
|
- chmod 777 /opt/test
|
|
- docker rm -f nginx
|
|
- echo ====开始部署=======
|
|
- docker run -d -p 58080:80 -v /opt/test:/usr/share/nginx/html:ro --name nginx nginx:1.24.0
|
|
- echo ====部署成功======
|
|
|