Skip to content

Commit

Permalink
#5 Ensure we only build and push an image once tests have run and pas…
Browse files Browse the repository at this point in the history
…sed correctly

By default jib only depends on building the production classes; so will start pushing in parallel even if tests fail.
  • Loading branch information
chadlwilson committed Nov 10, 2021
1 parent cf457de commit 958633b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ plugins {
id("com.adarshr.test-logger") version "3.1.0"
id("com.google.cloud.tools.jib") version "3.1.4"
id("com.github.ben-manes.versions") version "0.39.0"
id("org.barfuin.gradle.taskinfo") version "1.0.5"
jacoco
}

Expand Down Expand Up @@ -158,6 +159,11 @@ jib {
}
}

// Jib task pushes an image. Only do so after running all checks
tasks.jib.configure {
dependsOn(tasks.check)
}

// use different naming when building locally, to avoid confusion
tasks.jibDockerBuild.configure {
jib {
Expand Down

0 comments on commit 958633b

Please sign in to comment.