Updates following the first run of Reactor build
This commit is contained in:
@@ -40,7 +40,7 @@ class BuildsystemConfiguration {
|
||||
|
||||
@Bean
|
||||
BomParser gradleBomParser() {
|
||||
return new MavenBomParser(this.releaserProperties, this.customBomParsers);
|
||||
return new GradleBomParser(this.releaserProperties, this.customBomParsers);
|
||||
}
|
||||
|
||||
@Bean
|
||||
|
||||
@@ -248,9 +248,9 @@ public class SpringReleaser {
|
||||
}
|
||||
ProjectVersion versionFromBom;
|
||||
Projects projectsToUpdate;
|
||||
log.info("Fetch from git [{}], meta release [{}]",
|
||||
log.info("Fetch from git [{}], meta release [{}], project [{}]",
|
||||
this.properties.getGit().isFetchVersionsFromGit(),
|
||||
this.properties.getMetaRelease().isEnabled());
|
||||
this.properties.getMetaRelease().isEnabled(), project);
|
||||
if (this.properties.getGit().isFetchVersionsFromGit()
|
||||
&& !this.properties.getMetaRelease().isEnabled()) {
|
||||
printVersionRetrieval();
|
||||
@@ -285,6 +285,7 @@ public class SpringReleaser {
|
||||
}
|
||||
|
||||
ProjectsAndVersion processProject(Options options, File project, TaskType taskType) {
|
||||
log.info("Processing the project in file [{}]", project);
|
||||
ProjectsAndVersion projectsAndVersion = projects(project);
|
||||
ProjectVersion originalVersion = new ProjectVersion(project);
|
||||
final Args defaultArgs = new Args(this.releaser, project,
|
||||
@@ -303,10 +304,8 @@ public class SpringReleaser {
|
||||
}
|
||||
|
||||
private void printVersionRetrieval() {
|
||||
log.info(
|
||||
"\n\n\n=== RETRIEVING VERSIONS ===\n\nWill clone Spring Cloud Release"
|
||||
+ " to retrieve all versions for the branch [{}]",
|
||||
this.properties.getPom().getBranch());
|
||||
log.info("\n\n\n=== RETRIEVING VERSIONS ===\n\nWill clone the bom"
|
||||
+ " to retrieve all versions");
|
||||
}
|
||||
|
||||
private void printSettingVersionFromFixedVersions(Projects projectsToUpdate) {
|
||||
|
||||
@@ -33,8 +33,8 @@ final class Tasks {
|
||||
throw new IllegalStateException("Can't instantiate a utility class");
|
||||
}
|
||||
|
||||
static Task UPDATING_POMS = task("updatePoms", "u", "UPDATING POMS",
|
||||
"Update poms with versions from Spring Cloud Release",
|
||||
static Task UPDATING_POMS = task("updatePoms", "u", "UPDATING VERSIONS",
|
||||
"Update versions from the BOM",
|
||||
args -> args.releaser.updateProjectFromBom(args.project, args.projects,
|
||||
args.versionFromScRelease));
|
||||
static Task BUILD_PROJECT = task("build", "b", "BUILD PROJECT", "Build the project",
|
||||
|
||||
@@ -44,7 +44,6 @@ import org.junit.rules.TemporaryFolder;
|
||||
import org.mockito.BDDMockito;
|
||||
import org.mockito.Mockito;
|
||||
|
||||
import org.springframework.boot.test.rule.OutputCapture;
|
||||
import org.springframework.cloud.release.cloud.docs.SpringCloudDocsAccessor;
|
||||
import org.springframework.cloud.release.cloud.github.SpringCloudGithubIssuesAccessor;
|
||||
import org.springframework.cloud.release.internal.Releaser;
|
||||
@@ -86,9 +85,6 @@ public class AcceptanceTests {
|
||||
@Rule
|
||||
public TemporaryFolder tmp = new TemporaryFolder();
|
||||
|
||||
@Rule
|
||||
public OutputCapture capture = new OutputCapture();
|
||||
|
||||
TestPomReader testPomReader = new TestPomReader();
|
||||
|
||||
File springCloudConsulProject;
|
||||
@@ -135,6 +131,9 @@ public class AcceptanceTests {
|
||||
BDDMockito.given(this.saganClient.getProject(anyString()))
|
||||
.willReturn(newProject());
|
||||
Task.stepSkipper = () -> false;
|
||||
new File("/tmp/executed_build").delete();
|
||||
new File("/tmp/executed_deploy").delete();
|
||||
new File("/tmp/executed_docs").delete();
|
||||
}
|
||||
|
||||
@After
|
||||
@@ -362,8 +361,9 @@ public class AcceptanceTests {
|
||||
then(Arrays.asList("spring-cloud-starter-build",
|
||||
"spring-cloud-consul"))
|
||||
.contains(pom(project).getArtifactId());
|
||||
then(this.capture.toString()).contains("executed_build",
|
||||
"executed_deploy", "executed_docs");
|
||||
then(new File("/tmp/executed_build")).exists();
|
||||
then(new File("/tmp/executed_deploy")).exists();
|
||||
then(new File("/tmp/executed_docs")).exists();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -375,9 +375,9 @@ public class AcceptanceTests {
|
||||
then(Arrays.asList("spring-cloud-starter-build",
|
||||
"spring-cloud-consul"))
|
||||
.contains(pom(project).getArtifactId());
|
||||
then(this.capture.toString()).contains("executed_build");
|
||||
then(this.capture.toString()).doesNotContain("executed_deploy",
|
||||
"executed_docs");
|
||||
then(new File("/tmp/executed_build")).exists();
|
||||
then(new File("/tmp/executed_deploy")).doesNotExist();
|
||||
then(new File("/tmp/executed_docs")).doesNotExist();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -421,8 +421,9 @@ public class AcceptanceTests {
|
||||
.filter(file -> file.getName().equals("spring-cloud-consul"))
|
||||
.forEach(project -> {
|
||||
then(pom(project).getArtifactId()).isEqualTo("spring-cloud-consul");
|
||||
then(this.capture.toString()).contains("executed_build",
|
||||
"executed_deploy", "executed_docs");
|
||||
then(new File("/tmp/executed_build")).exists();
|
||||
then(new File("/tmp/executed_deploy")).exists();
|
||||
then(new File("/tmp/executed_docs")).exists();
|
||||
});
|
||||
thenSaganWasCalled();
|
||||
thenDocumentationWasUpdated();
|
||||
@@ -449,8 +450,9 @@ public class AcceptanceTests {
|
||||
.forEach(project -> {
|
||||
then(Collections.singletonList("spring-cloud-consul"))
|
||||
.contains(pom(project).getArtifactId());
|
||||
then(this.capture.toString()).contains("executed_build",
|
||||
"executed_deploy", "executed_docs");
|
||||
then(new File("/tmp/executed_build")).exists();
|
||||
then(new File("/tmp/executed_deploy")).exists();
|
||||
then(new File("/tmp/executed_docs")).exists();
|
||||
});
|
||||
thenSaganWasCalled();
|
||||
thenDocumentationWasUpdated();
|
||||
@@ -903,10 +905,12 @@ public class AcceptanceTests {
|
||||
file("/projects/spring-cloud-static-angel/").toURI().toString());
|
||||
releaserProperties.getGit().setReleaseTrainBomUrl(
|
||||
file("/projects/spring-cloud-release/").toURI().toString());
|
||||
releaserProperties.getMaven().setBuildCommand("echo executed_build");
|
||||
releaserProperties.getMaven().setDeployCommand("echo executed_deploy");
|
||||
releaserProperties.getMaven()
|
||||
.setPublishDocsCommands(new String[] { "echo executed_docs" });
|
||||
.setBuildCommand("echo '{{profiles}}' > /tmp/executed_build");
|
||||
releaserProperties.getMaven()
|
||||
.setDeployCommand("echo '{{profiles}}' > /tmp/executed_deploy");
|
||||
releaserProperties.getMaven().setPublishDocsCommands(
|
||||
new String[] { "echo '{{profiles}}' > /tmp/executed_docs" });
|
||||
releaserProperties.getMetaRelease()
|
||||
.setGitOrgUrl("file://" + this.temporaryFolder.getAbsolutePath());
|
||||
releaserProperties.getMetaRelease().setEnabled(true);
|
||||
|
||||
Reference in New Issue
Block a user