Skip to content
Snippets Groups Projects
Commit db9572d1 authored by Lukas Malte Monnerjahn's avatar Lukas Malte Monnerjahn
Browse files

Merge pull request 'KOP-2330 KOP-2331 Deployment auf Artifactory und Nexus'...

Merge pull request 'KOP-2330 KOP-2331 Deployment auf Artifactory und Nexus' (#2) from KOP-2331-deployment-from-pipeline into main

Reviewed-on: https://git.ozg-sh.de/ozgcloud-lib/xta-client-lib/pulls/2


Reviewed-by: default avatarJörg Bolay <joerg.bolay@dataport.de>
parents 49206403 21e168f8
Branches
Tags
No related merge requests found
......@@ -3,6 +3,9 @@ target/
.project
.settings
.gitlab-ci-local
.m2/
!.m2/settings.xml
.mvn/
# IDE
.settings/
......
......@@ -2,6 +2,7 @@ image: dimage-base-release.repo-ex.zcdi.dataport.de/sdks/maven:3.9.2-java-21
variables:
MAVEN_CLI_OPTS: "-s .m2/settings.xml --batch-mode"
MAVEN_DEPLOY_CLI_OPTS: "--no-transfer-progress"
MAVEN_OPTS: "-Dmaven.repo.local=.m2/repository"
cache:
......@@ -13,9 +14,26 @@ cache:
package:
stage: build
script:
- export DATAPORT_PROXY=$DATAPORT_PROXY
- export DATAPORT_PROXY_CLI=$DATAPORT_PROXY
- mvn $MAVEN_CLI_OPTS package
artifacts:
paths:
- target/*.jar
rules:
- if: $CI_COMMIT_BRANCH != "main"
deploy_to_artifactory:
stage: deploy
script:
- export DATAPORT_PROXY_CLI=$DATAPORT_PROXY
- mvn -P artifactory-deploy $MAVEN_DEPLOY_CLI_OPTS $MAVEN_CLI_OPTS deploy
only:
- main
deploy_to_nexus:
stage: deploy
script:
- export DATAPORT_PROXY_CLI=$DATAPORT_PROXY
- mvn -P nexus-deploy $MAVEN_DEPLOY_CLI_OPTS $MAVEN_CLI_OPTS deploy
only:
- main
......@@ -12,6 +12,16 @@
<username>${env.Artifactory_REPO_USER}</username>
<password>${env.Artifactory_REPO_PASS}</password>
</server>
<server>
<id>ozg-nexus</id>
<username>${env.Nexus_REPO_USER}</username>
<password>${env.Nexus_REPO_PASS}</password>
</server>
<server>
<id>ozg-snapshots-nexus</id>
<username>${env.Nexus_REPO_USER}</username>
<password>${env.Nexus_REPO_PASS}</password>
</server>
</servers>
<profiles>
<profile>
......@@ -39,7 +49,7 @@
<id>dataport-proxy</id>
<active>true</active>
<protocol>http</protocol>
<host>${env.DATAPORT_PROXY}</host>
<host>${env.DATAPORT_PROXY_CLI}</host>
<port>${env.DATAPORT_PROXY_PORT}</port>
<nonProxyHosts>localhost,127.0.0.1,*.dataport.de</nonProxyHosts>
</proxy>
......
......@@ -14,4 +14,43 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<profiles>
<!-- Deployment Profiles -->
<profile>
<id>artifactory-deploy</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<distributionManagement>
<repository>
<id>artifactory</id>
<name>artifactory</name>
<url>${env.DATAPORT_ARTIFACTORY_URL}</url>
</repository>
<snapshotRepository>
<id>artifactory-snapshots</id>
<name>artifactory-snapshots</name>
<url>${env.DATAPORT_ARTIFACTORY_URL}</url>
</snapshotRepository>
</distributionManagement>
</profile>
<profile>
<id>nexus-deploy</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<distributionManagement>
<repository>
<id>ozg-nexus</id>
<name>ozg-releases</name>
<url>https://nexus.ozg-sh.de/repository/ozg-releases/</url>
</repository>
<snapshotRepository>
<id>ozg-snapshots-nexus</id>
<name>ozg-snapshots</name>
<url>https://nexus.ozg-sh.de/repository/ozg-snapshots/</url>
</snapshotRepository>
</distributionManagement>
</profile>
</profiles>
</project>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment