implement deploy pipe
This commit is contained in:
29
.drone.yml
29
.drone.yml
@@ -29,3 +29,32 @@ steps:
|
|||||||
from_secret: sonar_instance_url
|
from_secret: sonar_instance_url
|
||||||
SONAR_LOGIN_KEY:
|
SONAR_LOGIN_KEY:
|
||||||
from_secret: sonar_login_key
|
from_secret: sonar_login_key
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
kind: pipeline
|
||||||
|
name: deploy
|
||||||
|
type: docker
|
||||||
|
platform:
|
||||||
|
os: linux
|
||||||
|
arch: arm64
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
event:
|
||||||
|
- promote
|
||||||
|
target:
|
||||||
|
- production
|
||||||
|
|
||||||
|
steps:
|
||||||
|
# skip all previous steps because they were already ran in the "build" phase; we don't need to re-analyze the code.
|
||||||
|
|
||||||
|
# upload to maven repository
|
||||||
|
- name: maven-deploy
|
||||||
|
image: maven:3-eclipse-temurin-21
|
||||||
|
commands:
|
||||||
|
- 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
|
||||||
|
20
settings.xml
Normal file
20
settings.xml
Normal 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>
|
||||||
|
|
Reference in New Issue
Block a user