#38 - Added execution of pre-release checks to release preparations.
We now also trigger mvn verify -Ppre-release to execute all checks bound to that profile (currently a check for snapshot third-party dependencies).
This commit is contained in:
@@ -139,6 +139,18 @@ public class BuildOperations {
|
||||
return doWithBuildSystem(module, BuildSystem::triggerBuild);
|
||||
}
|
||||
|
||||
/**
|
||||
* Triggers the pre-release checks for all modules of the given {@link TrainIteration}.
|
||||
*
|
||||
* @param iteration must not be {@literal null}.
|
||||
*/
|
||||
public void runPreReleaseChecks(TrainIteration iteration) {
|
||||
|
||||
Assert.notNull(iteration, "Train iteration must not be null!");
|
||||
|
||||
doWithBuildSystem(iteration, (system, module) -> system.triggerPreReleaseCheck(module));
|
||||
}
|
||||
|
||||
/**
|
||||
* Selects the build system for each {@link ModuleIteration} contained in the given {@link TrainIteration} and
|
||||
* executes the given function for it.
|
||||
|
||||
@@ -62,4 +62,12 @@ interface BuildSystem extends Plugin<Project> {
|
||||
ModuleIteration triggerDistributionBuild(ModuleIteration module);
|
||||
|
||||
ModuleIteration triggerBuild(ModuleIteration module);
|
||||
|
||||
/**
|
||||
* Triggers the pre-release checks for the given {@link ModuleIteration}.
|
||||
*
|
||||
* @param module must not be {@literal null}.
|
||||
* @return
|
||||
*/
|
||||
ModuleIteration triggerPreReleaseCheck(ModuleIteration module);
|
||||
}
|
||||
|
||||
@@ -265,6 +265,17 @@ class MavenBuildSystem implements BuildSystem {
|
||||
return module;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.release.build.BuildSystem#triggerPreReleaseCheck(org.springframework.data.release.model.ModuleIteration)
|
||||
*/
|
||||
public ModuleIteration triggerPreReleaseCheck(ModuleIteration module) {
|
||||
|
||||
mvn.execute(module.getProject(), "clean", "verify", "-Ppre-release");
|
||||
|
||||
return module;
|
||||
}
|
||||
|
||||
/**
|
||||
* Triggers Maven commands to deploy module artifacts to Spring Artifactory.
|
||||
*
|
||||
|
||||
@@ -76,6 +76,8 @@ class ReleaseCommands extends TimedCommand {
|
||||
|
||||
git.prepare(iteration);
|
||||
|
||||
build.runPreReleaseChecks(iteration);
|
||||
|
||||
misc.prepareChangelogs(iteration);
|
||||
misc.updateResources(iteration);
|
||||
build.updateProjectDescriptors(iteration, Phase.PREPARE);
|
||||
|
||||
Reference in New Issue
Block a user