Skip to content

Commit

Permalink
Merge pull request #72 from stakater/add-skip-tests-gobuild
Browse files Browse the repository at this point in the history
Add skip tests goBuildViaGoReleaser
  • Loading branch information
kahootali authored Jul 15, 2020
2 parents a031afb + 3afda8b commit 165660a
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions vars/goBuildViaGoReleaser.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ def call(body) {
body()

toolsImage = config.toolsImage ?: 'stakater/pipeline-tools:v2.0.18'
skipTests = config.skipTests ?: false

toolsNode(toolsImage: toolsImage) {
container(name: 'tools') {
Expand Down Expand Up @@ -66,11 +67,13 @@ def call(body) {
"""
}

stage('Run Tests') {
sh """
cd ${goProjectDir}
make test
"""
if(!skipTests) {
stage('Run Tests') {
sh """
cd ${goProjectDir}
make test
"""
}
}

if (utils.isCI()) {
Expand Down

0 comments on commit 165660a

Please sign in to comment.