Allow spring-boot-image-tests to run without an existing snapshot
Closes gh-28817
This commit is contained in:
@@ -32,6 +32,7 @@ import com.github.dockerjava.api.model.ContainerConfig;
|
||||
import org.assertj.core.api.Condition;
|
||||
import org.gradle.testkit.runner.BuildResult;
|
||||
import org.gradle.testkit.runner.TaskOutcome;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
import org.testcontainers.containers.GenericContainer;
|
||||
@@ -61,6 +62,12 @@ class PaketoBuilderTests {
|
||||
|
||||
GradleBuild gradleBuild;
|
||||
|
||||
@BeforeEach
|
||||
void configureGradleBuild() {
|
||||
this.gradleBuild.scriptProperty("systemTestMavenRepository",
|
||||
new File("build/system-test-maven-repository").getAbsoluteFile().toURI().toASCIIString());
|
||||
}
|
||||
|
||||
@Test
|
||||
void executableJarApp() throws Exception {
|
||||
writeMainClass();
|
||||
|
||||
@@ -6,6 +6,14 @@ plugins {
|
||||
}
|
||||
|
||||
repositories {
|
||||
exclusiveContent {
|
||||
forRepository {
|
||||
maven { url '{systemTestMavenRepository}' }
|
||||
}
|
||||
filter {
|
||||
includeGroup "org.springframework.boot"
|
||||
}
|
||||
}
|
||||
mavenCentral()
|
||||
maven { url 'https://repo.spring.io/milestone' }
|
||||
maven { url 'https://repo.spring.io/snapshot' }
|
||||
|
||||
@@ -6,6 +6,14 @@ plugins {
|
||||
}
|
||||
|
||||
repositories {
|
||||
exclusiveContent {
|
||||
forRepository {
|
||||
maven { url '{systemTestMavenRepository}' }
|
||||
}
|
||||
filter {
|
||||
includeGroup "org.springframework.boot"
|
||||
}
|
||||
}
|
||||
mavenCentral()
|
||||
maven { url 'https://repo.spring.io/milestone' }
|
||||
maven { url 'https://repo.spring.io/snapshot' }
|
||||
|
||||
@@ -6,6 +6,14 @@ plugins {
|
||||
}
|
||||
|
||||
repositories {
|
||||
exclusiveContent {
|
||||
forRepository {
|
||||
maven { url '{systemTestMavenRepository}' }
|
||||
}
|
||||
filter {
|
||||
includeGroup "org.springframework.boot"
|
||||
}
|
||||
}
|
||||
mavenCentral()
|
||||
maven { url 'https://repo.spring.io/milestone' }
|
||||
maven { url 'https://repo.spring.io/snapshot' }
|
||||
|
||||
@@ -6,6 +6,14 @@ plugins {
|
||||
}
|
||||
|
||||
repositories {
|
||||
exclusiveContent {
|
||||
forRepository {
|
||||
maven { url '{systemTestMavenRepository}' }
|
||||
}
|
||||
filter {
|
||||
includeGroup "org.springframework.boot"
|
||||
}
|
||||
}
|
||||
mavenCentral()
|
||||
maven { url 'https://repo.spring.io/milestone' }
|
||||
maven { url 'https://repo.spring.io/snapshot' }
|
||||
|
||||
@@ -5,6 +5,14 @@ plugins {
|
||||
}
|
||||
|
||||
repositories {
|
||||
exclusiveContent {
|
||||
forRepository {
|
||||
maven { url '{systemTestMavenRepository}' }
|
||||
}
|
||||
filter {
|
||||
includeGroup "org.springframework.boot"
|
||||
}
|
||||
}
|
||||
mavenCentral()
|
||||
maven { url 'https://repo.spring.io/milestone' }
|
||||
maven { url 'https://repo.spring.io/snapshot' }
|
||||
|
||||
@@ -1,7 +1,22 @@
|
||||
pluginManagement {
|
||||
repositories {
|
||||
exclusiveContent {
|
||||
forRepository {
|
||||
maven { url '{systemTestMavenRepository}' }
|
||||
}
|
||||
filter {
|
||||
includeGroup "org.springframework.boot"
|
||||
}
|
||||
}
|
||||
maven { url 'https://repo.spring.io/milestone' }
|
||||
maven { url 'https://repo.spring.io/snapshot' }
|
||||
gradlePluginPortal()
|
||||
}
|
||||
resolutionStrategy {
|
||||
eachPlugin {
|
||||
if (requested.id.id == "org.springframework.boot") {
|
||||
useModule "org.springframework.boot:spring-boot-gradle-plugin:${requested.version}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user