Update DroneCI configuration, include settings.xml
Some checks failed
continuous-integration/drone/push Build is passing
continuous-integration/drone Build is failing

This commit is contained in:
Bea 2023-01-15 21:38:50 +01:00
parent 99a92badc2
commit 3acab18ff2
2 changed files with 26 additions and 22 deletions

View File

@ -10,31 +10,15 @@ load: yes
steps:
- name: maven-auth
image: robertstettner/drone-mvn-auth
pull: true
servers:
from_secret: maven_servers
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:
- cat settings.xml
- mvn deploy --no-transfer-progress -DskipTests=true -Dmaven.javadoc.skip=true -B -V -gs settings.xml
- mvn deploy --no-transfer-progress -DskipTests=true -Dmaven.javadoc.skip=true -B -V -gs settings.xml -Dmaven.repo.username=$MAVEN_REPO_USERNAME -Dmaven.repo.password=$MAVEN_REPO_PASSWORD
environment:
MAVEN_REPO_USERNAME:
from_secret: maven_repo_username
MAVEN_REPO_PASSWORD:
from_secret: maven_repo_password
when:
event:
- promote

20
settings.xml Normal file
View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd">
<servers>
<server>
<id>nexus-snapshots</id>
<username>${maven.repo.username}</username>
<password>${maven.repo.password}</password>
</server>
<server>
<id>nexus-releases</id>
<username>${maven.repo.username}</username>
<password>${maven.repo.password}</password>
</server>
</servers>
</settings>