Fixed
- not breaking the build when a release task has failed - added skipped state of task
This commit is contained in:
@@ -18,9 +18,9 @@ package releaser;
|
||||
|
||||
import releaser.internal.options.Options;
|
||||
import releaser.internal.options.Parser;
|
||||
import releaser.internal.spring.ExecutionResult;
|
||||
import releaser.internal.spring.ExecutionResultHandler;
|
||||
import releaser.internal.spring.SpringReleaser;
|
||||
import releaser.internal.tech.ExecutionResult;
|
||||
|
||||
import org.springframework.boot.CommandLineRunner;
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@ package releaser.internal.spring;
|
||||
import releaser.internal.ReleaserProperties;
|
||||
import releaser.internal.options.Options;
|
||||
import releaser.internal.options.OptionsBuilder;
|
||||
import releaser.internal.tech.ExecutionResult;
|
||||
|
||||
/**
|
||||
* Releaser that gets input from console.
|
||||
|
||||
@@ -1,123 +0,0 @@
|
||||
/*
|
||||
* Copyright 2013-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package releaser.internal.spring;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import releaser.internal.tech.BuildUnstableException;
|
||||
|
||||
/**
|
||||
* Task execution result. Contains a list of exceptions thrown while running the task.
|
||||
*/
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class ExecutionResult implements Serializable {
|
||||
|
||||
private List<Exception> exceptions = new LinkedList<>();
|
||||
|
||||
public ExecutionResult() {
|
||||
}
|
||||
|
||||
public ExecutionResult(Exception throwable) {
|
||||
this.exceptions.add(throwable);
|
||||
}
|
||||
|
||||
public ExecutionResult(List<Exception> throwables) {
|
||||
this.exceptions.addAll(throwables);
|
||||
}
|
||||
|
||||
public static ExecutionResult success() {
|
||||
return new ExecutionResult();
|
||||
}
|
||||
|
||||
public static ExecutionResult failure(Exception throwable) {
|
||||
return new ExecutionResult(throwable);
|
||||
}
|
||||
|
||||
public static ExecutionResult unstable(Exception ex) {
|
||||
return new ExecutionResult(ex instanceof BuildUnstableException ? ex
|
||||
: new BuildUnstableException(ex));
|
||||
}
|
||||
|
||||
public RuntimeException foundExceptions() {
|
||||
if (this.exceptions.isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
if (this.exceptions.size() == 1) {
|
||||
Throwable throwable = this.exceptions.get(0);
|
||||
return throwable instanceof RuntimeException ? (RuntimeException) throwable
|
||||
: new RuntimeException(throwable);
|
||||
}
|
||||
if (isUnstable()) {
|
||||
return new MergedUnstableThrowable(this.exceptions);
|
||||
}
|
||||
return new MergedThrowable(this.exceptions);
|
||||
}
|
||||
|
||||
public ExecutionResult merge(ExecutionResult other) {
|
||||
ExecutionResult merged = new ExecutionResult(this.exceptions);
|
||||
merged.exceptions.addAll(other.exceptions);
|
||||
return merged;
|
||||
}
|
||||
|
||||
public boolean isUnstable() {
|
||||
return !this.exceptions.isEmpty() && this.exceptions.stream()
|
||||
.allMatch(t -> t instanceof BuildUnstableException);
|
||||
}
|
||||
|
||||
public boolean isFailure() {
|
||||
return !this.exceptions.isEmpty() && this.exceptions.stream()
|
||||
.anyMatch(t -> !(t instanceof BuildUnstableException));
|
||||
}
|
||||
|
||||
public boolean isSuccess() {
|
||||
return this.exceptions.isEmpty();
|
||||
}
|
||||
|
||||
public boolean isFailureOrUnstable() {
|
||||
return !this.exceptions.isEmpty();
|
||||
}
|
||||
|
||||
public List<Exception> getExceptions() {
|
||||
return this.exceptions;
|
||||
}
|
||||
|
||||
public void setExceptions(List<Exception> exceptions) {
|
||||
this.exceptions = exceptions;
|
||||
}
|
||||
|
||||
private static final class MergedThrowable extends RuntimeException
|
||||
implements Serializable {
|
||||
|
||||
private MergedThrowable(List<Exception> throwables) {
|
||||
super("Failed due to the following exceptions " + throwables);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static final class MergedUnstableThrowable extends BuildUnstableException
|
||||
implements Serializable {
|
||||
|
||||
private MergedUnstableThrowable(List<Exception> throwables) {
|
||||
super("Unstable due to the following exceptions " + throwables);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -18,6 +18,8 @@ package releaser.internal.spring;
|
||||
|
||||
import java.util.function.Consumer;
|
||||
|
||||
import releaser.internal.tech.ExecutionResult;
|
||||
|
||||
/**
|
||||
* Handles the result of the execution of the train or project release. Example: You can
|
||||
* print the results in a table, throw exceptions when the build was faulty or just log
|
||||
|
||||
@@ -19,6 +19,7 @@ package releaser.internal.spring;
|
||||
import releaser.internal.ReleaserProperties;
|
||||
import releaser.internal.options.Options;
|
||||
import releaser.internal.tasks.ReleaserTask;
|
||||
import releaser.internal.tech.ExecutionResult;
|
||||
|
||||
/**
|
||||
* Knows how to run a flow of tasks.
|
||||
|
||||
@@ -32,6 +32,7 @@ import com.jakewharton.fliptables.FlipTableConverters;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import releaser.internal.tasks.TrainPostReleaseReleaserTask;
|
||||
import releaser.internal.tech.ExecutionResult;
|
||||
|
||||
import org.springframework.batch.core.JobExecution;
|
||||
import org.springframework.batch.core.StepExecution;
|
||||
@@ -145,12 +146,10 @@ class SpringBatchExecutionResultHandler implements ExecutionResultHandler {
|
||||
"***** Project / Task : <%s/%s> ***** \nTask Description <%s>\nException Stacktrace \n\n%s",
|
||||
table1.projectName, table1.taskCaption,
|
||||
table1.taskDescription,
|
||||
table1.exceptions + "\n"
|
||||
+ table1.exceptions.stream()
|
||||
.map(Throwable::getStackTrace)
|
||||
.flatMap(e -> Arrays.stream(e))
|
||||
.map(StackTraceElement::toString)
|
||||
.collect(Collectors.joining("\n"))))
|
||||
table1.exceptions + "\n" + table1.exceptions.stream()
|
||||
.map(Throwable::getStackTrace).flatMap(Arrays::stream)
|
||||
.map(StackTraceElement::toString)
|
||||
.collect(Collectors.joining("\n"))))
|
||||
.collect(Collectors.joining("\n\n"));
|
||||
log.warn(string + brokenBuilds);
|
||||
}
|
||||
|
||||
@@ -28,7 +28,6 @@ import java.util.concurrent.Future;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
import java.util.function.Supplier;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import edu.emory.mathcs.backport.java.util.Collections;
|
||||
import org.slf4j.Logger;
|
||||
@@ -40,6 +39,7 @@ import releaser.internal.tasks.PostReleaseReleaserTask;
|
||||
import releaser.internal.tasks.ReleaseReleaserTask;
|
||||
import releaser.internal.tasks.ReleaserTask;
|
||||
import releaser.internal.tech.BuildUnstableException;
|
||||
import releaser.internal.tech.ExecutionResult;
|
||||
|
||||
import org.springframework.batch.core.ExitStatus;
|
||||
import org.springframework.batch.core.Job;
|
||||
@@ -128,13 +128,14 @@ class SpringBatchFlowRunner implements FlowRunner, Closeable {
|
||||
.getStepExecution().getExecutionContext().get("errors");
|
||||
RuntimeException exception = result.foundExceptions();
|
||||
errors = addExceptionToErrors(errors, exception);
|
||||
String status = result.isUnstable() ? "UNSTABLE"
|
||||
: result.isFailure() ? "FAILURE" : "SUCCESS";
|
||||
String status = result.toStringResult();
|
||||
ExecutionResultReport entity = buildEntity(releaserTask, args,
|
||||
status, errors);
|
||||
contribution.getStepExecution().getExecutionContext()
|
||||
.put("entity", entity);
|
||||
if (result.isFailureOrUnstable()) {
|
||||
log.warn("The execution of [{}] failed or was unstable",
|
||||
entity.getReleaserTaskType().getSimpleName());
|
||||
contribution.getStepExecution().getExecutionContext()
|
||||
.put("errors", errors);
|
||||
}
|
||||
@@ -252,9 +253,7 @@ class SpringBatchFlowRunner implements FlowRunner, Closeable {
|
||||
List<ExecutionResult> results = new LinkedList<>();
|
||||
for (StuffToRun flow : flows) {
|
||||
log.info("Releasing group [{}]", flow.releaseGroup);
|
||||
ExecutionResult executionResult = runInParallel(flow, flow.task).stream()
|
||||
.map(this::result)
|
||||
.reduce(new ExecutionResult(), ExecutionResult::merge);
|
||||
ExecutionResult executionResult = runInParallel(flow);
|
||||
log.info("Group [{}] execution result is [{}]", flow.releaseGroup,
|
||||
executionResult);
|
||||
if (executionResult.isFailure()) {
|
||||
@@ -267,8 +266,7 @@ class SpringBatchFlowRunner implements FlowRunner, Closeable {
|
||||
return results.stream().reduce(new ExecutionResult(), ExecutionResult::merge);
|
||||
}
|
||||
// will run in sequence
|
||||
return flows.stream().map(s -> runInSequence(s, s.task)).flatMap(s -> s)
|
||||
.reduce(new ExecutionResult(), ExecutionResult::merge);
|
||||
return runInSequence(flows);
|
||||
}
|
||||
|
||||
private ExecutionResult result(Future<ExecutionResult> future) {
|
||||
@@ -280,23 +278,47 @@ class SpringBatchFlowRunner implements FlowRunner, Closeable {
|
||||
}
|
||||
}
|
||||
|
||||
private List<Future<ExecutionResult>> runInParallel(StuffToRun stuffToRun,
|
||||
CompositeReleaserTask releaserTask) {
|
||||
private ExecutionResult runInParallel(StuffToRun stuffToRun) {
|
||||
ExecutionResult results = ExecutionResult.success();
|
||||
log.info("Running composite tasks in parallel for {}", stuffToRun.releaseGroup);
|
||||
return stuffToRun.releaseGroup.projectsToRun.stream().map(s -> {
|
||||
for (ProjectToRun.ProjectToRunSupplier s : stuffToRun.releaseGroup.projectsToRun) {
|
||||
CompositeReleaserTask releaserTask = stuffToRun.task;
|
||||
log.info("Scheduling a build for project [{}]", s.projectName());
|
||||
return this.executorService.submit(() -> {
|
||||
List<Future<ExecutionResult>> futures = new LinkedList<>();
|
||||
futures.add(this.executorService.submit(() -> {
|
||||
log.info("Running a composite task [{}] in parallel",
|
||||
releaserTask.name());
|
||||
return releaserTask.apply(Arguments.forProject(s.get()));
|
||||
});
|
||||
}).collect(Collectors.toCollection(LinkedList::new));
|
||||
}));
|
||||
boolean atLeastOneFailure = false;
|
||||
for (Future<ExecutionResult> future : futures) {
|
||||
ExecutionResult result = result(future);
|
||||
results = results.merge(result);
|
||||
if (result.isFailure()) {
|
||||
atLeastOneFailure = true;
|
||||
}
|
||||
}
|
||||
if (atLeastOneFailure) {
|
||||
log.warn(
|
||||
"At least one project failed within the group, will NOT continue with subsequent groups");
|
||||
break;
|
||||
}
|
||||
}
|
||||
return results;
|
||||
}
|
||||
|
||||
private Stream<ExecutionResult> runInSequence(StuffToRun stuffToRun,
|
||||
CompositeReleaserTask releaserTask) {
|
||||
return stuffToRun.releaseGroup.projectsToRun.stream()
|
||||
.map(s -> releaserTask.apply(Arguments.forProject(s.get())));
|
||||
private ExecutionResult runInSequence(List<StuffToRun> stuffToRunList) {
|
||||
ExecutionResult result = ExecutionResult.success();
|
||||
for (StuffToRun stuffToRun : stuffToRunList) {
|
||||
for (ProjectToRun.ProjectToRunSupplier s : stuffToRun.releaseGroup.projectsToRun) {
|
||||
result = result
|
||||
.merge(stuffToRun.task.apply(Arguments.forProject(s.get())));
|
||||
if (result.isFailure()) {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
private Job buildJobForFlows(Iterator<StuffToRun> flowsIterator) {
|
||||
@@ -397,7 +419,7 @@ class SpringBatchFlowRunner implements FlowRunner, Closeable {
|
||||
if (thrownExceptions.isEmpty()) {
|
||||
return ExecutionResult.success();
|
||||
}
|
||||
return new ExecutionResult(thrownExceptions);
|
||||
return ExecutionResult.failure(thrownExceptions);
|
||||
}
|
||||
catch (JobExecutionException ex) {
|
||||
return ExecutionResult.failure(ex);
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
package releaser.internal.spring;
|
||||
|
||||
import releaser.internal.options.Options;
|
||||
import releaser.internal.tech.ExecutionResult;
|
||||
|
||||
/**
|
||||
* Contract for releasing a project or train .
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
package releaser.internal.tasks;
|
||||
|
||||
import releaser.internal.spring.Arguments;
|
||||
import releaser.internal.spring.ExecutionResult;
|
||||
import releaser.internal.tech.ExecutionResult;
|
||||
|
||||
/**
|
||||
* Marker interface for running post release tasks.
|
||||
|
||||
@@ -21,8 +21,8 @@ import java.util.function.Function;
|
||||
import releaser.internal.ReleaserProperties;
|
||||
import releaser.internal.options.Options;
|
||||
import releaser.internal.spring.Arguments;
|
||||
import releaser.internal.spring.ExecutionResult;
|
||||
import releaser.internal.tech.BuildUnstableException;
|
||||
import releaser.internal.tech.ExecutionResult;
|
||||
|
||||
import org.springframework.core.Ordered;
|
||||
|
||||
|
||||
@@ -26,13 +26,13 @@ import org.slf4j.LoggerFactory;
|
||||
import releaser.internal.ReleaserProperties;
|
||||
import releaser.internal.options.Options;
|
||||
import releaser.internal.spring.Arguments;
|
||||
import releaser.internal.spring.ExecutionResult;
|
||||
import releaser.internal.spring.FlowRunner;
|
||||
import releaser.internal.spring.ProjectToRun;
|
||||
import releaser.internal.spring.ProjectsToRun;
|
||||
import releaser.internal.spring.TasksToRun;
|
||||
import releaser.internal.tasks.CompositeReleaserTask;
|
||||
import releaser.internal.tasks.DryRunReleaseReleaserTask;
|
||||
import releaser.internal.tech.ExecutionResult;
|
||||
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.core.annotation.AnnotationAwareOrderComparator;
|
||||
|
||||
@@ -21,8 +21,8 @@ import org.slf4j.LoggerFactory;
|
||||
import releaser.internal.ReleaserProperties;
|
||||
import releaser.internal.options.Options;
|
||||
import releaser.internal.spring.Arguments;
|
||||
import releaser.internal.spring.ExecutionResult;
|
||||
import releaser.internal.tasks.CompositeReleaserTask;
|
||||
import releaser.internal.tech.ExecutionResult;
|
||||
|
||||
import org.springframework.context.ApplicationContext;
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@ import org.slf4j.LoggerFactory;
|
||||
import releaser.internal.ReleaserProperties;
|
||||
import releaser.internal.options.Options;
|
||||
import releaser.internal.spring.Arguments;
|
||||
import releaser.internal.spring.ExecutionResult;
|
||||
import releaser.internal.tasks.CompositeReleaserTask;
|
||||
import releaser.internal.tech.ExecutionResult;
|
||||
|
||||
import org.springframework.context.ApplicationContext;
|
||||
|
||||
|
||||
@@ -27,7 +27,6 @@ import org.slf4j.LoggerFactory;
|
||||
import releaser.internal.ReleaserProperties;
|
||||
import releaser.internal.options.Options;
|
||||
import releaser.internal.spring.Arguments;
|
||||
import releaser.internal.spring.ExecutionResult;
|
||||
import releaser.internal.spring.FlowRunner;
|
||||
import releaser.internal.spring.ProjectToRun;
|
||||
import releaser.internal.spring.ProjectsToRun;
|
||||
@@ -36,6 +35,7 @@ import releaser.internal.tasks.CompositeReleaserTask;
|
||||
import releaser.internal.tasks.ProjectPostReleaseReleaserTask;
|
||||
import releaser.internal.tasks.ReleaseReleaserTask;
|
||||
import releaser.internal.tasks.ReleaserTask;
|
||||
import releaser.internal.tech.ExecutionResult;
|
||||
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.core.annotation.AnnotationAwareOrderComparator;
|
||||
|
||||
@@ -21,8 +21,8 @@ import org.slf4j.LoggerFactory;
|
||||
import releaser.internal.ReleaserProperties;
|
||||
import releaser.internal.options.Options;
|
||||
import releaser.internal.spring.Arguments;
|
||||
import releaser.internal.spring.ExecutionResult;
|
||||
import releaser.internal.tasks.CompositeReleaserTask;
|
||||
import releaser.internal.tech.ExecutionResult;
|
||||
|
||||
import org.springframework.context.ApplicationContext;
|
||||
|
||||
|
||||
@@ -25,12 +25,12 @@ import org.slf4j.LoggerFactory;
|
||||
import releaser.internal.ReleaserProperties;
|
||||
import releaser.internal.options.Options;
|
||||
import releaser.internal.spring.Arguments;
|
||||
import releaser.internal.spring.ExecutionResult;
|
||||
import releaser.internal.spring.FlowRunner;
|
||||
import releaser.internal.spring.TasksToRun;
|
||||
import releaser.internal.tasks.CompositeReleaserTask;
|
||||
import releaser.internal.tasks.ReleaserTask;
|
||||
import releaser.internal.tasks.TrainPostReleaseReleaserTask;
|
||||
import releaser.internal.tech.ExecutionResult;
|
||||
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.core.annotation.AnnotationAwareOrderComparator;
|
||||
|
||||
@@ -18,8 +18,8 @@ package releaser.internal.tasks.postrelease;
|
||||
|
||||
import releaser.internal.Releaser;
|
||||
import releaser.internal.spring.Arguments;
|
||||
import releaser.internal.spring.ExecutionResult;
|
||||
import releaser.internal.tasks.ProjectPostReleaseReleaserTask;
|
||||
import releaser.internal.tech.ExecutionResult;
|
||||
|
||||
public class CloseMilestonesProjectPostReleaseTask
|
||||
implements ProjectPostReleaseReleaserTask {
|
||||
@@ -57,8 +57,7 @@ public class CloseMilestonesProjectPostReleaseTask
|
||||
|
||||
@Override
|
||||
public ExecutionResult runTask(Arguments args) {
|
||||
this.releaser.closeMilestone(args.versionFromBom);
|
||||
return ExecutionResult.success();
|
||||
return this.releaser.closeMilestone(args.versionFromBom);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -18,8 +18,8 @@ package releaser.internal.tasks.postrelease;
|
||||
|
||||
import releaser.internal.Releaser;
|
||||
import releaser.internal.spring.Arguments;
|
||||
import releaser.internal.spring.ExecutionResult;
|
||||
import releaser.internal.tasks.TrainPostReleaseReleaserTask;
|
||||
import releaser.internal.tech.ExecutionResult;
|
||||
|
||||
public class CreateTemplatesTrainPostReleaseTask implements TrainPostReleaseReleaserTask {
|
||||
|
||||
@@ -56,11 +56,11 @@ public class CreateTemplatesTrainPostReleaseTask implements TrainPostReleaseRele
|
||||
|
||||
@Override
|
||||
public ExecutionResult runTask(Arguments args) {
|
||||
this.releaser.createEmail(args.versionFromBom, args.projects);
|
||||
this.releaser.createBlog(args.versionFromBom, args.projects);
|
||||
this.releaser.createTweet(args.versionFromBom, args.projects);
|
||||
this.releaser.createReleaseNotes(args.versionFromBom, args.projects);
|
||||
return ExecutionResult.success();
|
||||
return this.releaser.createEmail(args.versionFromBom, args.projects)
|
||||
.merge(this.releaser.createBlog(args.versionFromBom, args.projects))
|
||||
.merge(this.releaser.createTweet(args.versionFromBom, args.projects))
|
||||
.merge(this.releaser.createReleaseNotes(args.versionFromBom,
|
||||
args.projects));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -18,8 +18,8 @@ package releaser.internal.tasks.postrelease;
|
||||
|
||||
import releaser.internal.Releaser;
|
||||
import releaser.internal.spring.Arguments;
|
||||
import releaser.internal.spring.ExecutionResult;
|
||||
import releaser.internal.tasks.TrainPostReleaseReleaserTask;
|
||||
import releaser.internal.tech.ExecutionResult;
|
||||
|
||||
public class RunUpdatedSamplesTrainPostReleaseTask
|
||||
implements TrainPostReleaseReleaserTask {
|
||||
@@ -57,8 +57,7 @@ public class RunUpdatedSamplesTrainPostReleaseTask
|
||||
|
||||
@Override
|
||||
public ExecutionResult runTask(Arguments args) {
|
||||
this.releaser.runUpdatedSamples(args.projects);
|
||||
return ExecutionResult.success();
|
||||
return this.releaser.runUpdatedSamples(args.projects);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -18,8 +18,8 @@ package releaser.internal.tasks.postrelease;
|
||||
|
||||
import releaser.internal.Releaser;
|
||||
import releaser.internal.spring.Arguments;
|
||||
import releaser.internal.spring.ExecutionResult;
|
||||
import releaser.internal.tasks.TrainPostReleaseReleaserTask;
|
||||
import releaser.internal.tech.ExecutionResult;
|
||||
|
||||
public class UpdateAllTestSamplesTrainPostReleaseTask
|
||||
implements TrainPostReleaseReleaserTask {
|
||||
@@ -57,8 +57,7 @@ public class UpdateAllTestSamplesTrainPostReleaseTask
|
||||
|
||||
@Override
|
||||
public ExecutionResult runTask(Arguments args) {
|
||||
this.releaser.updateAllSamples(args.projects);
|
||||
return ExecutionResult.success();
|
||||
return this.releaser.updateAllSamples(args.projects);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -18,8 +18,8 @@ package releaser.internal.tasks.postrelease;
|
||||
|
||||
import releaser.internal.Releaser;
|
||||
import releaser.internal.spring.Arguments;
|
||||
import releaser.internal.spring.ExecutionResult;
|
||||
import releaser.internal.tasks.ProjectPostReleaseReleaserTask;
|
||||
import releaser.internal.tech.ExecutionResult;
|
||||
|
||||
public class UpdateDocsRepositoryProjectPostReleaseTask
|
||||
implements ProjectPostReleaseReleaserTask {
|
||||
@@ -57,9 +57,8 @@ public class UpdateDocsRepositoryProjectPostReleaseTask
|
||||
|
||||
@Override
|
||||
public ExecutionResult runTask(Arguments args) {
|
||||
this.releaser.updateDocumentationRepositoryForSingleProject(args.projects,
|
||||
return this.releaser.updateDocumentationRepositoryForSingleProject(args.projects,
|
||||
args.versionFromBom);
|
||||
return ExecutionResult.success();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -18,8 +18,8 @@ package releaser.internal.tasks.postrelease;
|
||||
|
||||
import releaser.internal.Releaser;
|
||||
import releaser.internal.spring.Arguments;
|
||||
import releaser.internal.spring.ExecutionResult;
|
||||
import releaser.internal.tasks.TrainPostReleaseReleaserTask;
|
||||
import releaser.internal.tech.ExecutionResult;
|
||||
|
||||
public class UpdateDocsRepositoryTrainPostReleaseTask
|
||||
implements TrainPostReleaseReleaserTask {
|
||||
@@ -57,9 +57,8 @@ public class UpdateDocsRepositoryTrainPostReleaseTask
|
||||
|
||||
@Override
|
||||
public ExecutionResult runTask(Arguments args) {
|
||||
this.releaser.updateDocumentationRepositoryForTrain(args.properties,
|
||||
return this.releaser.updateDocumentationRepositoryForTrain(args.properties,
|
||||
args.projects, args.versionFromBom);
|
||||
return ExecutionResult.success();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -18,8 +18,8 @@ package releaser.internal.tasks.postrelease;
|
||||
|
||||
import releaser.internal.Releaser;
|
||||
import releaser.internal.spring.Arguments;
|
||||
import releaser.internal.spring.ExecutionResult;
|
||||
import releaser.internal.tasks.TrainPostReleaseReleaserTask;
|
||||
import releaser.internal.tech.ExecutionResult;
|
||||
|
||||
public class UpdateGuidesTrainPostReleaseTask implements TrainPostReleaseReleaserTask {
|
||||
|
||||
@@ -56,9 +56,8 @@ public class UpdateGuidesTrainPostReleaseTask implements TrainPostReleaseRelease
|
||||
|
||||
@Override
|
||||
public ExecutionResult runTask(Arguments args) {
|
||||
this.releaser.updateSpringGuides(args.versionFromBom, args.projects,
|
||||
return this.releaser.updateSpringGuides(args.versionFromBom, args.projects,
|
||||
args.processedProjects);
|
||||
return ExecutionResult.success();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -18,8 +18,8 @@ package releaser.internal.tasks.postrelease;
|
||||
|
||||
import releaser.internal.Releaser;
|
||||
import releaser.internal.spring.Arguments;
|
||||
import releaser.internal.spring.ExecutionResult;
|
||||
import releaser.internal.tasks.TrainPostReleaseReleaserTask;
|
||||
import releaser.internal.tech.ExecutionResult;
|
||||
|
||||
public class UpdateReleaseTrainDocsTrainPostReleaseTask
|
||||
implements TrainPostReleaseReleaserTask {
|
||||
@@ -57,8 +57,7 @@ public class UpdateReleaseTrainDocsTrainPostReleaseTask
|
||||
|
||||
@Override
|
||||
public ExecutionResult runTask(Arguments args) {
|
||||
this.releaser.generateReleaseTrainDocumentation(args.projects);
|
||||
return ExecutionResult.success();
|
||||
return this.releaser.generateReleaseTrainDocumentation(args.projects);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -18,8 +18,8 @@ package releaser.internal.tasks.postrelease;
|
||||
|
||||
import releaser.internal.Releaser;
|
||||
import releaser.internal.spring.Arguments;
|
||||
import releaser.internal.spring.ExecutionResult;
|
||||
import releaser.internal.tasks.TrainPostReleaseReleaserTask;
|
||||
import releaser.internal.tech.ExecutionResult;
|
||||
|
||||
public class UpdateReleaseTrainWikiTrainPostReleaseTask
|
||||
implements TrainPostReleaseReleaserTask {
|
||||
@@ -57,8 +57,7 @@ public class UpdateReleaseTrainWikiTrainPostReleaseTask
|
||||
|
||||
@Override
|
||||
public ExecutionResult runTask(Arguments args) {
|
||||
this.releaser.updateReleaseTrainWiki(args.projects);
|
||||
return ExecutionResult.success();
|
||||
return this.releaser.updateReleaseTrainWiki(args.projects);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -18,8 +18,8 @@ package releaser.internal.tasks.postrelease;
|
||||
|
||||
import releaser.internal.Releaser;
|
||||
import releaser.internal.spring.Arguments;
|
||||
import releaser.internal.spring.ExecutionResult;
|
||||
import releaser.internal.tasks.ProjectPostReleaseReleaserTask;
|
||||
import releaser.internal.tech.ExecutionResult;
|
||||
|
||||
public class UpdateSaganProjectPostReleaseTask implements ProjectPostReleaseReleaserTask {
|
||||
|
||||
@@ -56,8 +56,8 @@ public class UpdateSaganProjectPostReleaseTask implements ProjectPostReleaseRele
|
||||
|
||||
@Override
|
||||
public ExecutionResult runTask(Arguments args) {
|
||||
this.releaser.updateSagan(args.project, args.versionFromBom, args.projects);
|
||||
return ExecutionResult.success();
|
||||
return this.releaser.updateSagan(args.project, args.versionFromBom,
|
||||
args.projects);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -18,8 +18,8 @@ package releaser.internal.tasks.postrelease;
|
||||
|
||||
import releaser.internal.Releaser;
|
||||
import releaser.internal.spring.Arguments;
|
||||
import releaser.internal.spring.ExecutionResult;
|
||||
import releaser.internal.tasks.TrainPostReleaseReleaserTask;
|
||||
import releaser.internal.tech.ExecutionResult;
|
||||
|
||||
public class UpdateStartSpringIoTrainPostReleaseTask
|
||||
implements TrainPostReleaseReleaserTask {
|
||||
@@ -57,8 +57,7 @@ public class UpdateStartSpringIoTrainPostReleaseTask
|
||||
|
||||
@Override
|
||||
public ExecutionResult runTask(Arguments args) {
|
||||
this.releaser.updateStartSpringIo(args.versionFromBom, args.projects);
|
||||
return ExecutionResult.success();
|
||||
return this.releaser.updateStartSpringIo(args.versionFromBom, args.projects);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -18,8 +18,8 @@ package releaser.internal.tasks.release;
|
||||
|
||||
import releaser.internal.Releaser;
|
||||
import releaser.internal.spring.Arguments;
|
||||
import releaser.internal.spring.ExecutionResult;
|
||||
import releaser.internal.tasks.DryRunReleaseReleaserTask;
|
||||
import releaser.internal.tech.ExecutionResult;
|
||||
|
||||
public class BuildProjectReleaseTask implements DryRunReleaseReleaserTask {
|
||||
|
||||
@@ -56,8 +56,7 @@ public class BuildProjectReleaseTask implements DryRunReleaseReleaserTask {
|
||||
|
||||
@Override
|
||||
public ExecutionResult runTask(Arguments args) {
|
||||
this.releaser.buildProject(args.originalVersion, args.versionFromBom);
|
||||
return ExecutionResult.success();
|
||||
return this.releaser.buildProject(args.originalVersion, args.versionFromBom);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -18,8 +18,8 @@ package releaser.internal.tasks.release;
|
||||
|
||||
import releaser.internal.Releaser;
|
||||
import releaser.internal.spring.Arguments;
|
||||
import releaser.internal.spring.ExecutionResult;
|
||||
import releaser.internal.tasks.ReleaseReleaserTask;
|
||||
import releaser.internal.tech.ExecutionResult;
|
||||
|
||||
public class BumpBackToSnapshotReleaseTask implements ReleaseReleaserTask {
|
||||
|
||||
@@ -56,9 +56,8 @@ public class BumpBackToSnapshotReleaseTask implements ReleaseReleaserTask {
|
||||
|
||||
@Override
|
||||
public ExecutionResult runTask(Arguments args) {
|
||||
this.releaser.rollbackReleaseVersion(args.project, args.projects,
|
||||
return this.releaser.rollbackReleaseVersion(args.project, args.projects,
|
||||
args.versionFromBom);
|
||||
return ExecutionResult.success();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -18,8 +18,8 @@ package releaser.internal.tasks.release;
|
||||
|
||||
import releaser.internal.Releaser;
|
||||
import releaser.internal.spring.Arguments;
|
||||
import releaser.internal.spring.ExecutionResult;
|
||||
import releaser.internal.tasks.ReleaseReleaserTask;
|
||||
import releaser.internal.tech.ExecutionResult;
|
||||
|
||||
public class CommitReleaseTask implements ReleaseReleaserTask {
|
||||
|
||||
@@ -56,8 +56,7 @@ public class CommitReleaseTask implements ReleaseReleaserTask {
|
||||
|
||||
@Override
|
||||
public ExecutionResult runTask(Arguments args) {
|
||||
this.releaser.commitAndPushTags(args.project, args.versionFromBom);
|
||||
return ExecutionResult.success();
|
||||
return this.releaser.commitAndPushTags(args.project, args.versionFromBom);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -18,8 +18,8 @@ package releaser.internal.tasks.release;
|
||||
|
||||
import releaser.internal.Releaser;
|
||||
import releaser.internal.spring.Arguments;
|
||||
import releaser.internal.spring.ExecutionResult;
|
||||
import releaser.internal.tasks.ReleaseReleaserTask;
|
||||
import releaser.internal.tech.ExecutionResult;
|
||||
|
||||
public class DeployArtifactsReleaseTask implements ReleaseReleaserTask {
|
||||
|
||||
@@ -56,8 +56,7 @@ public class DeployArtifactsReleaseTask implements ReleaseReleaserTask {
|
||||
|
||||
@Override
|
||||
public ExecutionResult runTask(Arguments args) {
|
||||
this.releaser.deploy(args.originalVersion, args.versionFromBom);
|
||||
return ExecutionResult.success();
|
||||
return this.releaser.deploy(args.originalVersion, args.versionFromBom);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -18,8 +18,8 @@ package releaser.internal.tasks.release;
|
||||
|
||||
import releaser.internal.Releaser;
|
||||
import releaser.internal.spring.Arguments;
|
||||
import releaser.internal.spring.ExecutionResult;
|
||||
import releaser.internal.tasks.ReleaseReleaserTask;
|
||||
import releaser.internal.tech.ExecutionResult;
|
||||
|
||||
public class PublishDocsReleaseTask implements ReleaseReleaserTask {
|
||||
|
||||
@@ -56,8 +56,7 @@ public class PublishDocsReleaseTask implements ReleaseReleaserTask {
|
||||
|
||||
@Override
|
||||
public ExecutionResult runTask(Arguments args) {
|
||||
this.releaser.publishDocs(args.originalVersion, args.versionFromBom);
|
||||
return ExecutionResult.success();
|
||||
return this.releaser.publishDocs(args.originalVersion, args.versionFromBom);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -18,8 +18,8 @@ package releaser.internal.tasks.release;
|
||||
|
||||
import releaser.internal.Releaser;
|
||||
import releaser.internal.spring.Arguments;
|
||||
import releaser.internal.spring.ExecutionResult;
|
||||
import releaser.internal.tasks.ReleaseReleaserTask;
|
||||
import releaser.internal.tech.ExecutionResult;
|
||||
|
||||
public class PushChangesReleaseTask implements ReleaseReleaserTask {
|
||||
|
||||
@@ -56,8 +56,7 @@ public class PushChangesReleaseTask implements ReleaseReleaserTask {
|
||||
|
||||
@Override
|
||||
public ExecutionResult runTask(Arguments args) {
|
||||
this.releaser.pushCurrentBranch(args.project);
|
||||
return ExecutionResult.success();
|
||||
return this.releaser.pushCurrentBranch(args.project);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -18,8 +18,8 @@ package releaser.internal.tasks.release;
|
||||
|
||||
import releaser.internal.Releaser;
|
||||
import releaser.internal.spring.Arguments;
|
||||
import releaser.internal.spring.ExecutionResult;
|
||||
import releaser.internal.tasks.DryRunReleaseReleaserTask;
|
||||
import releaser.internal.tech.ExecutionResult;
|
||||
|
||||
public class UpdatingPomsReleaseTask implements DryRunReleaseReleaserTask {
|
||||
|
||||
@@ -56,9 +56,8 @@ public class UpdatingPomsReleaseTask implements DryRunReleaseReleaserTask {
|
||||
|
||||
@Override
|
||||
public ExecutionResult runTask(Arguments args) {
|
||||
this.releaser.updateProjectFromBom(args.project, args.projects,
|
||||
return this.releaser.updateProjectFromBom(args.project, args.projects,
|
||||
args.versionFromBom);
|
||||
return ExecutionResult.success();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user