This website works better with JavaScript.
Home
Issues
Pull Requests
Milestones
Repositories
Datasets
Forum
实训
竞赛
大数据
应用
Register
Sign In
OpenI
/
devopsdemo
Not watched
Unwatch
Watch all
Watch but not notify
1
Star
0
Fork
0
Code
Releases
0
Wiki
Activity
Issues
0
Pull Requests
0
Datasets
Model
Cloudbrain
Browse Source
更新 '.drone.yml'
master
高级云脑研发工程师
2 years ago
parent
23ae12b921
commit
de0d8140e2
1 changed files
with
35 additions
and
19 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+35
-19
.drone.yml
+ 35
- 19
.drone.yml
View File
@@ -1,32 +1,48 @@
kind: pipeline
type: docker
name: 1
platform:
os: linux
arch: amd64
workspace:
base: /opt/workspace
path: work
steps:
volumes:
- name: m2
host:
path: /root/.m2
- name: dest
host:
path: /root/target
- name: 编译构建
image: gcc
steps:
- name: maven
image: maven:3-jdk-10
volumes:
- name: m2
path: /root/.m2
- name: dest
path: /root/target
commands:
- ./configure
- make
# 需要将软件包与部署脚本提前上传到远程主机(见文件上传模板)
# host、username、password可在参数管理中配置
- name: 远程主机部署
- mvn package
- mv target/webssh.war /root/target/
- name: ssh-deploy
image: appleboy/drone-ssh
settings:
host:
from_secret: ip
username:
from_secret: name
password:
from_secret: pwd
port: 22
host:
- 113.246.243.98
username: root
password: wang199637
port: 4221
command_timeout: 2m
script:
- chmod +x /home/deploy.sh
- ./home/deploy.sh
- docker run -v /root/target/:/usr/local/tomcat/webapps/ -p61002:8080 -d tomcat:9.0
trigger:
branch:
- master
event:
- push
- pull_request
Write
Preview
Loading…
Cancel
Save