Skip to content

Commit

Permalink
Removed integrations tests execution by default
Browse files Browse the repository at this point in the history
The current integration tests require a specific google infra to be
available. Preventing them to be executed by default prevents false
failure to happen.

In Maven lifecycle, verify comes after package. Executing one shell with
package and another one with verify re-execute unit-tests for nothing.
Finxing this by calling only once verify phase.
  • Loading branch information
alecharp committed Nov 19, 2019
1 parent fc0b8db commit 0c299e9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 14 deletions.
25 changes: 11 additions & 14 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,18 @@ pipeline {

stages {
stage("Build and test") {
agent {
kubernetes {
cloud 'kubernetes'
label 'maven-pod'
yamlFile 'jenkins/maven-pod.yaml'
}
}
steps {
container('maven') {
agent {
kubernetes {
cloud 'kubernetes'
label 'maven-pod'
yamlFile 'jenkins/maven-pod.yaml'
}
}
steps {
container('maven') {
withCredentials([[$class: 'StringBinding', credentialsId: env.GCS_IT_CRED_ID, variable: 'GOOGLE_CREDENTIALS']]) {
// build
sh "mvn clean package -ntp"

// run tests
sh "mvn verify -ntp"
// build
sh "mvn verify -ntp -DskipIts=false"
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
<java.level>8</java.level>
<pipeline-model-definition.version>1.3.8</pipeline-model-definition.version>
<concurrency>5</concurrency>
<skipIts>true</skipIts>
<fasterxml.jackson.version>2.10.0</fasterxml.jackson.version>
</properties>

Expand Down Expand Up @@ -334,6 +335,7 @@
</execution>
</executions>
<configuration>
<skipITs>${skipIts}</skipITs>
<disableXmlReport>true</disableXmlReport>
<useFile>false</useFile>
</configuration>
Expand Down

0 comments on commit 0c299e9

Please sign in to comment.