diff --git a/Jenkinsfile b/Jenkinsfile index 2174bd4528ac49e8e76db0eabbee393872119a69..3b97b49791d9b7b5bac89d7534a7e497d4c666f7 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -32,7 +32,29 @@ pipeline { } } - stage('build pluto') { + stage('deploy pluto-interface'){ + when { + anyOf { + branch 'master' + branch 'release' + branch 'nexus' + } + } + steps { + script { + FAILED_STAGE = env.STAGE_NAME + } + container('maven-11') { + dir('pluto-interface') { + configFileProvider([configFile(fileId: '9aac2fac-7d8d-4128-846b-0a61951df703', variable: 'MAVEN_SETTINGS')]) { + sh 'mvn -s $MAVEN_SETTINGS -DskipTests deploy' + } + } + } + } + } + + stage('build pluto-server') { steps { script { FAILED_STAGE=env.STAGE_NAME @@ -46,6 +68,28 @@ pipeline { } } + stage('deploy pluto-server'){ + when { + anyOf { + branch 'master' + branch 'release' + branch 'nexus' + } + } + steps { + script { + FAILED_STAGE = env.STAGE_NAME + } + container('maven-11') { + dir('pluto-server') { + configFileProvider([configFile(fileId: '9aac2fac-7d8d-4128-846b-0a61951df703', variable: 'MAVEN_SETTINGS')]) { + sh 'mvn -s $MAVEN_SETTINGS -DskipTests deploy' + } + } + } + } + } + stage('openshift deploy') { steps { script { diff --git a/pluto-interface/pom.xml b/pluto-interface/pom.xml index a781f91185d97092ed50208b81d2c4f81fd98eaa..f872b16956f6250862d37b99b60cea9973e5f5a0 100644 --- a/pluto-interface/pom.xml +++ b/pluto-interface/pom.xml @@ -86,4 +86,24 @@ </plugins> </build> + <repositories> + <repository> + <id>ozg-nexus</id> + <name>ozg nexus</name> + <url>https://nexus.ozg-sh.de/repository/ozg-group/</url> + </repository> + </repositories> + + <distributionManagement> + <repository> + <id>ozg-nexus</id> + <name>ozg-releases</name> + <url>https://nexus.ozg-sh.de/repository/ozg-releases/</url> + </repository> + <snapshotRepository> + <id>ozg-nexus</id> + <name>ozg-snapshots</name> + <url>https://nexus.ozg-sh.de/repository/ozg-snapshots/</url> + </snapshotRepository> + </distributionManagement> </project> \ No newline at end of file diff --git a/pluto-server/pom.xml b/pluto-server/pom.xml index 9f326c39cc36ee9bc658e3178b3323e25b1343a1..2a85104884e5127c54f7c6f66e8bf8eeffa62865 100644 --- a/pluto-server/pom.xml +++ b/pluto-server/pom.xml @@ -180,39 +180,6 @@ </configuration> </plugin> - <plugin> - <groupId>com.spotify</groupId> - <artifactId>dockerfile-maven-plugin</artifactId> - <version>1.4.13</version> - <configuration> - <username>admin</username> - <password>admin</password> - <repository>default-route-openshift-image-registry.apps.lab.okd.local/sh-kiel-dev/pluto</repository> - <tag>${git.branch}-${project.version}</tag> - <useMavenSettingsForAuth>true</useMavenSettingsForAuth> - <buildArgs> - <JAR_FILE>target/${project.build.finalName}.jar</JAR_FILE> - </buildArgs> - </configuration> - <executions> - <execution> - <id>default</id> - <phase>deploy</phase> - <goals> - <goal>build</goal> - <goal>tag</goal> - <goal>push</goal> - </goals> - </execution> - </executions> - <dependencies> - <dependency> - <groupId>javax.activation</groupId> - <artifactId>activation</artifactId> - <version>1.1.1</version> - </dependency> - </dependencies> - </plugin> <plugin> <groupId>pl.project13.maven</groupId> <artifactId>git-commit-id-plugin</artifactId> @@ -231,5 +198,69 @@ </plugin> </plugins> </build> + + <repositories> + <repository> + <id>ozg-nexus</id> + <name>ozg nexus</name> + <url>https://nexus.ozg-sh.de/repository/ozg-group/</url> + </repository> + </repositories> + + <distributionManagement> + <repository> + <id>ozg-nexus</id> + <name>ozg-releases</name> + <url>https://nexus.ozg-sh.de/repository/ozg-releases/</url> + </repository> + <snapshotRepository> + <id>ozg-nexus</id> + <name>ozg-snapshots</name> + <url>https://nexus.ozg-sh.de/repository/ozg-snapshots/</url> + </snapshotRepository> + </distributionManagement> + + <profiles> + <profile> + <id>docker-build</id> + <build> + <plugins> + <plugin> + <groupId>com.spotify</groupId> + <artifactId>dockerfile-maven-plugin</artifactId> + <version>1.4.13</version> + <configuration> + <username>admin</username> + <password>admin</password> + <repository>default-route-openshift-image-registry.apps.lab.okd.local/sh-kiel-dev/pluto</repository> + <tag>${git.branch}-${project.version}</tag> + <useMavenSettingsForAuth>true</useMavenSettingsForAuth> + <buildArgs> + <JAR_FILE>target/${project.build.finalName}.jar</JAR_FILE> + </buildArgs> + </configuration> + <executions> + <execution> + <id>default</id> + <phase>deploy</phase> + <goals> + <goal>build</goal> + <goal>tag</goal> + <goal>push</goal> + </goals> + </execution> + </executions> + <dependencies> + <dependency> + <groupId>javax.activation</groupId> + <artifactId>activation</artifactId> + <version>1.1.1</version> + </dependency> + </dependencies> + </plugin> + </plugins> + </build> + </profile> + </profiles> </project>