You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

46 lines
938 B

kind: pipeline
type: docker
name: drone-test-sew1sd
# 共享目录
volumes:
- name: maven-cache
host:
path: /data/drone/m2/cache
- name: maven-build
host:
path: /data/drone/m2/build
- name: docker-sock
host:
path: /var/run/docker.sock
# ci 步骤
steps:
# 打包jar
- name: maven-package
image: maven:3.6.3-jdk-8
volumes:
- name: maven-cache
path: /root/.m2
- name: maven-build
path: /app/build
commands:
- mvn clean package -Dmaven.test.skip=true
- cp target/aspect-lock-0.0.1-SNAPSHOT.jar /app/build/aspect-lock-0.0.1-SNAPSHOT.jar
when:
branch:
- master
event:
- push
- name: build-image
image: docker:dind
volumes:
- name: docker-sock
path: /var/run/docker.sock
commands:
- docker -v
- docker ps
- pwd
- ls -alh
- docker build -t aspect-lock:latest .