forked from Judge-Girl/Judge-Girl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.drone.yml
65 lines (60 loc) · 1.4 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
kind: pipeline
type: docker
name: Judge-Girl/Judge-Girl
steps:
- name: Integration
image: openjdk:11-jdk-slim-buster
volumes:
- name: shared-folder
path: /drone/src/target
- name: secret
path: /tmp/secret
- name: dockersock
path: /var/run
- name: maven-cache
path: /root/.m2
commands:
- apt update && apt install git -y
- git submodule update --recursive --init
- cp -r /tmp/secret/* ./
- ./mvnw package
- name: Image Building
image: docker/compose:1.29.2
volumes:
- name: dockersock
path: /var/run
- name: shared-folder
path: /drone/src/target
commands:
- cd Judger && docker build . -t judger -f Dockerfile.cqi && cd .. && docker-compose -f services.yml build
when:
event: push
- name: Deploy
image: docker/compose:1.29.2
volumes:
- name: dockersock
path: /var/run
commands:
- docker network create judge-girl || echo 'Docker Network "judge-girl" already exists'
- docker-compose -f infra.yml up -d && sleep 15
- docker-compose -f services.yml down
- docker-compose -f services.yml up -d
when:
event: push
volumes:
- name: dockersock
host:
path: /var/run/
- name: secret
host:
path: /root/drone/judgegirl/judge-girl-secrets/
- name: shared-folder
temp: {}
- name: maven-cache
host:
path: /root/.m2
trigger:
event:
- push
- pull_request
branch: master