Update '.trustie-pipeline.yml'
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
parent
85bc7a6270
commit
ed185350ef
@ -1 +1,55 @@
|
|||||||
#pipeline
|
|
||||||
|
kind: pipeline
|
||||||
|
type: docker
|
||||||
|
name: 开发流水线
|
||||||
|
platform:
|
||||||
|
os: linux
|
||||||
|
arch: amd64
|
||||||
|
steps:
|
||||||
|
- name: maven
|
||||||
|
image: maven:3-jdk-10
|
||||||
|
commands:
|
||||||
|
- mvn clean package -DskipTests=true
|
||||||
|
# 本模板示例为上传软件包和部署脚本到home目录
|
||||||
|
# host、username、password可在参数管理中配置
|
||||||
|
- name: 上传文件
|
||||||
|
image: appleboy/drone-scp
|
||||||
|
settings:
|
||||||
|
host:
|
||||||
|
from_secret: data_ip
|
||||||
|
username:
|
||||||
|
from_secret: data_user
|
||||||
|
password:
|
||||||
|
from_secret: data_pwd
|
||||||
|
port: 22
|
||||||
|
target: /opt
|
||||||
|
source:
|
||||||
|
- visualization
|
||||||
|
# 需要将软件包与部署脚本提前上传到远程主机(见文件上传模板)
|
||||||
|
# host、username、password可在参数管理中配置
|
||||||
|
- name: 远程主机部署
|
||||||
|
image: appleboy/drone-ssh
|
||||||
|
settings:
|
||||||
|
host:
|
||||||
|
from_secret: ip
|
||||||
|
username:
|
||||||
|
from_secret: name
|
||||||
|
password:
|
||||||
|
from_secret: pwd
|
||||||
|
port: 22
|
||||||
|
script:
|
||||||
|
- echo ====暂停容器开始11=======
|
||||||
|
- docker rm -f mo-test
|
||||||
|
- docker rmi mo-test:1.0
|
||||||
|
- cd /opt/visualization
|
||||||
|
- echo ====开始部署=======
|
||||||
|
- docker build -t mo-test:1.0 .
|
||||||
|
- docker run -d -p 8080:8080 --name mo-test mo-test:1.0
|
||||||
|
- mvn clean package
|
||||||
|
- java -jar target/demo-0.0.1-SNAPSHOT.jar
|
||||||
|
- echo ====部署成功======
|
||||||
|
trigger:
|
||||||
|
branch:
|
||||||
|
- master
|
||||||
|
event:
|
||||||
|
- push
|
||||||
|
Loading…
Reference in new issue