-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy path.drone.yml
40 lines (36 loc) · 1.06 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
pipeline:
restore_cache:
restore: true
path: /m2-cache/core/
image: plugins/s3-cache
secrets: ["cache_s3_endpoint", "cache_s3_access_key", "cache_s3_secret_key"]
test:
image: maven:3-jdk-8-slim
commands:
- mvn clean test -B -Dmaven.repo.local=./m2
deploy_snapshot:
image: maven:3-jdk-8-slim
secrets: [m2_settings]
commands:
- echo $M2_SETTINGS > $HOME/.m2/settings.xml
- mvn install -B -Pwith-sources,with-javadoc,deploy-nexus -Dmaven.repo.local=./m2
when:
branch: master
event: push
deploy_release:
image: maven:3-jdk-8-slim
secrets: [m2_settings]
commands:
- echo $M2_SETTINGS > $HOME/.m2/settings.xml
- mvn install -B -Pwith-sources,with-javadoc,deploy-nexus-release -Dmaven.repo.local=./m2
when:
branch: [release/*]
event: deployment
environment: releases
rebuild_cache:
path: /m2-cache/core/
rebuild: true
image: plugins/s3-cache
secrets: ["cache_s3_endpoint", "cache_s3_access_key", "cache_s3_secret_key"]
mount:
- ./m2