-
Notifications
You must be signed in to change notification settings - Fork 89
/
.drone.yml
97 lines (87 loc) · 2.13 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
---
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: compile
image: scireum/sirius-build-jdk22:latest
commands:
- mvn clean compile
volumes: *scireum_volumes
when:
event:
- push
- name: test
image: scireum/sirius-build-jdk22:latest
commands:
- mvn clean test
volumes: *scireum_volumes
when:
event:
- pull_request
- name: sonar
image: scireum/sirius-build-jdk22:latest
commands:
- "sed -i 's/DEVELOPMENT-SNAPSHOT/${DRONE_TAG}/g' pom.xml"
- "mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent test sonar:sonar -Dsonar.projectKey=${DRONE_REPO_NAME}"
volumes: *scireum_volumes
when:
event:
- tag
- name: package
image: scireum/sirius-build-jdk22:latest
commands:
- "sed -i 's/DEVELOPMENT-SNAPSHOT/${DRONE_TAG}/g' pom.xml"
- mvn clean package -DskipTests
volumes: *scireum_volumes
when:
event:
- tag
- name: publish
image: jgescireum/buildx:latest
settings:
repo: scireum/s3-ninja
platforms:
- linux/amd64
- linux/arm64
tags:
- scireum/s3-ninja:latest
- scireum/s3-ninja:${DRONE_TAG}
environment:
DOCKER_PASSWORD:
from_secret: docker_password
DOCKER_USERNAME:
from_secret: docker_username
volumes: *scireum_volumes
when:
event:
- tag
- name: site
image: scireum/sirius-build-jdk22:latest
commands:
- "echo \"$SSH_KEY\" > /tmp/sshkey"
- chmod 600 /tmp/sshkey
- "rsync -e 'ssh -i /tmp/sshkey -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no' -r --delete src/site/ ssh-w0158395@w0158395.kasserver.com:/www/htdocs/w0158395/s3ninja.net/"
environment:
SSH_KEY:
from_secret: kass_server_ssh_key
volumes: *scireum_volumes
when:
event:
- tag
volumes:
- name: docker_socket
host:
path: /var/run/docker.sock
- name: m2
host:
path: /root/.m2