-
Notifications
You must be signed in to change notification settings - Fork 0
/
.drone.yml
98 lines (88 loc) · 1.88 KB
/
.drone.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
---
scireum_volumes: &scireum_volumes
- name: docker_socket
path: /var/run/docker.sock
- name: m2
path: /root/.m2
kind: pipeline
name: default
platform:
os: linux
arch: amd64
clone:
depth: 1
steps:
- name: test
image: hub.scireum.com/scireum/sirius-build:latest
commands:
- mvn clean test
volumes: *scireum_volumes
when:
event:
- pull_request
- name: compile
image: hub.scireum.com/scireum/sirius-build:latest
commands:
- mvn clean compile
volumes: *scireum_volumes
when:
event:
- push
- name: package_tag
image: hub.scireum.com/scireum/sirius-build:latest
commands:
- sed -i 's/DEVELOPMENT-SNAPSHOT/${DRONE_TAG}/g' pom.xml
- mvn clean package -DskipTests
volumes: *scireum_volumes
when:
event:
- tag
- name: package_master
image: hub.scireum.com/scireum/sirius-build:latest
commands:
- mvn clean package -DskipTests
volumes: *scireum_volumes
when:
branch:
- master
event:
- push
- name: publish_master
image: plugins/docker
settings:
repo: scireum/woody
tags:
- latest
environment:
DOCKER_PASSWORD:
from_secret: dockerhub_docker_password
DOCKER_USERNAME:
from_secret: dockerhub_docker_username
volumes: *scireum_volumes
when:
branch:
- master
event:
- push
- name: publish_tag
image: plugins/docker
settings:
repo: scireum/woody
tags:
- ${DRONE_TAG}
environment:
DOCKER_PASSWORD:
from_secret: dockerhub_docker_password
DOCKER_USERNAME:
from_secret: dockerhub_docker_username
volumes: *scireum_volumes
when:
event:
- tag
volumes:
- name: docker_socket
host:
path: /var/run/docker.sock
- name: m2
host:
path: /root/.m2