Running samples only for meta release
This commit is contained in:
@@ -54,7 +54,6 @@ After project release
|
||||
- For `GA`/ `SR` release will create an issue in Spring Guides under https://github.com/spring-guides/getting-started-guides/issues/
|
||||
- For `GA`/ `SR` release will update the links under https://github.com/spring-cloud/spring-cloud-static/tree/gh-pages/current
|
||||
- Will update the release train project page (for Spring Cloud it will be `https://github.com/spring-projects/spring-cloud`)
|
||||
- Will update and run samples (for Spring Cloud it will be `https://github.com/spring-cloud/spring-cloud-core-tests`)
|
||||
|
||||
==== Meta-release
|
||||
|
||||
@@ -64,6 +63,7 @@ After project release
|
||||
** for `spring-cloud-sleuth`'s `2.1.0.RELEASE` version will resolve `2.1.x` branch
|
||||
- Performs the release tasks per each project
|
||||
- Performs the post release tasks at the end of the release
|
||||
- Will update and run samples (for Spring Cloud it will be `https://github.com/spring-cloud/spring-cloud-core-tests`)
|
||||
|
||||
IMPORTANT: For the meta-releaser to work we assume that the path to the
|
||||
custom configuration file for each project is always `config/releaser.yml`.
|
||||
|
||||
@@ -44,7 +44,6 @@ After project release
|
||||
- For `GA`/ `SR` release will create an issue in Spring Guides under https://github.com/spring-guides/getting-started-guides/issues/
|
||||
- For `GA`/ `SR` release will update the links under https://github.com/spring-cloud/spring-cloud-static/tree/gh-pages/current
|
||||
- Will update the release train project page (for Spring Cloud it will be `https://github.com/spring-projects/spring-cloud`)
|
||||
- Will update and run samples (for Spring Cloud it will be `https://github.com/spring-cloud/spring-cloud-core-tests`)
|
||||
|
||||
==== Meta-release
|
||||
|
||||
@@ -54,6 +53,7 @@ After project release
|
||||
** for `spring-cloud-sleuth`'s `2.1.0.RELEASE` version will resolve `2.1.x` branch
|
||||
- Performs the release tasks per each project
|
||||
- Performs the post release tasks at the end of the release
|
||||
- Will update and run samples (for Spring Cloud it will be `https://github.com/spring-cloud/spring-cloud-core-tests`)
|
||||
|
||||
IMPORTANT: For the meta-releaser to work we assume that the path to the
|
||||
custom configuration file for each project is always `config/releaser.yml`.
|
||||
|
||||
@@ -39,7 +39,8 @@ public class PostReleaseActions {
|
||||
* @param projects - set of project with versions to assert agains
|
||||
*/
|
||||
public void runUpdatedTests(Projects projects) {
|
||||
if (!this.properties.getGit().isRunUpdatedSamples()) {
|
||||
if (!this.properties.getGit().isRunUpdatedSamples() ||
|
||||
!this.properties.getMetaRelease().isEnabled()) {
|
||||
log.info("Will not update and run test samples, since the switch to do so "
|
||||
+ "is off. Set [releaser.git.run-updated-samples] to [true] to change that");
|
||||
return;
|
||||
|
||||
@@ -50,7 +50,18 @@ public class PostReleaseActionsTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void should_do_nothing_when_the_switch_is_off() {
|
||||
public void should_do_nothing_when_is_not_meta_release() {
|
||||
this.properties.getMetaRelease().setEnabled(false);
|
||||
PostReleaseActions actions = new PostReleaseActions(this.projectGitHandler,
|
||||
this.updater, this.builder, this.properties);
|
||||
|
||||
actions.runUpdatedTests(currentGa());
|
||||
|
||||
BDDAssertions.then(clonedTestSamples).isNull();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void should_do_nothing_when_the_switch_for_sample_check_is_off() {
|
||||
this.properties.getGit().setRunUpdatedSamples(false);
|
||||
PostReleaseActions actions = new PostReleaseActions(this.projectGitHandler,
|
||||
this.updater, this.builder, this.properties);
|
||||
@@ -62,6 +73,7 @@ public class PostReleaseActionsTests {
|
||||
|
||||
@Test
|
||||
public void should_update_project_and_run_tests() {
|
||||
this.properties.getMetaRelease().setEnabled(true);
|
||||
this.properties.getGit().setTestSamplesProjectUrl(tmpFile("spring-cloud-core-tests/").getAbsolutePath() + "/");
|
||||
this.properties.getMaven().setBuildCommand("touch build.log");
|
||||
PostReleaseActions actions = new PostReleaseActions(this.projectGitHandler,
|
||||
|
||||
Reference in New Issue
Block a user