Commit 5238c35c authored by Josh Steinberg's avatar Josh Steinberg

edit jenkinsfile adn pom plugins

parent 2c97f41c
...@@ -20,10 +20,19 @@ pipeline { ...@@ -20,10 +20,19 @@ pipeline {
} }
stage('Build') { stage('Build') {
steps { steps {
sh 'mvn -Dmaven.test.failure.ignore=false install' sh 'mvn -B -DskipTests clean package'
}
}
stage('Test'){
steps{
sh 'mvn test'
}
post {
always {
junit 'target/surefire-reports/*.xml'
}
} }
} }
stage('Sonarqube'){ stage('Sonarqube'){
steps{ steps{
withSonarQubeEnv('sonar'){ withSonarQubeEnv('sonar'){
...@@ -48,7 +57,7 @@ pipeline { ...@@ -48,7 +57,7 @@ pipeline {
artifactExists = fileExists artifactPath; artifactExists = fileExists artifactPath;
if(artifactExists) { if(artifactExists) {
echo "*** File: ${artifactPath}, group: ${pom.groupId}, packaging: ${pom.packaging}, version ${pom.version}"; echo "*** File: ${artifactPath}, group: ${pom.groupId}, packaging: ${pom.packaging}, version ${pom.version}";
nexusArtifactUploader{ nexusArtifactUploader(
nexusVersion: NEXUS_VERSION, nexusVersion: NEXUS_VERSION,
protocol: NEXUS_PROTOCOL, protocol: NEXUS_PROTOCOL,
nexusUrl: NEXUS_URL, nexusUrl: NEXUS_URL,
...@@ -66,7 +75,7 @@ pipeline { ...@@ -66,7 +75,7 @@ pipeline {
file: "pom.xml", file: "pom.xml",
type: "pom"] type: "pom"]
] ]
}; );
} else { } else {
error "*** File: ${artifactPath}, could not be found"; error "*** File: ${artifactPath}, could not be found";
} }
......
...@@ -47,6 +47,11 @@ ...@@ -47,6 +47,11 @@
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId> <artifactId>spring-boot-maven-plugin</artifactId>
</plugin> </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M7</version>
</plugin>
</plugins> </plugins>
<pluginManagement> <pluginManagement>
<plugins> <plugins>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment