Improvements to common build and new Reactor task (merge with rebase) (#183)

* Reactor: For reference, mention additional inputs in app properties

* Polish: fix javadoc copypasta and mark potential problem in GitRepo

* Common: Expose method for git log (list revisions between 2 refs)

* Common: Only post-process RtGithub beans into CachingGithub

* Common: Make Sagan noOp if property is not explicitly set

* Common: Fix Process command executor outputting to app's stdout

This prevents the command executor from capturing the command's output.

* Common: Fix findTagOrBranchHeadRevision and log

In findTag... we need to compare name using refs/tags/
and refs/heads/ prefixes.

In log we need to peel symbolic tags to get the right
ObjectId. Optional.map did seem to cause issues.

* Common: Add isMergeCommit to SimpleCommit

* Common: Add method to find tag SHA by name

* Common: Polish how exit codes are generated and used

* Common: Add BuildReportHandler to show report earlier than last step

This commit also filters out tasks that haven't run yet, avoiding
NPE due to endTime being null.

* Reactor: restart task should not be part of dry-runs

* Reactor: Alter Gradle build command to include bumpVersionsInReadme task

* Reactor: Add GenerateReleaseNotesTask

Also added partial tests for the task.

Avoids generating notes if snapshot, mark as pre-release if milestone
or rc.

* Reactor: Split out configurations and use profiles for test

* Reactor: Fix org in application.yml

* Reactor: Fix some formatting

* Reactor: Force github OAuth token at Github client creation

* Reactor: Split parseChangelog into several more testable methods

* Reactor: Let interactive GenerateReleaseNotesTask force a log range

* Reactor: Allow multiple dispatch of note entries

Switching from a single TYPE to an EnumSet

* Reactor: Extract issue numbers in title too just in case

* Reactor: Fix alternative titles markdown and description

Also better protect agains Github client failures when
fetching more info like title and labels.

* Reactor: Polish format (newlines) in tag input, notes output

* Reactor: Check tag exists but not release. Check on SHA1

* Reactor: Make checks we can save notes draft BEFORE querying commits

* Reactor: Attempt to find existing release draft (max 2 month old), avoid unnecessary calls

If an existing draft is found, append notes to it.

* Reactor: Ask only for "from" change for interactive log/release notes
This commit is contained in:
Simon Baslé
2020-01-22 10:44:59 +01:00
committed by Marcin Grzejszczak
parent 7632b99031
commit 188c079bd6
22 changed files with 1448 additions and 140 deletions

View File

@@ -56,8 +56,8 @@ class BatchConfiguration {
@Bean
@ConditionalOnMissingBean
ExecutionResultHandler springBatchExecutionResultHandler(JobExplorer jobExplorer,
ConfigurableApplicationContext context) {
SpringBatchExecutionResultHandler springBatchExecutionResultHandler(
JobExplorer jobExplorer, ConfigurableApplicationContext context) {
return new SpringBatchExecutionResultHandler(jobExplorer, context);
}
@@ -74,11 +74,11 @@ class BatchConfiguration {
JobBuilderFactory jobBuilderFactory,
ProjectsToRunFactory projectsToRunFactory, JobLauncher jobLauncher,
FlowRunnerTaskExecutorSupplier flowRunnerTaskExecutorSupplier,
ConfigurableApplicationContext context,
ReleaserProperties releaserProperties) {
ConfigurableApplicationContext context, ReleaserProperties releaserProperties,
BuildReportHandler reportHandler) {
return new SpringBatchFlowRunner(stepBuilderFactory, jobBuilderFactory,
projectsToRunFactory, jobLauncher, flowRunnerTaskExecutorSupplier,
context, releaserProperties);
context, releaserProperties, reportHandler);
}
@Bean