Update .trustie-pipeline.yml

develop
a411763600 2 weeks ago
parent c6e7bf3f8e
commit 40042f3b35

@ -1,21 +1,35 @@
kind: pipeline
type: ssh
name: deploy-unity3d
type: docker
name: deploy
platform:
os: linux
arch: amd64
server:
host: deploy_ip
user: deploy_name
password: deploy_pwd
volumes:
- name: cache
host:
path: /var/lib/cache
steps:
- name: cicd
- name: deploy-to-server
image: appleboy/drone-scp
commands:
- echo =======
- nerdctl rm -f testnginx
- nerdctl run --name testnginx -d -p 58080:80 nginx
- echo ==== nginx=======
- curl 127.0.0.1:58080
- echo ==========
- echo http://localhost:555
- mvn install -DskipTests=true
# 需要将软件包与部署脚本提前上传到远程主机(见文件上传模板)
# host、username、password可在参数管理中配置
- name: 远程主机部署
image: appleboy/drone-ssh
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
- docker rm -f nginx
- echo ====开始部署=======
- docker run -d -p 58080:80 -v /opt/test:/usr/share/nginx/html:ro --name nginx nginx
- echo ====部署成功======
Loading…
Cancel
Save