2022-08-25 22:14:48 +02:00
|
|
|
kind: pipeline
|
|
|
|
name: default
|
|
|
|
|
|
|
|
trigger:
|
|
|
|
branch:
|
|
|
|
- main
|
|
|
|
|
2023-01-15 21:06:01 +01:00
|
|
|
load: yes
|
|
|
|
|
2022-08-25 22:14:48 +02:00
|
|
|
steps:
|
|
|
|
- name: build
|
|
|
|
image: maven:3-eclipse-temurin-16
|
|
|
|
commands:
|
2023-01-15 21:06:01 +01:00
|
|
|
- mvn package --no-transfer-progress -DskipTests=true -Dmaven.javadoc.skip=true -B -V
|
|
|
|
|
|
|
|
|
|
|
|
- name: test
|
|
|
|
image: maven:3-eclipse-temurin-16
|
|
|
|
commands:
|
2023-01-15 21:07:41 +01:00
|
|
|
- mvn test --no-transfer-progress -B
|
2023-01-14 21:49:47 +01:00
|
|
|
|
|
|
|
- name: code-analysis
|
2023-01-14 23:27:50 +01:00
|
|
|
image: maven:3-eclipse-temurin-16
|
|
|
|
commands:
|
2023-01-15 21:09:03 +01:00
|
|
|
- mvn sonar:sonar --no-transfer-progress -Dsonar.projectKey=$SONAR_PROJECT_KEY -Dsonar.host.url=$SONAR_INSTANCE_URL -Dsonar.login=$SONAR_LOGIN_KEY
|
|
|
|
environment:
|
|
|
|
SONAR_PROJECT_KEY:
|
|
|
|
from_secret: sonar_project_key
|
|
|
|
SONAR_INSTANCE_URL:
|
|
|
|
from_secret: sonar_instance_url
|
|
|
|
SONAR_LOGIN_KEY:
|
|
|
|
from_secret: sonar_login_key
|
2023-01-15 17:53:07 +01:00
|
|
|
|
2023-01-15 21:06:01 +01:00
|
|
|
- name: maven-auth
|
|
|
|
image: robertstettner/drone-mvn-auth
|
|
|
|
pull: true
|
|
|
|
servers:
|
|
|
|
- id: nexus
|
|
|
|
username: ${NEXUS_USERNAME}
|
|
|
|
password: ${NEXUS_PASSWORD}
|
|
|
|
profiles:
|
|
|
|
- id: default
|
|
|
|
repositories:
|
|
|
|
- id: nexus-releases
|
|
|
|
name: Nexus Releases
|
|
|
|
url: https://nexus.beatrice.wtf/repository/maven-releases/
|
|
|
|
layout: default
|
|
|
|
active_profiles:
|
|
|
|
- default
|
|
|
|
when:
|
|
|
|
event:
|
|
|
|
- promote
|
|
|
|
target:
|
|
|
|
- production
|
|
|
|
|
|
|
|
- name: maven-deploy
|
|
|
|
image: maven:3-eclipse-temurin-16
|
|
|
|
commands:
|
|
|
|
- mvn deploy --no-transfer-progress -DskipTests=true -Dmaven.javadoc.skip=true -B -V
|
|
|
|
when:
|
|
|
|
event:
|
|
|
|
- promote
|
|
|
|
target:
|
|
|
|
- production
|