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

KOP-2907 Code-SH CI Pipeline

parent f3422781
No related branches found
No related tags found
No related merge requests found
Pipeline #1751 failed
image: dimage-base-release.repo-ex.zcdi.dataport.de/sdks/maven:3.9.2-java-21 image: maven:3.9.9-eclipse-temurin-21-alpine
variables: variables:
MAVEN_CLI_OPTS: "-s .m2/settings.xml --batch-mode" MAVEN_DEPLOY_CLI_OPTS: "--no-transfer-progress -DskipTests"
MAVEN_DEPLOY_CLI_OPTS: "--no-transfer-progress" MAVEN_CLI_OPTS: >-
MAVEN_OPTS: "-Dmaven.repo.local=.m2/repository" -s .m2/ci_settings.xml --batch-mode
-Dmaven.plugin.validation=brief
DOCKER_HOST: tcp://docker:2375 DOCKER_HOST: tcp://docker:2375
DOCKER_TLS_CERTDIR: "" DOCKER_TLS_CERTDIR: ""
DOCKER_DRIVER: overlay2 DOCKER_DRIVER: overlay2
services: services:
- name: kopsh-docker-dockerhub.repo-ex.zcdi.dataport.de/docker:dind - docker:dind
alias: docker
cache: cache:
paths: paths:
- .m2/repository/ - .m2/repository/
- target/ - target/
stages:
- build
- test
- publish
package: build:
stage: build stage: build
script: script:
- export DATAPORT_PROXY_CLI=$DATAPORT_PROXY - mvn clean compile $MAVEN_CLI_OPTS
- mvn $MAVEN_CLI_OPTS package
artifacts: artifacts:
paths: paths:
- target/*.jar - target/*.jar
rules:
- if: $CI_COMMIT_BRANCH != "main"
deploy_to_artifactory: test:
stage: deploy stage: test
script:
- mvn test $MAVEN_CLI_OPTS
verify:
stage: test
script: script:
- export DATAPORT_PROXY_CLI=$DATAPORT_PROXY - mvn verify $MAVEN_CLI_OPTS
- mvn -P artifactory-deploy $MAVEN_DEPLOY_CLI_OPTS $MAVEN_CLI_OPTS deploy
snapshot-gitlab:
stage: publish
script:
- mvn deploy -Pgitlab-deploy $MAVEN_DEPLOY_CLI_OPTS $MAVEN_CLI_OPTS
only: only:
- main - main
- release
deploy_to_nexus: snapshot-nexus:
stage: deploy stage: publish
script: script:
- export DATAPORT_PROXY_CLI=$DATAPORT_PROXY - mvn deploy -Pnexus-deploy $MAVEN_DEPLOY_CLI_OPTS $MAVEN_CLI_OPTS
- mvn -P nexus-deploy $MAVEN_DEPLOY_CLI_OPTS $MAVEN_CLI_OPTS deploy
only: only:
- main - main
- release
release-gitlab:
stage: publish
script:
- mvn versions:set -DnewVersion=${CI_COMMIT_TAG} $MAVEN_CLI_OPTS
- mvn deploy -Pgitlab-deploy $MAVEN_DEPLOY_CLI_OPTS $MAVEN_CLI_OPTS
rules:
- if: $CI_COMMIT_TAG
release-nexus:
stage: publish
script:
- mvn versions:set -DnewVersion=${CI_COMMIT_TAG} $MAVEN_CLI_OPTS
- mvn deploy -Pnexus-deploy $MAVEN_DEPLOY_CLI_OPTS $MAVEN_CLI_OPTS
rules:
- if: $CI_COMMIT_TAG
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<settings xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.2.0 http://maven.apache.org/xsd/settings-1.2.0.xsd" xmlns="http://maven.apache.org/SETTINGS/1.2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <settings xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.2.0 http://maven.apache.org/xsd/settings-1.2.0.xsd"
xmlns="http://maven.apache.org/SETTINGS/1.2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<localRepository>.m2/repository</localRepository> <localRepository>.m2/repository</localRepository>
<servers> <servers>
<server>
<id>artifactory</id>
<username>${env.Artifactory_REPO_USER}</username>
<password>${env.Artifactory_REPO_PASS}</password>
</server>
<server>
<id>artifactory-snapshots</id>
<username>${env.Artifactory_REPO_USER}</username>
<password>${env.Artifactory_REPO_PASS}</password>
</server>
<server> <server>
<id>ozg-nexus</id> <id>ozg-nexus</id>
<username>${env.Nexus_REPO_USER}</username> <username>${env.NEXUS_USER}</username>
<password>${env.Nexus_REPO_PASS}</password> <password>${env.NEXUS_PASSWORD}</password>
</server> </server>
<server> <server>
<id>ozg-snapshots-nexus</id> <id>ozg-snapshots-nexus</id>
<username>${env.Nexus_REPO_USER}</username> <username>${env.NEXUS_USER}</username>
<password>${env.Nexus_REPO_PASS}</password> <password>${env.NEXUS_PASSWORD}</password>
</server>
<server>
<id>codesh-gitlab-maven</id>
<configuration>
<httpHeaders>
<property>
<name>Job-Token</name>
<value>${CI_JOB_TOKEN}</value>
</property>
</httpHeaders>
</configuration>
</server> </server>
</servers> </servers>
<profiles> <profiles>
<profile> <profile>
<id>local-build</id> <id>ci-default</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<repositories> <repositories>
<repository>
<id>codesh-gitlab-maven</id>
<url>${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/maven</url>
</repository>
<repository> <repository>
<id>ozg-nexus</id> <id>ozg-nexus</id>
<name>ozg-releases</name> <name>ozg-releases</name>
...@@ -36,33 +46,11 @@ ...@@ -36,33 +46,11 @@
<id>ozg-snapshots-nexus</id> <id>ozg-snapshots-nexus</id>
<name>ozg-snapshots</name> <name>ozg-snapshots</name>
<url>https://nexus.ozg-sh.de/repository/ozg-snapshots/</url> <url>https://nexus.ozg-sh.de/repository/ozg-snapshots/</url>
<snapshots><enabled>true</enabled></snapshots> <snapshots>
</repository> <enabled>true</enabled>
<repository> </snapshots>
<id>artifactory</id>
<name>artifactory</name>
<url>${env.DATAPORT_ARTIFACTORY_URL}</url>
</repository>
<repository>
<id>artifactory-snapshots</id>
<name>artifactory-snapshots</name>
<url>${env.DATAPORT_ARTIFACTORY_URL}</url>
<snapshots><enabled>true</enabled></snapshots>
</repository> </repository>
</repositories> </repositories>
</profile> </profile>
</profiles> </profiles>
<activeProfiles> </settings>
<activeProfile>local-build</activeProfile>
</activeProfiles>
<proxies>
<proxy>
<id>dataport-proxy</id>
<active>true</active>
<protocol>http</protocol>
<host>${env.DATAPORT_PROXY_CLI}</host>
<port>${env.DATAPORT_PROXY_PORT}</port>
<nonProxyHosts>localhost,127.0.0.1,*.dataport.de</nonProxyHosts>
</proxy>
</proxies>
</settings>
\ No newline at end of file
...@@ -327,20 +327,18 @@ ...@@ -327,20 +327,18 @@
<profiles> <profiles>
<!-- Deployment Profiles --> <!-- Deployment Profiles -->
<profile> <profile>
<id>artifactory-deploy</id> <id>gitlab-deploy</id>
<activation> <activation>
<activeByDefault>false</activeByDefault> <activeByDefault>false</activeByDefault>
</activation> </activation>
<distributionManagement> <distributionManagement>
<repository> <repository>
<id>artifactory</id> <id>codesh-gitlab-maven</id>
<name>artifactory</name> <url>${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/maven</url>
<url>${env.DATAPORT_ARTIFACTORY_URL}</url>
</repository> </repository>
<snapshotRepository> <snapshotRepository>
<id>artifactory-snapshots</id> <id>codesh-gitlab-maven</id>
<name>artifactory-snapshots</name> <url>${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/maven</url>
<url>${env.DATAPORT_ARTIFACTORY_URL}</url>
</snapshotRepository> </snapshotRepository>
</distributionManagement> </distributionManagement>
</profile> </profile>
...@@ -364,5 +362,4 @@ ...@@ -364,5 +362,4 @@
</profile> </profile>
</profiles> </profiles>
</project>
</project>
\ No newline at end of file
...@@ -40,5 +40,8 @@ public record XtaMessageMetaData( ...@@ -40,5 +40,8 @@ public record XtaMessageMetaData(
@NotNull @Valid XtaIdentifier authorIdentifier, @NotNull @Valid XtaIdentifier authorIdentifier,
@NotNull @Valid XtaIdentifier readerIdentifier, @NotNull @Valid XtaIdentifier readerIdentifier,
@Nullable @PositiveOrZero BigInteger messageSize @Nullable @PositiveOrZero BigInteger messageSize
// TODO
// DeliveryAttributes.origin
// @Nullable ZonedDateTime deliveryAttributesOrigin;
) { ) {
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment