测试CI,发布springboot项目
continuous-integration/drone/push Build was killed Details

master
fandongqiang 2 years ago
parent a5c86008a0
commit 0ec56b2a13

@ -2,6 +2,17 @@ kind: pipeline # 定义一个管道
type: docker # 当前管道的类型 type: docker # 当前管道的类型
name: test # 当前管道的名称 name: test # 当前管道的名称
steps: # 定义管道的执行步骤 steps: # 定义管道的执行步骤
#加载缓存
- name: cache
image: drillster/drone-volume-cache
volumes:
- name: cache
path: /cache
settings:
restore: true
mount:
- ./vendo
- name: build-jar # 步骤名称 - name: build-jar # 步骤名称
image: maven:3.8.5-openjdk-8 # 当前步骤使用的镜像 image: maven:3.8.5-openjdk-8 # 当前步骤使用的镜像
volumes: volumes:
@ -15,6 +26,7 @@ steps: # 定义管道的执行步骤
- cp entrypoint.sh /app/build/ - cp entrypoint.sh /app/build/
- cp Dockerfile /app/build/ - cp Dockerfile /app/build/
- cp run.sh /app/build/ - cp run.sh /app/build/
- name: build-docker - name: build-docker
image: plugins/docker image: plugins/docker
volumes: # 将容器内目录挂载到宿主机仓库需要开启Trusted设置 volumes: # 将容器内目录挂载到宿主机仓库需要开启Trusted设置
@ -29,3 +41,25 @@ steps: # 定义管道的执行步骤
- chmod +x run.sh - chmod +x run.sh
- sh run.sh - sh run.sh
- docker ps - docker ps
#构建缓存
- name: rebuild
image: drillster/drone-volume-cache
volumes:
- name: cache
path: /cache
settings:
rebuild: true
mount:
- ./vendor
volumes: # 定义流水线挂载目录,用于共享数据
- name: maven-build
host:
path: /home/data/maven/build # 从宿主机中挂载的目录
- name: maven-cache
host:
path: /home/data/maven/cache
- name: docker
host:
path: /var/run/docker.sock

@ -40,5 +40,13 @@
</plugins> </plugins>
</build> </build>
<repositories>
<repository>
<id>aliyun-repos</id>
<name>aliyun Releases</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
</repository>
</repositories>
</project> </project>
Loading…
Cancel
Save