forked from p68pgqsh7/simulation_temp
parent
c6e7bf3f8e
commit
40042f3b35
@ -1,21 +1,35 @@
|
|||||||
kind: pipeline
|
kind: pipeline
|
||||||
type: ssh
|
type: docker
|
||||||
name: deploy-unity3d
|
name: deploy
|
||||||
platform:
|
platform:
|
||||||
os: linux
|
os: linux
|
||||||
arch: amd64
|
arch: amd64
|
||||||
server:
|
volumes:
|
||||||
host: deploy_ip
|
- name: cache
|
||||||
user: deploy_name
|
host:
|
||||||
password: deploy_pwd
|
path: /var/lib/cache
|
||||||
steps:
|
steps:
|
||||||
- name: cicd
|
- name: deploy-to-server
|
||||||
|
image: appleboy/drone-scp
|
||||||
commands:
|
commands:
|
||||||
- echo =======
|
- mvn install -DskipTests=true
|
||||||
- nerdctl rm -f testnginx
|
# 需要将软件包与部署脚本提前上传到远程主机(见文件上传模板)
|
||||||
- nerdctl run --name testnginx -d -p 58080:80 nginx
|
# host、username、password可在参数管理中配置
|
||||||
- echo ==== nginx=======
|
- name: 远程主机部署
|
||||||
- curl 127.0.0.1:58080
|
image: appleboy/drone-ssh
|
||||||
- echo ==========
|
settings:
|
||||||
- echo http://localhost:555
|
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…
Reference in new issue