Add commercial repositories to smoke tests.

This commit is contained in:
Mark Paluch
2024-02-13 15:23:00 +01:00
parent b62d8202ca
commit 8574cafa8b
3 changed files with 46 additions and 1 deletions

View File

@@ -92,6 +92,25 @@
</repository>
</repositories>
</profile>
<profile>
<id>commercial</id>
<repositories>
<repository>
<id>spring-commercial-release</id>
<url>
https://repo.spring.vmware.com/artifactory/spring-commercial/
</url>
</repository>
<repository>
<id>spring-commercial-staging</id>
<url>
https://repo.spring.vmware.com/artifactory/spring-commercial-staging-local/
</url>
</repository>
</repositories>
</profile>
</profiles>

24
smoke-tests/settings.xml Normal file
View File

@@ -0,0 +1,24 @@
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
https://maven.apache.org/xsd/settings-1.0.0.xsd">
<servers>
<server>
<id>spring-commercial-staging</id>
<username>${env.COMMERCIAL_USR}</username>
<password>${env.COMMERCIAL_PSW}</password>
</server>
<server>
<id>spring-commercial-release</id>
<username>${env.COMMERCIAL_USR}</username>
<password>${env.COMMERCIAL_PSW}</password>
</server>
<server>
<id>spring-libs-milestone</id>
<username>${ARTIFACTORY_USR}</username>
<password>${ARTIFACTORY_PSW}</password>
</server>
</servers>
</settings>

View File

@@ -365,7 +365,8 @@ class MavenBuildSystem implements BuildSystem {
logger.log(iteration, "🚬 Running smoke test…");
boolean mavenCentral = iteration.isPublic();
String profile = mavenCentral ? "maven-central" : "artifactory";
boolean commercial = iteration.isCommercial();
String profile = commercial ? "commercial" : (mavenCentral ? "maven-central" : "artifactory");
ModuleIteration module = iteration.getModule(BUILD);
@@ -380,6 +381,7 @@ class MavenBuildSystem implements BuildSystem {
CommandLine arguments = CommandLine.of(Goal.CLEAN, VERIFY, //
profile(profile), //
arg("s").withValue("settings.xml"), //
arg("spring-data-bom.version").withValue(iteration.getReleaseTrainNameAndVersion())) //
.andIf(mavenCentral, arg("stagingRepository").withValue(stagingRepository.getId()));