|
|
@ -18,12 +18,14 @@ steps: |
|
|
|
- cp -r docker /mnt/app/build/ |
|
|
|
- cp -r docker /mnt/app/build/ |
|
|
|
|
|
|
|
|
|
|
|
- name: build-docker |
|
|
|
- name: build-docker |
|
|
|
image: dashan/docker-compose:v1 |
|
|
|
image: plugins/docker |
|
|
|
volumes: # 将容器内目录挂载到宿主机,仓库需要开启Trusted设置 |
|
|
|
volumes: # 将容器内目录挂载到宿主机,仓库需要开启Trusted设置 |
|
|
|
- name: maven-build |
|
|
|
- name: maven-build |
|
|
|
path: /mnt/app/build # 将应用打包好的Jar和执行脚本挂载出来 |
|
|
|
path: /mnt/app/build # 将应用打包好的Jar和执行脚本挂载出来 |
|
|
|
- name: docker |
|
|
|
- name: docker |
|
|
|
path: /var/run/docker.sock # 挂载宿主机的docker |
|
|
|
path: /var/run/docker.sock # 挂载宿主机的docker |
|
|
|
|
|
|
|
- name: dockerc |
|
|
|
|
|
|
|
path: /usr/local/bin/docker-compose |
|
|
|
#settings: |
|
|
|
#settings: |
|
|
|
# dockerfile: /mnt/app/build/Dockerfile |
|
|
|
# dockerfile: /mnt/app/build/Dockerfile |
|
|
|
commands: # 定义在Docker容器中执行的shell命令 |
|
|
|
commands: # 定义在Docker容器中执行的shell命令 |
|
|
@ -31,7 +33,7 @@ steps: |
|
|
|
- chmod +x deploy.sh |
|
|
|
- chmod +x deploy.sh |
|
|
|
- sh deploy.sh stop |
|
|
|
- sh deploy.sh stop |
|
|
|
- sh deploy.sh build |
|
|
|
- sh deploy.sh build |
|
|
|
- sh deploy.sh module |
|
|
|
- sh deploy.sh modules |
|
|
|
- docker ps |
|
|
|
- docker ps |
|
|
|
|
|
|
|
|
|
|
|
volumes: # 定义流水线挂载目录,用于共享数据 |
|
|
|
volumes: # 定义流水线挂载目录,用于共享数据 |
|
|
@ -44,3 +46,6 @@ volumes: # 定义流水线挂载目录,用于共享数据 |
|
|
|
- name: docker |
|
|
|
- name: docker |
|
|
|
host: |
|
|
|
host: |
|
|
|
path: /var/run/docker.sock |
|
|
|
path: /var/run/docker.sock |
|
|
|
|
|
|
|
- name: dockerc |
|
|
|
|
|
|
|
host: |
|
|
|
|
|
|
|
path: /usr/local/bin/docker-compose |