Will create an issue in start.spring.io for a new release train

This commit is contained in:
Marcin Grzejszczak
2019-08-19 13:58:25 +02:00
parent 5ced6c71af
commit eec48c142b
8 changed files with 194 additions and 21 deletions

View File

@@ -71,6 +71,11 @@ final class Tasks {
args.releaser.updateSpringGuides(args.versionFromScRelease, args.projects,
args.processedProjects);
}, TaskType.POST_RELEASE);
static Task UPDATE_START_SPRING_IO = task("updateStartSpringIo", "us",
"UPDATE START.SPRING.IO", "Updating start.spring.io", args -> {
args.releaser.updateStartSpringIo(args.versionFromScRelease,
args.projects);
}, TaskType.POST_RELEASE);
static Task UPDATE_SAGAN = task("updateSagan", "g", "UPDATE SAGAN",
"Updating Sagan with release info", args -> {
args.releaser.updateSagan(args.project, args.versionFromScRelease);
@@ -113,6 +118,7 @@ final class Tasks {
static final List<Task> DEFAULT_TASKS_PER_RELEASE = Stream
.of(Tasks.RUN_UPDATED_SAMPLES, Tasks.CREATE_TEMPLATES, Tasks.UPDATE_GUIDES,
Tasks.UPDATE_START_SPRING_IO,
Tasks.UPDATE_RELEASE_TRAIN_DOCUMENTATION, Tasks.UPDATE_DOCUMENTATION,
Tasks.UPDATE_RELEASE_TRAIN_WIKI, Tasks.UPDATE_ALL_SAMPLES)
.collect(Collectors.toList());

View File

@@ -239,6 +239,7 @@ public class AcceptanceTests {
BDDMockito.then(this.saganClient).should(BDDMockito.never())
.deleteRelease("spring-cloud-build", "2.0.0.M8");
then(this.gitHandler.issueCreatedInSpringGuides).isTrue();
then(this.gitHandler.issueCreatedInStartSpringIo).isTrue();
then(text(new File(this.documentationFolder, "current/index.html")))
.doesNotContain("Angel.SR3").contains("Camden.SR5");
thenRunUpdatedTestsWereCalled();
@@ -458,6 +459,7 @@ public class AcceptanceTests {
BDDMockito.then(this.saganClient).should(BDDMockito.never())
.deleteRelease("spring-cloud-build", "2.0.0.M8");
then(this.gitHandler.issueCreatedInSpringGuides).isTrue();
then(this.gitHandler.issueCreatedInStartSpringIo).isTrue();
then(text(new File(this.documentationFolder, "current/index.html")))
.doesNotContain("Angel.SR3").contains("Camden.SR5");
}
@@ -508,6 +510,7 @@ public class AcceptanceTests {
"1.2.0.RC1");
// we update guides only for SR / RELEASE
then(this.gitHandler.issueCreatedInSpringGuides).isFalse();
then(this.gitHandler.issueCreatedInStartSpringIo).isFalse();
// haven't even checked out the branch
then(new File(this.documentationFolder, "current/index.html")).doesNotExist();
}
@@ -544,6 +547,7 @@ public class AcceptanceTests {
BDDMockito.then(this.saganClient).should(BDDMockito.never())
.updateRelease(BDDMockito.anyString(), BDDMockito.anyList());
then(this.gitHandler.issueCreatedInSpringGuides).isFalse();
then(this.gitHandler.issueCreatedInStartSpringIo).isFalse();
}
private Iterable<RevCommit> listOfCommits(File project) throws GitAPIException {
@@ -855,6 +859,8 @@ public class AcceptanceTests {
boolean issueCreatedInSpringGuides = false;
boolean issueCreatedInStartSpringIo = false;
TestProjectGitHandler(ReleaserProperties properties, String expectedVersion,
String projectName) {
super(properties);
@@ -874,6 +880,12 @@ public class AcceptanceTests {
this.issueCreatedInSpringGuides = true;
}
@Override
public void createIssueInStartSpringIo(Projects projects,
ProjectVersion version) {
this.issueCreatedInStartSpringIo = true;
}
@Override
public String milestoneUrl(ProjectVersion releaseVersion) {
return "https://foo.bar.com/" + releaseVersion.toString();
@@ -887,6 +899,8 @@ public class AcceptanceTests {
boolean issueCreatedInSpringGuides = false;
boolean issueCreatedInStartSpringIo = false;
List<File> clonedProjects = new ArrayList<>();
NonAssertingTestProjectGitHandler(ReleaserProperties properties) {
@@ -903,6 +917,12 @@ public class AcceptanceTests {
this.issueCreatedInSpringGuides = true;
}
@Override
public void createIssueInStartSpringIo(Projects projects,
ProjectVersion version) {
this.issueCreatedInStartSpringIo = true;
}
@Override
public String milestoneUrl(ProjectVersion releaseVersion) {
return "https://foo.bar.com/" + releaseVersion.toString();