Skip to content
Snippets Groups Projects
Commit e913187d authored by OZGCloud's avatar OZGCloud
Browse files

OZG-1517 make test running in new module; cleanup jenkinsfile

parent bd3fa4c1
No related branches found
No related tags found
No related merge requests found
...@@ -62,54 +62,12 @@ pipeline { ...@@ -62,54 +62,12 @@ pipeline {
sh 'mvn --version' sh 'mvn --version'
configFileProvider([configFile(fileId: 'maven-settings', variable: 'MAVEN_SETTINGS')]) { configFileProvider([configFile(fileId: 'maven-settings', variable: 'MAVEN_SETTINGS')]) {
sh 'mvn -s $MAVEN_SETTINGS clean install -Dmaven.wagon.http.retryHandler.count=3' sh 'mvn -s $MAVEN_SETTINGS clean install -Dmaven.wagon.http.retryHandler.count=3'
/* script {
try {
if (env.BRANCH_NAME == 'master') {
withSonarQubeEnv('sonarqube-ozg-sh'){
sh 'mvn -s $MAVEN_SETTINGS sonar:sonar'
}
}
} catch (Exception e) {
unstable("SonarQube failed")
}
}
}*/
} }
} }
} }
} }
/* stage('Build Pluto-Interface') {
steps {
script {
FAILED_STAGE=env.STAGE_NAME
}
container("maven-17"){
sh 'mvn --version'
dir('pluto-interface') {
configFileProvider([configFile(fileId: 'maven-settings', variable: 'MAVEN_SETTINGS')]) {
sh 'mvn -s $MAVEN_SETTINGS clean install -Dmaven.wagon.http.retryHandler.count=3'
script {
try {
if (env.BRANCH_NAME == 'master') {
withSonarQubeEnv('sonarqube-ozg-sh'){
sh 'mvn -s $MAVEN_SETTINGS sonar:sonar'
}
}
} catch (Exception e) {
unstable("SonarQube failed")
}
}
}
}
}
}
}*/
stage('Deploy to Nexus'){ stage('Deploy to Nexus'){
when { when {
anyOf { anyOf {
...@@ -130,127 +88,6 @@ pipeline { ...@@ -130,127 +88,6 @@ pipeline {
} }
} }
/* stage('Deploy Pluto-Interface to Nexus'){
when {
anyOf {
branch 'master'
branch 'release'
}
}
steps {
script {
FAILED_STAGE = env.STAGE_NAME
}
container('maven-17') {
dir('pluto-interface') {
configFileProvider([configFile(fileId: 'maven-settings', variable: 'MAVEN_SETTINGS')]) {
sh 'mvn -s $MAVEN_SETTINGS -DskipTests clean deploy'
}
}
}
}
}
stage('Build Mail-Service') {
steps {
script {
FAILED_STAGE=env.STAGE_NAME
}
container("maven-17"){
sh 'mvn --version'
dir('mail-service') {
configFileProvider([configFile(fileId: 'maven-settings', variable: 'MAVEN_SETTINGS')]) {
sh 'mvn -s $MAVEN_SETTINGS clean install spring-boot:build-image -Dmaven.wagon.http.retryHandler.count=3'
script {
try {
if (env.BRANCH_NAME == 'master') {
withSonarQubeEnv('sonarqube-ozg-sh'){
sh 'mvn -s $MAVEN_SETTINGS sonar:sonar'
}
}
} catch (Exception e) {
unstable("SonarQube failed")
}
}
}
}
}
}
}
stage('Deploy mail-service to Nexus'){
when {
anyOf {
branch 'master'
branch 'release'
}
}
steps {
script {
FAILED_STAGE = env.STAGE_NAME
}
container('maven-17') {
dir('mail-service') {
configFileProvider([configFile(fileId: 'maven-settings', variable: 'MAVEN_SETTINGS')]) {
sh 'mvn -s $MAVEN_SETTINGS -DskipTests deploy'
}
}
}
}
}
stage('Build Pluto-Server') {
steps {
script {
FAILED_STAGE=env.STAGE_NAME
}
container("maven-17"){
sh 'mvn --version'
dir('pluto-server') {
configFileProvider([configFile(fileId: 'maven-settings', variable: 'MAVEN_SETTINGS')]) {
sh 'mvn -s $MAVEN_SETTINGS clean install spring-boot:build-image -Dmaven.wagon.http.retryHandler.count=3'
script {
try {
if (env.BRANCH_NAME == 'master') {
withSonarQubeEnv('sonarqube-ozg-sh'){
sh 'mvn -s $MAVEN_SETTINGS sonar:sonar'
}
}
} catch (Exception e) {
unstable("SonarQube failed")
}
}
}
}
}
}
}
stage('Deploy Pluto-Server to Nexus'){
when {
anyOf {
branch 'master'
branch 'release'
}
}
steps {
script {
FAILED_STAGE = env.STAGE_NAME
}
container('maven-17') {
dir('pluto-server') {
configFileProvider([configFile(fileId: 'maven-settings', variable: 'MAVEN_SETTINGS')]) {
sh 'mvn -s $MAVEN_SETTINGS -DskipTests deploy'
}
}
}
}
}*/
stage('Build Docker image') { stage('Build Docker image') {
steps { steps {
......
...@@ -3,3 +3,4 @@ lombok.log.slf4j.flagUsage = ERROR ...@@ -3,3 +3,4 @@ lombok.log.slf4j.flagUsage = ERROR
lombok.log.log4j.flagUsage = ERROR lombok.log.log4j.flagUsage = ERROR
lombok.data.flagUsage = ERROR lombok.data.flagUsage = ERROR
lombok.nonNull.exceptionType = IllegalArgumentException lombok.nonNull.exceptionType = IllegalArgumentException
lombok.addLombokGeneratedAnnotation = true
\ No newline at end of file
...@@ -17,6 +17,13 @@ ...@@ -17,6 +17,13 @@
<pluto.version>0.25.0-SNAPSHOT</pluto.version> <pluto.version>0.25.0-SNAPSHOT</pluto.version>
<maven-compiler-plugin.version>3.10.1</maven-compiler-plugin.version> <maven-compiler-plugin.version>3.10.1</maven-compiler-plugin.version>
<maven-jar-plugin.version>3.2.2</maven-jar-plugin.version>
<maven-surefire-plugin.version>3.0.0-M7</maven-surefire-plugin.version>
<maven-failsafe-plugin.version>3.0.0-M7</maven-failsafe-plugin.version>
<jacoco.plugin.version>0.8.8</jacoco.plugin.version>
<lombok.version>1.18.24</lombok.version>
</properties> </properties>
<dependencies> <dependencies>
...@@ -72,6 +79,7 @@ ...@@ -72,6 +79,7 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId> <artifactId>maven-jar-plugin</artifactId>
<version>${maven-jar-plugin.version}</version>
<executions> <executions>
<execution> <execution>
<goals> <goals>
...@@ -83,6 +91,7 @@ ...@@ -83,6 +91,7 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
<configuration> <configuration>
<source>${java.version}</source> <source>${java.version}</source>
<target>${java.version}</target> <target>${java.version}</target>
...@@ -115,6 +124,60 @@ ...@@ -115,6 +124,60 @@
<generatedSourcesDirectory>target/generated-sources</generatedSourcesDirectory> <generatedSourcesDirectory>target/generated-sources</generatedSourcesDirectory>
</configuration> </configuration>
</plugin> </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven-surefire-plugin.version}</version>
<configuration>
<argLine>
${surefire.jacoco.args}
</argLine>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>${maven-failsafe-plugin.version}</version>
<configuration>
<argLine>
${surefire.jacoco.args}
</argLine>
<classesDirectory>${project.build.outputDirectory}</classesDirectory>
</configuration>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco.plugin.version}</version>
<executions>
<execution>
<id>start-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
<configuration>
<propertyName>surefire.jacoco.args</propertyName>
</configuration>
</execution>
<execution>
<id>generate-report</id>
<phase>package</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins> </plugins>
</build> </build>
</project> </project>
\ No newline at end of file
org.mockito.junit.jupiter.MockitoExtension
\ No newline at end of file
junit.jupiter.extensions.autodetection.enabled = true
\ 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