Fixed debugging and git repos

This commit is contained in:
Marcin Grzejszczak
2018-10-31 10:40:05 +01:00
parent 2cfc8e1714
commit ecd0b90e85
2 changed files with 13 additions and 7 deletions

View File

@@ -264,16 +264,20 @@ public class ReleaserProperties implements Serializable {
*/
private boolean updateAllTestSamples = true;
/**
* Project to urls mapping. For each project will clone the test project and will
* update its versions.
*/
private Map<String, List<String>> allTestSampleUrls = new HashMap<String, List<String>>() {
{
this.put("spring-cloud-sleuth" , Arrays.asList(
"https://github.com/spring-cloud-samples/sleuth-issues/",
"https://github.com/spring-cloud-samples/sleuth-documentation-apps/")
"https://github.com/spring-cloud-samples/sleuth-issues",
"https://github.com/spring-cloud-samples/sleuth-documentation-apps")
);
this.put("spring-cloud-contract" , Arrays.asList(
"https://github.com/spring-cloud-samples/spring-cloud-contract-samples/",
"https://github.com/spring-cloud-samples/the-legacy-app/",
"https://github.com/spring-cloud-samples/sc-contract-car-rental/")
"https://github.com/spring-cloud-samples/spring-cloud-contract-samples",
"https://github.com/spring-cloud-samples/the-legacy-app",
"https://github.com/spring-cloud-samples/sc-contract-car-rental")
);
}
};

View File

@@ -22,6 +22,7 @@ import org.springframework.cloud.release.internal.pom.ProjectPomUpdater;
import org.springframework.cloud.release.internal.pom.ProjectVersion;
import org.springframework.cloud.release.internal.pom.Projects;
import org.springframework.cloud.release.internal.project.ProjectBuilder;
import org.springframework.core.NestedExceptionUtils;
/**
* @author Marcin Grzejszczak
@@ -92,8 +93,8 @@ public class PostReleaseActions implements Closeable {
log.info("Updated all samples!");
List<String> exceptionMessages = projectAndExceptions.stream()
.filter(ProjectAndException::hasException)
.map(e -> "Project [" + e.key + "] for url [" + e.url + "] has exception [" + Arrays
.toString(e.ex.getStackTrace()) + "]")
.map(e -> "Project [" + e.key + "] for url [" + e.url + "] "
+ "has exception [" + NestedExceptionUtils.getMostSpecificCause(e.ex) + "]")
.collect(Collectors.toList());
if (!exceptionMessages.isEmpty()) {
log.warn("Exceptions were found while updating samples");
@@ -140,6 +141,7 @@ public class PostReleaseActions implements Closeable {
.commit(file, "Updated versions after [" + releaseTrainVersion + "] "
+ "release train and [" + projectVersionForReleaseTrain.version + "] ["
+ key + "] project release");
this.projectGitHandler.pushCurrentBranch(file);
}
private ProjectAndFuture run(String key, String url, Runnable runnable) {