You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
kind: pipeline # 定义一个管道
|
|
|
|
|
type: docker # 当前管道的类型
|
|
|
|
|
name: test # 当前管道的名称
|
|
|
|
|
steps: # 定义管道的执行步骤
|
|
|
|
|
- name: build-jar # 步骤名称
|
|
|
|
|
image: maven:3.8.5-openjdk-8 # 当前步骤使用的镜像
|
|
|
|
|
volumes:
|
|
|
|
|
- name: maven-cache
|
|
|
|
|
path: /root/.m2 # 将maven下载依赖的目录挂载出来,防止重复下载
|
|
|
|
|
- name: maven-build
|
|
|
|
|
path: /usr/local/app/build # 将应用打包好的Jar和执行脚本挂载出来
|
|
|
|
|
commands: # 当前步骤执行的命令
|
|
|
|
|
- mvn clean package -DskipTests=true # 应用打包命
|
|
|
|
|
- cp target/ips-ci-demo-1.0.jar /usr/local/app/build/ips-ci-demo-1.0.jar
|
|
|
|
|
- cp entrypoint.sh /usr/local/app/build/
|
|
|
|
|
- cp Dockerfile /usr/local/app/build/
|
|
|
|
|
- cp run.sh /usr/local/app/build/
|