-
Notifications
You must be signed in to change notification settings - Fork 3
/
.drone.yml
64 lines (59 loc) · 1.62 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
---
kind: pipeline
type: kubernetes
name: default
# remove this section if your CPU is amd64
platform:
os: linux
arch: arm64
steps:
# Step 1
# - name: ensure nexus is available
# image: alpine
# pull: if-not-exists
# commands:
# - apk update
# - apk add curl bash
# - until [ "$(curl -o /dev/null -s -w '%{http_code}' $MAVEN_MIRROR_URL )" -eq 200 ]; do sleep 5;echo "."; done
# environment:
# MAVEN_MIRROR_URL: "http://nexus.infra:8081/repository/maven-public/"
# Step 2
- name: java-build
image: kameshsampath/drone-java-maven-plugin:v1.0.3
pull: if-not-exists
settings:
maven_mirror_url:
from_secret: maven_mirror_url
goals:
- -DskipTests
- clean
- install
# Step 3
- name: publish
image: plugins/docker:20.13
pull: if-not-exists
settings:
auto_tag: false
auto_tag_suffix: linux-arm64
tags: "latest"
dockerfile: Dockerfile
insecure: true
username: admin
# from_secret: image_registry_user
password: admin123
# from_secret: image_registry_password
registry: nexus.infra.svc.cluster.local
# from_secret: image_registry
repo: nexus.infra.svc.cluster.local/example/quarkus-springboot-demo
# from_secret: destination_image
# Trigger only main
trigger:
branch:
- main
# Ensuring the local gitea is reachable
host_aliases:
# IMPORTANT: update to match your settings
# export GITEA_HTTP_CLUSTER_IP=$(kubectl get -n default svc gitea-http -ojsonpath='{.spec.clusterIP}')
- ip: 10.43.99.186
hostnames:
- gitea-127.0.0.1.sslip.io