Merge remote-tracking branch 'origin/main' into WIP_upgrade_deps

This commit is contained in:
Olga Maciaszek-Sharma
2022-03-30 15:56:28 +02:00
46 changed files with 443 additions and 432 deletions

View File

@@ -4,6 +4,7 @@ Manual changes to this file will be lost when it is generated again.
Edit the files in the src/main/asciidoc/ directory instead.
////
:jdkversion: 1.8
:org: spring-cloud
:repo: spring-cloud-release-tools
@@ -542,21 +543,21 @@ Below you can find a table with all the releaser options.
|===
|Name | Default | Description
|releaser.bash.build-command | echo "{{systemProps}}" | Command to be executed to build the project. If present "{{version}}" will be replaced by the provided version. "{{nextVersion}}" with the bumped snapshot version and "{{oldVersion}}" with the version before version updating.
|releaser.bash.deploy-command | echo "{{systemProps}}" | Command to be executed to deploy a built project. If present "{{version}}" will be replaced by the provided version. "{{nextVersion}}" with the bumped snapshot version and "{{oldVersion}}" with the version before version updating.
|releaser.bash.deploy-guides-command | echo "{{systemProps}}" | Command to be executed to build and deploy guides project only. If present "{{version}}" will be replaced by the provided version. "{{nextVersion}}" with the bumped snapshot version and "{{oldVersion}}" with the version before version updating.
|releaser.bash.generate-release-train-docs-command | echo "{{version}}" | Command to be executed to generate release train documentation.
|releaser.bash.publish-docs-command | mkdir -p target && echo "{{version}}" | Command to be executed to publish documentation. If present "{{version}}" will be replaced by the provided version. "{{nextVersion}}" with the bumped snapshot version and "{{oldVersion}}" with the version before version updating.
|releaser.bash.build-command | `echo "{{systemProps}}"` | Command to be executed to build the project. If present "{{version}}" will be replaced by the provided version. "{{nextVersion}}" with the bumped snapshot version and "{{oldVersion}}" with the version before version updating.
|releaser.bash.deploy-command | `echo "{{systemProps}}"` | Command to be executed to deploy a built project. If present "{{version}}" will be replaced by the provided version. "{{nextVersion}}" with the bumped snapshot version and "{{oldVersion}}" with the version before version updating.
|releaser.bash.deploy-guides-command | `echo "{{systemProps}}"` | Command to be executed to build and deploy guides project only. If present "{{version}}" will be replaced by the provided version. "{{nextVersion}}" with the bumped snapshot version and "{{oldVersion}}" with the version before version updating.
|releaser.bash.generate-release-train-docs-command | `echo "{{version}}"` | Command to be executed to generate release train documentation.
|releaser.bash.publish-docs-command | `mkdir -p target && echo "{{version}}"` | Command to be executed to publish documentation. If present "{{version}}" will be replaced by the provided version. "{{nextVersion}}" with the bumped snapshot version and "{{oldVersion}}" with the version before version updating.
|releaser.bash.system-properties | | Additional system properties that should be passed to the build / deploy commands. If present in other commands "{{systemProps}}" will be substituted with this property.
|releaser.bash.wait-time-in-minutes | 20 | Max wait time in minutes for the process to finish.
|releaser.bash.wait-time-in-minutes | `20` | Max wait time in minutes for the process to finish.
|releaser.fixed-versions | | Project name to its version - overrides all versions retrieved from a release train repository like Spring Cloud Release.
|releaser.flow.default-enabled | true | Should the default flow of jobs be preserved. If set to {@code false} will not register any jobs as beans, and it will be up to you to set the whole configuration of jobs.
|releaser.flow.default-enabled | `true` | Should the default flow of jobs be preserved. If set to {@code false} will not register any jobs as beans, and it will be up to you to set the whole configuration of jobs.
|releaser.git.all-test-sample-urls | | Project to urls mapping. For each project will clone the test project and will update its versions.
|releaser.git.clone-destination-dir | | Where should the release train repo get cloned to. If {@code null} defaults to a temporary directory.
|releaser.git.documentation-branch | | Branch to check out for the documentation project.
|releaser.git.documentation-url | | URL to the documentation Git repository.
|releaser.git.fetch-versions-from-git | true | If {@code true} then should fill the map of versions from Git. If {@code false} then picks fixed versions.
|releaser.git.number-of-checked-milestones | 50 | In order not to iterate endlessly over milestones we introduce a threshold of milestones that we will go through to find the matching milestone.
|releaser.git.fetch-versions-from-git | `true` | If {@code true} then should fill the map of versions from Git. If {@code false} then picks fixed versions.
|releaser.git.number-of-checked-milestones | `50` | In order not to iterate endlessly over milestones we introduce a threshold of milestones that we will go through to find the matching milestone.
|releaser.git.oauth-token | | GitHub OAuth token to be used to interact with GitHub repo.
|releaser.git.org-name | | The organization name on Github.
|releaser.git.password | | Optional Git password. If not passed keys will be used for authentication.
@@ -566,59 +567,59 @@ Below you can find a table with all the releaser options.
|releaser.git.release-train-docs-url | | URL to the release train documentation.
|releaser.git.release-train-wiki-page-prefix | | Page prefix for the release train wiki. E.g. for [Spring-Cloud-Finchley-Release-Notes] it would be [Spring-Cloud].
|releaser.git.release-train-wiki-url | | URL to the release train wiki.
|releaser.git.run-updated-samples | false | If set to {@code false}, will not update the test samples.
|releaser.git.run-updated-samples | `false` | If set to {@code false}, will not update the test samples.
|releaser.git.spring-project-branch | | Branch to check out for the release train project.
|releaser.git.spring-project-url | | URL to the release train project page repository.
|releaser.git.test-samples-branch | | Branch to check out for the test samples.
|releaser.git.test-samples-project-url | | URL to test samples.
|releaser.git.update-all-test-samples | false | If set to {@code false}, will not clone and update the samples for all projects.
|releaser.git.update-documentation-repo | false | If {@code false}, will not update the documentation repository.
|releaser.git.update-github-milestones | false | If set to {@code false}, will not update Github milestones.
|releaser.git.update-release-train-docs | false | If set to {@code false}, will not update the release train docs.
|releaser.git.update-release-train-wiki | false | If set to {@code false}, will not clone and update the release train wiki.
|releaser.git.update-spring-guides | false | If set to {@code false}, will not update Spring Guides for a release train.
|releaser.git.update-spring-project | false | If set to {@code false}, will not update the Spring Project for a release train. E.g. for Spring Cloud will not update https://cloud.spring.io .
|releaser.git.update-start-spring-io | false | If set to {@code false}, will not update start.spring.io for a release train.
|releaser.git.update-all-test-samples | `false` | If set to {@code false}, will not clone and update the samples for all projects.
|releaser.git.update-documentation-repo | `false` | If {@code false}, will not update the documentation repository.
|releaser.git.update-github-milestones | `false` | If set to {@code false}, will not update Github milestones.
|releaser.git.update-release-train-docs | `false` | If set to {@code false}, will not update the release train docs.
|releaser.git.update-release-train-wiki | `false` | If set to {@code false}, will not clone and update the release train wiki.
|releaser.git.update-spring-guides | `false` | If set to {@code false}, will not update Spring Guides for a release train.
|releaser.git.update-spring-project | `false` | If set to {@code false}, will not update the Spring Project for a release train. E.g. for Spring Cloud will not update https://cloud.spring.io .
|releaser.git.update-start-spring-io | `false` | If set to {@code false}, will not update start.spring.io for a release train.
|releaser.git.username | | Optional Git username. If not passed keys will be used for authentication.
|releaser.gradle.build-command | ./gradlew clean build publishToMavenLocal --console=plain -PnextVersion={{nextVersion}} -PoldVersion={{oldVersion}} -PcurrentVersion={{version}} {{systemProps}} | Command to be executed to build the project If present "{{version}}" will be replaced by the provided version. "{{nextVersion}}" with the bumped snapshot version and "{{oldVersion}}" with the version before version updating.
|releaser.gradle.deploy-command | ./gradlew publish --console=plain -PnextVersion={{nextVersion}} -PoldVersion={{oldVersion}} -PcurrentVersion={{version}} {{systemProps}} | Command to be executed to deploy a built project.
|releaser.gradle.deploy-guides-command | ./gradlew clean build deployGuides --console=plain -PnextVersion={{nextVersion}} -PoldVersion={{oldVersion}} -PcurrentVersion={{version}} {{systemProps}} | Command to be executed to build and deploy guides project only.
|releaser.gradle.generate-release-train-docs-command | ./gradlew generateReleaseTrainDocs --console=plain -PnextVersion={{nextVersion}} -PoldVersion={{oldVersion}} -PcurrentVersion={{version}} {{systemProps}} | Command to be executed to generate release train documentation.
|releaser.gradle.build-command | `./gradlew clean build publishToMavenLocal --console=plain -PnextVersion={{nextVersion}} -PoldVersion={{oldVersion}} -PcurrentVersion={{version}} {{systemProps}}` | Command to be executed to build the project If present "{{version}}" will be replaced by the provided version. "{{nextVersion}}" with the bumped snapshot version and "{{oldVersion}}" with the version before version updating.
|releaser.gradle.deploy-command | `./gradlew publish --console=plain -PnextVersion={{nextVersion}} -PoldVersion={{oldVersion}} -PcurrentVersion={{version}} {{systemProps}}` | Command to be executed to deploy a built project.
|releaser.gradle.deploy-guides-command | `./gradlew clean build deployGuides --console=plain -PnextVersion={{nextVersion}} -PoldVersion={{oldVersion}} -PcurrentVersion={{version}} {{systemProps}}` | Command to be executed to build and deploy guides project only.
|releaser.gradle.generate-release-train-docs-command | `./gradlew generateReleaseTrainDocs --console=plain -PnextVersion={{nextVersion}} -PoldVersion={{oldVersion}} -PcurrentVersion={{version}} {{systemProps}}` | Command to be executed to generate release train documentation.
|releaser.gradle.gradle-props-substitution | | A mapping that should be applied to {@code gradle.properties} in order to perform a substitution of properties. The mapping is from a property inside {@code gradle.properties} to the projects name. Example. In {@code gradle.properties} you have {@code verifierVersion=1.0.0} . You want this property to get updated with the value of {@code spring-cloud-contract} version. Then it's enough to do the mapping like this for this Releaser's property: {@code verifierVersion=spring-cloud-contract}.
|releaser.gradle.ignored-gradle-regex | | List of regular expressions of ignored gradle props. Defaults to test projects and samples.
|releaser.gradle.publish-docs-command | ./gradlew publishDocs --console=plain -PnextVersion={{nextVersion}} -PoldVersion={{oldVersion}} -PcurrentVersion={{version}} {{systemProps}} | Command to be executed to publish documentation. If present "{{version}}" will be replaced by the provided version.
|releaser.gradle.publish-docs-command | `./gradlew publishDocs --console=plain -PnextVersion={{nextVersion}} -PoldVersion={{oldVersion}} -PcurrentVersion={{version}} {{systemProps}}` | Command to be executed to publish documentation. If present "{{version}}" will be replaced by the provided version.
|releaser.gradle.system-properties | | Additional system properties that should be passed to the build / deploy commands. If present in other commands "{{systemProps}}" will be substituted with this property.
|releaser.gradle.wait-time-in-minutes | 20 | Max wait time in minutes for the process to finish.
|releaser.maven.build-command | ./mvnw clean install -B -Pdocs {{systemProps}} | Command to be executed to build the project. If present "{{version}}" will be replaced by the provided version. "{{nextVersion}}" with the bumped snapshot version and "{{oldVersion}}" with the version before version updating.
|releaser.maven.deploy-command | ./mvnw deploy -DskipTests -B -Pfast,deploy {{systemProps}} | Command to be executed to deploy a built project. If present "{{version}}" will be replaced by the provided version. "{{nextVersion}}" with the bumped snapshot version and "{{oldVersion}}" with the version before version updating.
|releaser.maven.deploy-guides-command | ./mvnw clean verify deploy -B -Pguides,integration -pl guides {{systemProps}} | Command to be executed to build and deploy guides project only. If present "{{version}}" will be replaced by the provided version. "{{nextVersion}}" with the bumped snapshot version and "{{oldVersion}}" with the version before version updating.
|releaser.maven.generate-release-train-docs-command | bash release_train.sh --retrieveversions --version {{version}} --ghpages --auto | Command to be executed to generate release train documentation.
|releaser.maven.publish-docs-command | ./mvnw deploy -DskipTests -B -Pfast,deploy,docs -pl docs {{systemProps}} | Command to be executed to publish documentation. If present "{{version}}" will be replaced by the provided version.
|releaser.gradle.wait-time-in-minutes | `20` | Max wait time in minutes for the process to finish.
|releaser.maven.build-command | `./mvnw clean install -B -Pdocs {{systemProps}}` | Command to be executed to build the project. If present "{{version}}" will be replaced by the provided version. "{{nextVersion}}" with the bumped snapshot version and "{{oldVersion}}" with the version before version updating.
|releaser.maven.deploy-command | `./mvnw deploy -DskipTests -B -Pfast,deploy {{systemProps}}` | Command to be executed to deploy a built project. If present "{{version}}" will be replaced by the provided version. "{{nextVersion}}" with the bumped snapshot version and "{{oldVersion}}" with the version before version updating.
|releaser.maven.deploy-guides-command | `./mvnw clean verify deploy -B -Pguides,integration -pl guides {{systemProps}}` | Command to be executed to build and deploy guides project only. If present "{{version}}" will be replaced by the provided version. "{{nextVersion}}" with the bumped snapshot version and "{{oldVersion}}" with the version before version updating.
|releaser.maven.generate-release-train-docs-command | `bash release_train.sh --retrieveversions --version {{version}} --ghpages --auto` | Command to be executed to generate release train documentation.
|releaser.maven.publish-docs-command | `./mvnw deploy -DskipTests -B -Pfast,deploy,docs -pl docs {{systemProps}}` | Command to be executed to publish documentation. If present "{{version}}" will be replaced by the provided version.
|releaser.maven.system-properties | | Additional system properties that should be passed to the build / deploy commands. If present in other commands "{{systemProps}}" will be substituted with this property.
|releaser.maven.wait-time-in-minutes | 20 | Max wait time in minutes for the process to finish.
|releaser.meta-release.enabled | false | Are we releasing the whole suite of apps or only one?
|releaser.maven.wait-time-in-minutes | `20` | Max wait time in minutes for the process to finish.
|releaser.meta-release.enabled | `false` | Are we releasing the whole suite of apps or only one?
|releaser.meta-release.git-org-url | | The URL of the Git organization. We'll append each project's name to it.
|releaser.meta-release.projects-to-skip | | Names of projects to skip deployment for meta-release.
|releaser.meta-release.release-group-thread-count | 4 | Number of threads per release group. E.g. for thread count of 4 if there are 6 projects in a release group, 4 of them will be executed in parallel and 2 will wait for their turn.
|releaser.meta-release.release-group-timeout-in-minutes | 180 | Timeout in minutes during which we're waiting for a single composite task per a project to be executed. That means that if set to e.g. 180 then a release process for a single project should take at most 180 minutes.
|releaser.meta-release.release-group-thread-count | `4` | Number of threads per release group. E.g. for thread count of 4 if there are 6 projects in a release group, 4 of them will be executed in parallel and 2 will wait for their turn.
|releaser.meta-release.release-group-timeout-in-minutes | `180` | Timeout in minutes during which we're waiting for a single composite task per a project to be executed. That means that if set to e.g. 180 then a release process for a single project should take at most 180 minutes.
|releaser.meta-release.release-groups | | If provided, allows to provide groups of projects that can be ran in parallel. E.g. {@code --releaser.meta-release.release-groups[0]=projectA,projectB,projectC} {@code --releaser.meta-release.release-groups[1]=projectD,projectE} {@code --releaser.meta-release.release-groups[2]=projectF,projectG} The order is still provided by the list of versions passed to the releaser. Basing on that order, and this value we are able to build a flow with projects.
|releaser.meta-release.release-train-dependency-names | | All the names of dependencies that should be updated with the release train project version.
|releaser.meta-release.release-train-project-name | | Name of the release train project.
|releaser.pom.bom-version-pattern | | The pattern to match a version property in a BOM. Remember to catch the dependency name in a group. E.g. "^(spring-cloud-.*)\\.version$".
|releaser.pom.branch | main | Which branch of release train BOM should be checked out. Defaults to {@code main}.
|releaser.pom.ignored-pom-regex | ^.*\.git/.*$ | List of regular expressions of ignored poms. Defaults to test projects and samples.
|releaser.pom.branch | `main` | Which branch of release train BOM should be checked out. Defaults to {@code main}.
|releaser.pom.ignored-pom-regex | `^.*\.git/.*$` | List of regular expressions of ignored poms. Defaults to test projects and samples.
|releaser.pom.pom-with-boot-starter-parent | | Subfolder of the pom that contains the {@code spring-boot-starer-parent} dependency.
|releaser.pom.this-train-bom | | Subfolder of the pom that contains the versions for the release train.
|releaser.post-release-tasks-only | false | If set to {@code true} will run only post release tasks.
|releaser.sagan.base-url | https://spring.io | URL to the Sagan API.
|releaser.sagan.boot-section-file-name | sagan-boot.adoc | Name of the ascii doc file with boot part of this project's Sagan project page. Linked with {@link this#docsAdocsFile}.
|releaser.sagan.docs-adocs-file | docs/src/main/asciidoc | Folder with asciidoctor files for docs.
|releaser.sagan.index-section-file-name | sagan-index.adoc | Name of the ascii doc file with core part of this project's Sagan project page. Linked with {@link this#docsAdocsFile}.
|releaser.sagan.update-sagan | false | If set to {@code false} will not update Sagan.
|releaser.skip-post-release-tasks | false | If set to {@code true} will not run post release tasks.
|releaser.template.enabled | false | Should template generation be enabled.
|releaser.post-release-tasks-only | `false` | If set to {@code true} will run only post release tasks.
|releaser.sagan.base-url | `https://spring.io` | URL to the Sagan API.
|releaser.sagan.boot-section-file-name | `sagan-boot.adoc` | Name of the ascii doc file with boot part of this project's Sagan project page. Linked with {@link this#docsAdocsFile}.
|releaser.sagan.docs-adocs-file | `docs/src/main/asciidoc` | Folder with asciidoctor files for docs.
|releaser.sagan.index-section-file-name | `sagan-index.adoc` | Name of the ascii doc file with core part of this project's Sagan project page. Linked with {@link this#docsAdocsFile}.
|releaser.sagan.update-sagan | `false` | If set to {@code false} will not update Sagan.
|releaser.skip-post-release-tasks | `false` | If set to {@code true} will not run post release tasks.
|releaser.template.enabled | `false` | Should template generation be enabled.
|releaser.template.template-folder | | Folder in which blog, email etc. templates are stored.
|releaser.versions.all-versions-file-url | https://raw.githubusercontent.com/spring-io/start.spring.io/master/start-site/src/main/resources/application.yml | Url to a file containing all the versions. Defaults to YAML from start.spring.io.
|releaser.versions.all-versions-file-url | `https://raw.githubusercontent.com/spring-io/start.spring.io/master/start-site/src/main/resources/application.yml` | Url to a file containing all the versions. Defaults to YAML from start.spring.io.
|releaser.versions.bom-name | | Name in the YAML from initilizr for BOM mappings.
|releaser.working-dir | | By default Releaser assumes running the program from the current working directory. If you want to change this behaviour - just change this value.
@@ -684,18 +685,18 @@ You may get an exception similar to the following:
[source]
----
Caused by: org.eclipse.jgit.errors.TransportException: git@github.com:spring-cloud/spring-cloud-sleuth.git: Auth fail
at org.eclipse.jgit.transport.JschConfigSessionFactory.getSession(JschConfigSessionFactory.java:160) ~[org.eclipse.jgit-4.6.0.201612231935-r.jar!/:4.6.0.201612231935-r]
at org.eclipse.jgit.transport.SshTransport.getSession(SshTransport.java:137) ~[org.eclipse.jgit-4.6.0.201612231935-r.jar!/:4.6.0.201612231935-r]
at org.eclipse.jgit.transport.TransportGitSsh$SshPushConnection.<init>(TransportGitSsh.java:322) ~[org.eclipse.jgit-4.6.0.201612231935-r.jar!/:4.6.0.201612231935-r]
at org.eclipse.jgit.transport.TransportGitSsh.openPush(TransportGitSsh.java:167) ~[org.eclipse.jgit-4.6.0.201612231935-r.jar!/:4.6.0.201612231935-r]
at org.eclipse.jgit.transport.PushProcess.execute(PushProcess.java:160) ~[org.eclipse.jgit-4.6.0.201612231935-r.jar!/:4.6.0.201612231935-r]
at org.eclipse.jgit.transport.Transport.push(Transport.java:1275) ~[org.eclipse.jgit-4.6.0.201612231935-r.jar!/:4.6.0.201612231935-r]
at org.eclipse.jgit.api.PushCommand.call(PushCommand.java:161) ~[org.eclipse.jgit-4.6.0.201612231935-r.jar!/:4.6.0.201612231935-r]
... 25 common frames omitted
at org.eclipse.jgit.transport.JschConfigSessionFactory.getSession(JschConfigSessionFactory.java:160) ~[org.eclipse.jgit-4.6.0.201612231935-r.jar!/:4.6.0.201612231935-r]
at org.eclipse.jgit.transport.SshTransport.getSession(SshTransport.java:137) ~[org.eclipse.jgit-4.6.0.201612231935-r.jar!/:4.6.0.201612231935-r]
at org.eclipse.jgit.transport.TransportGitSsh$SshPushConnection.<init>(TransportGitSsh.java:322) ~[org.eclipse.jgit-4.6.0.201612231935-r.jar!/:4.6.0.201612231935-r]
at org.eclipse.jgit.transport.TransportGitSsh.openPush(TransportGitSsh.java:167) ~[org.eclipse.jgit-4.6.0.201612231935-r.jar!/:4.6.0.201612231935-r]
at org.eclipse.jgit.transport.PushProcess.execute(PushProcess.java:160) ~[org.eclipse.jgit-4.6.0.201612231935-r.jar!/:4.6.0.201612231935-r]
at org.eclipse.jgit.transport.Transport.push(Transport.java:1275) ~[org.eclipse.jgit-4.6.0.201612231935-r.jar!/:4.6.0.201612231935-r]
at org.eclipse.jgit.api.PushCommand.call(PushCommand.java:161) ~[org.eclipse.jgit-4.6.0.201612231935-r.jar!/:4.6.0.201612231935-r]
... 25 common frames omitted
Caused by: com.jcraft.jsch.JSchException: Auth fail
at com.jcraft.jsch.Session.connect(Session.java:512) ~[jsch-0.1.53.jar!/:na]
at org.eclipse.jgit.transport.JschConfigSessionFactory.getSession(JschConfigSessionFactory.java:117) ~[org.eclipse.jgit-4.6.0.201612231935-r.jar!/:4.6.0.201612231935-r]
... 31 common frames omitted
at com.jcraft.jsch.Session.connect(Session.java:512) ~[jsch-0.1.53.jar!/:na]
at org.eclipse.jgit.transport.JschConfigSessionFactory.getSession(JschConfigSessionFactory.java:117) ~[org.eclipse.jgit-4.6.0.201612231935-r.jar!/:4.6.0.201612231935-r]
... 31 common frames omitted
----
To fix that just call, run the following commands before running the app:
@@ -714,10 +715,10 @@ If you know what you're doing and want to skip snapshot / milestone version chec
[source,xml]
----
<properties>
<zipkin.version>1.19.2-M2</zipkin.version><!-- @releaser:version-check-off -->
<zipkin-reporter.version>0.6.12</zipkin-reporter.version>
</properties>
<properties>
<zipkin.version>1.19.2-M2</zipkin.version><!-- @releaser:version-check-off -->
<zipkin-reporter.version>0.6.12</zipkin-reporter.version>
</properties>
----
== Building
@@ -836,7 +837,7 @@ git pull origin jenkins-releaser-config
. Create a copy of that file and set the name of the copy to <name-of-the-release>.properties (for example: 2020_0_2.properties)
. Edit this file and update all project versions to their latest release.
.. The latest release for each project can be determined by navigating to the individual Github project and checking for commits since the last release, where the last release is marked by a commit from spring-cloud-issues. If there are commits since the last release, change the value in the properties file. If there are no commits since the last release (i.e. the last commit is from spring-cloud-issues) then do not increment the value.
. Make a note of the projects that did not increment their version number, as those projects will need to be specified later in the “RELEASER_PROJECTS_TO_SKIP” field in the Jenkins project spring-cloud-meta-releaser
. Make a note of the projects that did not increment their version number, as those projects will need to be specified later in the “RELEASER_PROJECTS_TO_SKIP” field in the Jenkins project spring-cloud-<release train>-meta-releaser
NOTE: Sometimes the release value for a project will need to be incremented by more than one,
for example if there was a release for an individual project due to a CVE and there were commits made after that release. To determine the new version number, look for the latest version in the commit history from spring-cloud-issues.
@@ -849,34 +850,34 @@ git push origin jenkins-releaser-config
```
[start=8]
. Request that project owners verify versions in the Spring Cloud Slack room by sharing a github link to the 2020_0_x.properties you just pushed.
. Now go to the `spring-cloud-build-releaser` job on Jenkins
. Now go to the `spring-cloud-build-<train>-version-releaser` job on Jenkins. For example: `spring-cloud-build-Kilburn-main-releaser`.
NOTE: The builder project is required to run first because it is required for spring-cloud-function and spring-cloud-stream. All other spring-cloud builds will run after spring-cloud-function and spring-cloud-stream have performed a successful release
[start=10]
. Click `Build With Parameters` on the left side of page
image::https://raw.githubusercontent.com/spring-cloud/spring-cloud-release-tools/RELEASE-DOC-UPDATE/docs/src/main/asciidoc/images/build-releaser-buildwithparams.png[Build With Params]
image::https://raw.githubusercontent.com/spring-cloud/spring-cloud-release-tools/main/docs/src/main/asciidoc/images/build-releaser-buildwithparams.png[Build With Params]
[start=11]
. In the RELEASE_VERSION column enter the name of the file you created without the properties extension
image::https://raw.githubusercontent.com/spring-cloud/spring-cloud-release-tools/RELEASE-DOC-UPDATE/docs/src/main/asciidoc/images/build-releaser-setreleaseversion.png[Set The Version]
image::https://raw.githubusercontent.com/spring-cloud/spring-cloud-release-tools/main/docs/src/main/asciidoc/images/build-releaser-setreleaseversion.png[Set The Version]
[start=12]
. Click the “DRY_RUN” option and then click `Build` button as shown below:
image::https://raw.githubusercontent.com/spring-cloud/spring-cloud-release-tools/RELEASE-DOC-UPDATE/docs/src/main/asciidoc/images/build-releaser-selectdryrun.png[Set Dry Run]
image::https://raw.githubusercontent.com/spring-cloud/spring-cloud-release-tools/main/docs/src/main/asciidoc/images/build-releaser-selectdryrun.png[Set Dry Run]
[start=13]
. Once the dry run is successfully complete we need to remove all of the artifacts from the dry run.
To do this select the `spring-cloud-purge-worker-artifacts-releaser` job from the list of jobs.
. Once the purge work has completed successfully,
. Select Rebuild Last option on the left side of the page.
. Now go to the `spring-cloud-build-releaser` job on Jenkins
. Now go to the `spring-cloud-build-<release train>-version-releaser` job on Jenkins
, Select the last build
. When build page appears click the `Rebuild` option.
image::https://raw.githubusercontent.com/spring-cloud/spring-cloud-release-tools/RELEASE-DOC-UPDATE/docs/src/main/asciidoc/images/build-releaser-selectlastrun.png[Select Last Run]
image::https://raw.githubusercontent.com/spring-cloud/spring-cloud-release-tools/main/docs/src/main/asciidoc/images/build-releaser-selectlastrun.png[Select Last Run]
[start=18]
. Deselect “DRY_RUN” then click the `Build` button.
@@ -884,15 +885,15 @@ image::https://raw.githubusercontent.com/spring-cloud/spring-cloud-release-tools
=== Full Spring Cloud Release
. Once Spring Cloud Stream and Function projects are released verify that all other builds are succeeding
. Now go to the `Spring-cloud-meta-releaser` job on Jenkins
. Now go to the `Spring-cloud-<release train>-meta-releaser` job on Jenkins. For example: `spring-cloud-Kilburn-meta-releaser`
. Click `Build With Parameters` on the left side of page
image::https://raw.githubusercontent.com/spring-cloud/spring-cloud-release-tools/RELEASE-DOC-UPDATE/docs/src/main/asciidoc/images/meta-releaser-buildwithparameters.png[Build With Params]
image::https://raw.githubusercontent.com/spring-cloud/spring-cloud-release-tools/main/docs/src/main/asciidoc/images/meta-releaser-buildwithparameters.png[Build With Params]
[start=4]
. Update RELEASE_VERSION with the current release and corresponds to the release file.
image::https://raw.githubusercontent.com/spring-cloud/spring-cloud-release-tools/RELEASE-DOC-UPDATE/docs/src/main/asciidoc/images/meta-releaser-setreleaseversion.png[Set The Version]
image::https://raw.githubusercontent.com/spring-cloud/spring-cloud-release-tools/main/docs/src/main/asciidoc/images/meta-releaser-setreleaseversion.png[Set The Version]
[start=5]
. Add spring-cloud-build to RELEASER_PROJECTS_TO_SKIP, so it wont be rebuilt.
@@ -900,7 +901,7 @@ Also any other projects that did not change in the properties files, add it to t
. Select Dry Run option
. Click Build
image::https://raw.githubusercontent.com/spring-cloud/spring-cloud-release-tools/RELEASE-DOC-UPDATE/docs/src/main/asciidoc/images/build-releaser-selectdryrun.png[Set Dry Run]
image::https://raw.githubusercontent.com/spring-cloud/spring-cloud-release-tools/main/docs/src/main/asciidoc/images/build-releaser-selectdryrun.png[Set Dry Run]
TIP: If there is a failure you can launch the build from the failed project. To do this:
@@ -914,7 +915,7 @@ NOTE: Spring Cloud K8s Integration tests may time out. Restart the build.
. Upon a successful "DRY_RUN".
. Click "Rebuild Last" option on the left side of the page.
image::https://raw.githubusercontent.com/spring-cloud/spring-cloud-release-tools/RELEASE-DOC-UPDATE/docs/src/main/asciidoc/images/meta-releaser-rebuildlast.png[Rebuild Last]
image::https://raw.githubusercontent.com/spring-cloud/spring-cloud-release-tools/main/docs/src/main/asciidoc/images/meta-releaser-rebuildlast.png[Rebuild Last]
[start=10]
. When the build page is rendered.
@@ -1140,9 +1141,9 @@ If you need to add `ignoredClassPatterns` or `ignoredResourcePatterns` to your s
<artifactId>duplicate-finder-maven-plugin</artifactId>
<configuration>
<ignoredClassPatterns>
<ignoredClassPattern>org.joda.time.base.BaseDateTime</ignoredClassPattern>
<ignoredClassPattern>.*module-info</ignoredClassPattern>
</ignoredClassPatterns>
<ignoredClassPattern>org.joda.time.base.BaseDateTime</ignoredClassPattern>
<ignoredClassPattern>.*module-info</ignoredClassPattern>
</ignoredClassPatterns>
<ignoredResourcePatterns>
<ignoredResourcePattern>changelog.txt</ignoredResourcePattern>
</ignoredResourcePatterns>
@@ -1153,3 +1154,4 @@ If you need to add `ignoredClassPatterns` or `ignoredResourcePatterns` to your s
----

View File

@@ -18,7 +18,7 @@ Of course remember that you MUST NOT use Java 1.8 features in the main sources.
If you do so your app will break during the Maven build.
== Spring Cloud Release Process
include::/Users/glennrenfro/project/spring-cloud-release-tools/docs/src/main/asciidoc/spring-cloud-release-process.adoc[]
include::https://raw.githubusercontent.com/spring-cloud/spring-cloud-release-tools/main/docs/src/main/asciidoc/spring-cloud-release-process.adoc[]
== Contributing

View File

@@ -1,21 +1,21 @@
|===
|Name | Default | Description
|releaser.bash.build-command | echo "{{systemProps}}" | Command to be executed to build the project. If present "{{version}}" will be replaced by the provided version. "{{nextVersion}}" with the bumped snapshot version and "{{oldVersion}}" with the version before version updating.
|releaser.bash.deploy-command | echo "{{systemProps}}" | Command to be executed to deploy a built project. If present "{{version}}" will be replaced by the provided version. "{{nextVersion}}" with the bumped snapshot version and "{{oldVersion}}" with the version before version updating.
|releaser.bash.deploy-guides-command | echo "{{systemProps}}" | Command to be executed to build and deploy guides project only. If present "{{version}}" will be replaced by the provided version. "{{nextVersion}}" with the bumped snapshot version and "{{oldVersion}}" with the version before version updating.
|releaser.bash.generate-release-train-docs-command | echo "{{version}}" | Command to be executed to generate release train documentation.
|releaser.bash.publish-docs-command | mkdir -p target && echo "{{version}}" | Command to be executed to publish documentation. If present "{{version}}" will be replaced by the provided version. "{{nextVersion}}" with the bumped snapshot version and "{{oldVersion}}" with the version before version updating.
|releaser.bash.build-command | `echo "{{systemProps}}"` | Command to be executed to build the project. If present "{{version}}" will be replaced by the provided version. "{{nextVersion}}" with the bumped snapshot version and "{{oldVersion}}" with the version before version updating.
|releaser.bash.deploy-command | `echo "{{systemProps}}"` | Command to be executed to deploy a built project. If present "{{version}}" will be replaced by the provided version. "{{nextVersion}}" with the bumped snapshot version and "{{oldVersion}}" with the version before version updating.
|releaser.bash.deploy-guides-command | `echo "{{systemProps}}"` | Command to be executed to build and deploy guides project only. If present "{{version}}" will be replaced by the provided version. "{{nextVersion}}" with the bumped snapshot version and "{{oldVersion}}" with the version before version updating.
|releaser.bash.generate-release-train-docs-command | `echo "{{version}}"` | Command to be executed to generate release train documentation.
|releaser.bash.publish-docs-command | `mkdir -p target && echo "{{version}}"` | Command to be executed to publish documentation. If present "{{version}}" will be replaced by the provided version. "{{nextVersion}}" with the bumped snapshot version and "{{oldVersion}}" with the version before version updating.
|releaser.bash.system-properties | | Additional system properties that should be passed to the build / deploy commands. If present in other commands "{{systemProps}}" will be substituted with this property.
|releaser.bash.wait-time-in-minutes | 20 | Max wait time in minutes for the process to finish.
|releaser.bash.wait-time-in-minutes | `20` | Max wait time in minutes for the process to finish.
|releaser.fixed-versions | | Project name to its version - overrides all versions retrieved from a release train repository like Spring Cloud Release.
|releaser.flow.default-enabled | true | Should the default flow of jobs be preserved. If set to {@code false} will not register any jobs as beans, and it will be up to you to set the whole configuration of jobs.
|releaser.flow.default-enabled | `true` | Should the default flow of jobs be preserved. If set to {@code false} will not register any jobs as beans, and it will be up to you to set the whole configuration of jobs.
|releaser.git.all-test-sample-urls | | Project to urls mapping. For each project will clone the test project and will update its versions.
|releaser.git.clone-destination-dir | | Where should the release train repo get cloned to. If {@code null} defaults to a temporary directory.
|releaser.git.documentation-branch | | Branch to check out for the documentation project.
|releaser.git.documentation-url | | URL to the documentation Git repository.
|releaser.git.fetch-versions-from-git | true | If {@code true} then should fill the map of versions from Git. If {@code false} then picks fixed versions.
|releaser.git.number-of-checked-milestones | 50 | In order not to iterate endlessly over milestones we introduce a threshold of milestones that we will go through to find the matching milestone.
|releaser.git.fetch-versions-from-git | `true` | If {@code true} then should fill the map of versions from Git. If {@code false} then picks fixed versions.
|releaser.git.number-of-checked-milestones | `50` | In order not to iterate endlessly over milestones we introduce a threshold of milestones that we will go through to find the matching milestone.
|releaser.git.oauth-token | | GitHub OAuth token to be used to interact with GitHub repo.
|releaser.git.org-name | | The organization name on Github.
|releaser.git.password | | Optional Git password. If not passed keys will be used for authentication.
@@ -25,60 +25,60 @@
|releaser.git.release-train-docs-url | | URL to the release train documentation.
|releaser.git.release-train-wiki-page-prefix | | Page prefix for the release train wiki. E.g. for [Spring-Cloud-Finchley-Release-Notes] it would be [Spring-Cloud].
|releaser.git.release-train-wiki-url | | URL to the release train wiki.
|releaser.git.run-updated-samples | false | If set to {@code false}, will not update the test samples.
|releaser.git.run-updated-samples | `false` | If set to {@code false}, will not update the test samples.
|releaser.git.spring-project-branch | | Branch to check out for the release train project.
|releaser.git.spring-project-url | | URL to the release train project page repository.
|releaser.git.test-samples-branch | | Branch to check out for the test samples.
|releaser.git.test-samples-project-url | | URL to test samples.
|releaser.git.update-all-test-samples | false | If set to {@code false}, will not clone and update the samples for all projects.
|releaser.git.update-documentation-repo | false | If {@code false}, will not update the documentation repository.
|releaser.git.update-github-milestones | false | If set to {@code false}, will not update Github milestones.
|releaser.git.update-release-train-docs | false | If set to {@code false}, will not update the release train docs.
|releaser.git.update-release-train-wiki | false | If set to {@code false}, will not clone and update the release train wiki.
|releaser.git.update-spring-guides | false | If set to {@code false}, will not update Spring Guides for a release train.
|releaser.git.update-spring-project | false | If set to {@code false}, will not update the Spring Project for a release train. E.g. for Spring Cloud will not update https://cloud.spring.io .
|releaser.git.update-start-spring-io | false | If set to {@code false}, will not update start.spring.io for a release train.
|releaser.git.update-all-test-samples | `false` | If set to {@code false}, will not clone and update the samples for all projects.
|releaser.git.update-documentation-repo | `false` | If {@code false}, will not update the documentation repository.
|releaser.git.update-github-milestones | `false` | If set to {@code false}, will not update Github milestones.
|releaser.git.update-release-train-docs | `false` | If set to {@code false}, will not update the release train docs.
|releaser.git.update-release-train-wiki | `false` | If set to {@code false}, will not clone and update the release train wiki.
|releaser.git.update-spring-guides | `false` | If set to {@code false}, will not update Spring Guides for a release train.
|releaser.git.update-spring-project | `false` | If set to {@code false}, will not update the Spring Project for a release train. E.g. for Spring Cloud will not update https://cloud.spring.io .
|releaser.git.update-start-spring-io | `false` | If set to {@code false}, will not update start.spring.io for a release train.
|releaser.git.username | | Optional Git username. If not passed keys will be used for authentication.
|releaser.gradle.build-command | ./gradlew clean build publishToMavenLocal --console=plain -PnextVersion={{nextVersion}} -PoldVersion={{oldVersion}} -PcurrentVersion={{version}} {{systemProps}} | Command to be executed to build the project If present "{{version}}" will be replaced by the provided version. "{{nextVersion}}" with the bumped snapshot version and "{{oldVersion}}" with the version before version updating.
|releaser.gradle.deploy-command | ./gradlew publish --console=plain -PnextVersion={{nextVersion}} -PoldVersion={{oldVersion}} -PcurrentVersion={{version}} {{systemProps}} | Command to be executed to deploy a built project.
|releaser.gradle.deploy-guides-command | ./gradlew clean build deployGuides --console=plain -PnextVersion={{nextVersion}} -PoldVersion={{oldVersion}} -PcurrentVersion={{version}} {{systemProps}} | Command to be executed to build and deploy guides project only.
|releaser.gradle.generate-release-train-docs-command | ./gradlew generateReleaseTrainDocs --console=plain -PnextVersion={{nextVersion}} -PoldVersion={{oldVersion}} -PcurrentVersion={{version}} {{systemProps}} | Command to be executed to generate release train documentation.
|releaser.gradle.build-command | `./gradlew clean build publishToMavenLocal --console=plain -PnextVersion={{nextVersion}} -PoldVersion={{oldVersion}} -PcurrentVersion={{version}} {{systemProps}}` | Command to be executed to build the project If present "{{version}}" will be replaced by the provided version. "{{nextVersion}}" with the bumped snapshot version and "{{oldVersion}}" with the version before version updating.
|releaser.gradle.deploy-command | `./gradlew publish --console=plain -PnextVersion={{nextVersion}} -PoldVersion={{oldVersion}} -PcurrentVersion={{version}} {{systemProps}}` | Command to be executed to deploy a built project.
|releaser.gradle.deploy-guides-command | `./gradlew clean build deployGuides --console=plain -PnextVersion={{nextVersion}} -PoldVersion={{oldVersion}} -PcurrentVersion={{version}} {{systemProps}}` | Command to be executed to build and deploy guides project only.
|releaser.gradle.generate-release-train-docs-command | `./gradlew generateReleaseTrainDocs --console=plain -PnextVersion={{nextVersion}} -PoldVersion={{oldVersion}} -PcurrentVersion={{version}} {{systemProps}}` | Command to be executed to generate release train documentation.
|releaser.gradle.gradle-props-substitution | | A mapping that should be applied to {@code gradle.properties} in order to perform a substitution of properties. The mapping is from a property inside {@code gradle.properties} to the projects name. Example. In {@code gradle.properties} you have {@code verifierVersion=1.0.0} . You want this property to get updated with the value of {@code spring-cloud-contract} version. Then it's enough to do the mapping like this for this Releaser's property: {@code verifierVersion=spring-cloud-contract}.
|releaser.gradle.ignored-gradle-regex | | List of regular expressions of ignored gradle props. Defaults to test projects and samples.
|releaser.gradle.publish-docs-command | ./gradlew publishDocs --console=plain -PnextVersion={{nextVersion}} -PoldVersion={{oldVersion}} -PcurrentVersion={{version}} {{systemProps}} | Command to be executed to publish documentation. If present "{{version}}" will be replaced by the provided version.
|releaser.gradle.publish-docs-command | `./gradlew publishDocs --console=plain -PnextVersion={{nextVersion}} -PoldVersion={{oldVersion}} -PcurrentVersion={{version}} {{systemProps}}` | Command to be executed to publish documentation. If present "{{version}}" will be replaced by the provided version.
|releaser.gradle.system-properties | | Additional system properties that should be passed to the build / deploy commands. If present in other commands "{{systemProps}}" will be substituted with this property.
|releaser.gradle.wait-time-in-minutes | 20 | Max wait time in minutes for the process to finish.
|releaser.maven.build-command | ./mvnw clean install -B -Pdocs {{systemProps}} | Command to be executed to build the project. If present "{{version}}" will be replaced by the provided version. "{{nextVersion}}" with the bumped snapshot version and "{{oldVersion}}" with the version before version updating.
|releaser.maven.deploy-command | ./mvnw deploy -DskipTests -B -Pfast,deploy {{systemProps}} | Command to be executed to deploy a built project. If present "{{version}}" will be replaced by the provided version. "{{nextVersion}}" with the bumped snapshot version and "{{oldVersion}}" with the version before version updating.
|releaser.maven.deploy-guides-command | ./mvnw clean verify deploy -B -Pguides,integration -pl guides {{systemProps}} | Command to be executed to build and deploy guides project only. If present "{{version}}" will be replaced by the provided version. "{{nextVersion}}" with the bumped snapshot version and "{{oldVersion}}" with the version before version updating.
|releaser.maven.generate-release-train-docs-command | bash release_train.sh --retrieveversions --version {{version}} --ghpages --auto | Command to be executed to generate release train documentation.
|releaser.maven.publish-docs-command | ./mvnw deploy -DskipTests -B -Pfast,deploy,docs -pl docs {{systemProps}} | Command to be executed to publish documentation. If present "{{version}}" will be replaced by the provided version.
|releaser.gradle.wait-time-in-minutes | `20` | Max wait time in minutes for the process to finish.
|releaser.maven.build-command | `./mvnw clean install -B -Pdocs {{systemProps}}` | Command to be executed to build the project. If present "{{version}}" will be replaced by the provided version. "{{nextVersion}}" with the bumped snapshot version and "{{oldVersion}}" with the version before version updating.
|releaser.maven.deploy-command | `./mvnw deploy -DskipTests -B -Pfast,deploy {{systemProps}}` | Command to be executed to deploy a built project. If present "{{version}}" will be replaced by the provided version. "{{nextVersion}}" with the bumped snapshot version and "{{oldVersion}}" with the version before version updating.
|releaser.maven.deploy-guides-command | `./mvnw clean verify deploy -B -Pguides,integration -pl guides {{systemProps}}` | Command to be executed to build and deploy guides project only. If present "{{version}}" will be replaced by the provided version. "{{nextVersion}}" with the bumped snapshot version and "{{oldVersion}}" with the version before version updating.
|releaser.maven.generate-release-train-docs-command | `bash release_train.sh --retrieveversions --version {{version}} --ghpages --auto` | Command to be executed to generate release train documentation.
|releaser.maven.publish-docs-command | `./mvnw deploy -DskipTests -B -Pfast,deploy,docs -pl docs {{systemProps}}` | Command to be executed to publish documentation. If present "{{version}}" will be replaced by the provided version.
|releaser.maven.system-properties | | Additional system properties that should be passed to the build / deploy commands. If present in other commands "{{systemProps}}" will be substituted with this property.
|releaser.maven.wait-time-in-minutes | 20 | Max wait time in minutes for the process to finish.
|releaser.meta-release.enabled | false | Are we releasing the whole suite of apps or only one?
|releaser.maven.wait-time-in-minutes | `20` | Max wait time in minutes for the process to finish.
|releaser.meta-release.enabled | `false` | Are we releasing the whole suite of apps or only one?
|releaser.meta-release.git-org-url | | The URL of the Git organization. We'll append each project's name to it.
|releaser.meta-release.projects-to-skip | | Names of projects to skip deployment for meta-release.
|releaser.meta-release.release-group-thread-count | 4 | Number of threads per release group. E.g. for thread count of 4 if there are 6 projects in a release group, 4 of them will be executed in parallel and 2 will wait for their turn.
|releaser.meta-release.release-group-timeout-in-minutes | 180 | Timeout in minutes during which we're waiting for a single composite task per a project to be executed. That means that if set to e.g. 180 then a release process for a single project should take at most 180 minutes.
|releaser.meta-release.release-group-thread-count | `4` | Number of threads per release group. E.g. for thread count of 4 if there are 6 projects in a release group, 4 of them will be executed in parallel and 2 will wait for their turn.
|releaser.meta-release.release-group-timeout-in-minutes | `180` | Timeout in minutes during which we're waiting for a single composite task per a project to be executed. That means that if set to e.g. 180 then a release process for a single project should take at most 180 minutes.
|releaser.meta-release.release-groups | | If provided, allows to provide groups of projects that can be ran in parallel. E.g. {@code --releaser.meta-release.release-groups[0]=projectA,projectB,projectC} {@code --releaser.meta-release.release-groups[1]=projectD,projectE} {@code --releaser.meta-release.release-groups[2]=projectF,projectG} The order is still provided by the list of versions passed to the releaser. Basing on that order, and this value we are able to build a flow with projects.
|releaser.meta-release.release-train-dependency-names | | All the names of dependencies that should be updated with the release train project version.
|releaser.meta-release.release-train-project-name | | Name of the release train project.
|releaser.pom.bom-version-pattern | | The pattern to match a version property in a BOM. Remember to catch the dependency name in a group. E.g. "^(spring-cloud-.*)\\.version$".
|releaser.pom.branch | main | Which branch of release train BOM should be checked out. Defaults to {@code main}.
|releaser.pom.ignored-pom-regex | ^.*\.git/.*$ | List of regular expressions of ignored poms. Defaults to test projects and samples.
|releaser.pom.branch | `main` | Which branch of release train BOM should be checked out. Defaults to {@code main}.
|releaser.pom.ignored-pom-regex | `^.*\.git/.*$` | List of regular expressions of ignored poms. Defaults to test projects and samples.
|releaser.pom.pom-with-boot-starter-parent | | Subfolder of the pom that contains the {@code spring-boot-starer-parent} dependency.
|releaser.pom.this-train-bom | | Subfolder of the pom that contains the versions for the release train.
|releaser.post-release-tasks-only | false | If set to {@code true} will run only post release tasks.
|releaser.sagan.base-url | https://spring.io | URL to the Sagan API.
|releaser.sagan.boot-section-file-name | sagan-boot.adoc | Name of the ascii doc file with boot part of this project's Sagan project page. Linked with {@link this#docsAdocsFile}.
|releaser.sagan.docs-adocs-file | docs/src/main/asciidoc | Folder with asciidoctor files for docs.
|releaser.sagan.index-section-file-name | sagan-index.adoc | Name of the ascii doc file with core part of this project's Sagan project page. Linked with {@link this#docsAdocsFile}.
|releaser.sagan.update-sagan | false | If set to {@code false} will not update Sagan.
|releaser.skip-post-release-tasks | false | If set to {@code true} will not run post release tasks.
|releaser.template.enabled | false | Should template generation be enabled.
|releaser.post-release-tasks-only | `false` | If set to {@code true} will run only post release tasks.
|releaser.sagan.base-url | `https://spring.io` | URL to the Sagan API.
|releaser.sagan.boot-section-file-name | `sagan-boot.adoc` | Name of the ascii doc file with boot part of this project's Sagan project page. Linked with {@link this#docsAdocsFile}.
|releaser.sagan.docs-adocs-file | `docs/src/main/asciidoc` | Folder with asciidoctor files for docs.
|releaser.sagan.index-section-file-name | `sagan-index.adoc` | Name of the ascii doc file with core part of this project's Sagan project page. Linked with {@link this#docsAdocsFile}.
|releaser.sagan.update-sagan | `false` | If set to {@code false} will not update Sagan.
|releaser.skip-post-release-tasks | `false` | If set to {@code true} will not run post release tasks.
|releaser.template.enabled | `false` | Should template generation be enabled.
|releaser.template.template-folder | | Folder in which blog, email etc. templates are stored.
|releaser.versions.all-versions-file-url | https://raw.githubusercontent.com/spring-io/start.spring.io/master/start-site/src/main/resources/application.yml | Url to a file containing all the versions. Defaults to YAML from start.spring.io.
|releaser.versions.all-versions-file-url | `https://raw.githubusercontent.com/spring-io/start.spring.io/master/start-site/src/main/resources/application.yml` | Url to a file containing all the versions. Defaults to YAML from start.spring.io.
|releaser.versions.bom-name | | Name in the YAML from initilizr for BOM mappings.
|releaser.working-dir | | By default Releaser assumes running the program from the current working directory. If you want to change this behaviour - just change this value.
|===
|===

View File

@@ -25,7 +25,7 @@ git pull origin jenkins-releaser-config
. Create a copy of that file and set the name of the copy to <name-of-the-release>.properties (for example: 2020_0_2.properties)
. Edit this file and update all project versions to their latest release.
.. The latest release for each project can be determined by navigating to the individual Github project and checking for commits since the last release, where the last release is marked by a commit from spring-cloud-issues. If there are commits since the last release, change the value in the properties file. If there are no commits since the last release (i.e. the last commit is from spring-cloud-issues) then do not increment the value.
. Make a note of the projects that did not increment their version number, as those projects will need to be specified later in the “RELEASER_PROJECTS_TO_SKIP” field in the Jenkins project spring-cloud-meta-releaser
. Make a note of the projects that did not increment their version number, as those projects will need to be specified later in the “RELEASER_PROJECTS_TO_SKIP” field in the Jenkins project spring-cloud-<release train>-meta-releaser
NOTE: Sometimes the release value for a project will need to be incremented by more than one,
for example if there was a release for an individual project due to a CVE and there were commits made after that release. To determine the new version number, look for the latest version in the commit history from spring-cloud-issues.
@@ -38,34 +38,34 @@ git push origin jenkins-releaser-config
```
[start=8]
. Request that project owners verify versions in the Spring Cloud Slack room by sharing a github link to the 2020_0_x.properties you just pushed.
. Now go to the `spring-cloud-build-releaser` job on Jenkins
. Now go to the `spring-cloud-build-<train>-version-releaser` job on Jenkins. For example: `spring-cloud-build-Kilburn-main-releaser`.
NOTE: The builder project is required to run first because it is required for spring-cloud-function and spring-cloud-stream. All other spring-cloud builds will run after spring-cloud-function and spring-cloud-stream have performed a successful release
[start=10]
. Click `Build With Parameters` on the left side of page
image::https://raw.githubusercontent.com/spring-cloud/spring-cloud-release-tools/RELEASE-DOC-UPDATE/docs/src/main/asciidoc/images/build-releaser-buildwithparams.png[Build With Params]
image::https://raw.githubusercontent.com/spring-cloud/spring-cloud-release-tools/main/docs/src/main/asciidoc/images/build-releaser-buildwithparams.png[Build With Params]
[start=11]
. In the RELEASE_VERSION column enter the name of the file you created without the properties extension
image::https://raw.githubusercontent.com/spring-cloud/spring-cloud-release-tools/RELEASE-DOC-UPDATE/docs/src/main/asciidoc/images/build-releaser-setreleaseversion.png[Set The Version]
image::https://raw.githubusercontent.com/spring-cloud/spring-cloud-release-tools/main/docs/src/main/asciidoc/images/build-releaser-setreleaseversion.png[Set The Version]
[start=12]
. Click the “DRY_RUN” option and then click `Build` button as shown below:
image::https://raw.githubusercontent.com/spring-cloud/spring-cloud-release-tools/RELEASE-DOC-UPDATE/docs/src/main/asciidoc/images/build-releaser-selectdryrun.png[Set Dry Run]
image::https://raw.githubusercontent.com/spring-cloud/spring-cloud-release-tools/main/docs/src/main/asciidoc/images/build-releaser-selectdryrun.png[Set Dry Run]
[start=13]
. Once the dry run is successfully complete we need to remove all of the artifacts from the dry run.
To do this select the `spring-cloud-purge-worker-artifacts-releaser` job from the list of jobs.
. Once the purge work has completed successfully,
. Select Rebuild Last option on the left side of the page.
. Now go to the `spring-cloud-build-releaser` job on Jenkins
. Now go to the `spring-cloud-build-<release train>-version-releaser` job on Jenkins
, Select the last build
. When build page appears click the `Rebuild` option.
image::https://raw.githubusercontent.com/spring-cloud/spring-cloud-release-tools/RELEASE-DOC-UPDATE/docs/src/main/asciidoc/images/build-releaser-selectlastrun.png[Select Last Run]
image::https://raw.githubusercontent.com/spring-cloud/spring-cloud-release-tools/main/docs/src/main/asciidoc/images/build-releaser-selectlastrun.png[Select Last Run]
[start=18]
. Deselect “DRY_RUN” then click the `Build` button.
@@ -73,15 +73,15 @@ image::https://raw.githubusercontent.com/spring-cloud/spring-cloud-release-tools
=== Full Spring Cloud Release
. Once Spring Cloud Stream and Function projects are released verify that all other builds are succeeding
. Now go to the `Spring-cloud-meta-releaser` job on Jenkins
. Now go to the `Spring-cloud-<release train>-meta-releaser` job on Jenkins. For example: `spring-cloud-Kilburn-meta-releaser`
. Click `Build With Parameters` on the left side of page
image::https://raw.githubusercontent.com/spring-cloud/spring-cloud-release-tools/RELEASE-DOC-UPDATE/docs/src/main/asciidoc/images/meta-releaser-buildwithparameters.png[Build With Params]
image::https://raw.githubusercontent.com/spring-cloud/spring-cloud-release-tools/main/docs/src/main/asciidoc/images/meta-releaser-buildwithparameters.png[Build With Params]
[start=4]
. Update RELEASE_VERSION with the current release and corresponds to the release file.
image::https://raw.githubusercontent.com/spring-cloud/spring-cloud-release-tools/RELEASE-DOC-UPDATE/docs/src/main/asciidoc/images/meta-releaser-setreleaseversion.png[Set The Version]
image::https://raw.githubusercontent.com/spring-cloud/spring-cloud-release-tools/main/docs/src/main/asciidoc/images/meta-releaser-setreleaseversion.png[Set The Version]
[start=5]
. Add spring-cloud-build to RELEASER_PROJECTS_TO_SKIP, so it wont be rebuilt.
@@ -89,7 +89,7 @@ Also any other projects that did not change in the properties files, add it to t
. Select Dry Run option
. Click Build
image::https://raw.githubusercontent.com/spring-cloud/spring-cloud-release-tools/RELEASE-DOC-UPDATE/docs/src/main/asciidoc/images/build-releaser-selectdryrun.png[Set Dry Run]
image::https://raw.githubusercontent.com/spring-cloud/spring-cloud-release-tools/main/docs/src/main/asciidoc/images/build-releaser-selectdryrun.png[Set Dry Run]
TIP: If there is a failure you can launch the build from the failed project. To do this:
@@ -103,7 +103,7 @@ NOTE: Spring Cloud K8s Integration tests may time out. Restart the build.
. Upon a successful "DRY_RUN".
. Click "Rebuild Last" option on the left side of the page.
image::https://raw.githubusercontent.com/spring-cloud/spring-cloud-release-tools/RELEASE-DOC-UPDATE/docs/src/main/asciidoc/images/meta-releaser-rebuildlast.png[Rebuild Last]
image::https://raw.githubusercontent.com/spring-cloud/spring-cloud-release-tools/main/docs/src/main/asciidoc/images/meta-releaser-rebuildlast.png[Rebuild Last]
[start=10]
. When the build page is rendered.

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2019 the original author or authors.
* Copyright 2013-2022 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.

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2019 the original author or authors.
* Copyright 2013-2022 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.
@@ -22,10 +22,9 @@ import java.net.URISyntaxException;
import java.util.Arrays;
import org.eclipse.jgit.api.errors.GitAPIException;
import org.junit.Rule;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.rules.TemporaryFolder;
import org.junit.jupiter.api.io.TempDir;
import releaser.cloud.SpringCloudReleaserProperties;
import releaser.cloud.docs.TestUtils;
import releaser.internal.ReleaserProperties;
@@ -43,9 +42,7 @@ import static org.assertj.core.api.BDDAssertions.thenThrownBy;
*/
public class SpringCloudMavenBomParserTests {
@Rule
public TemporaryFolder tmp = new TemporaryFolder();
@TempDir
File tmpFolder;
File springCloudReleaseProject;
@@ -54,7 +51,6 @@ public class SpringCloudMavenBomParserTests {
@BeforeEach
public void setup() throws URISyntaxException, IOException, GitAPIException {
this.tmpFolder = this.tmp.newFolder();
TestUtils.prepareLocalRepo();
FileSystemUtils.copyRecursively(file("/projects"), this.tmpFolder);
this.springCloudReleaseProject = new File(this.tmpFolder, "/spring-cloud-release");

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2019 the original author or authors.
* Copyright 2013-2022 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.
@@ -26,10 +26,9 @@ import java.util.Collections;
import javax.validation.constraints.NotNull;
import org.assertj.core.api.BDDAssertions;
import org.junit.Rule;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.rules.TemporaryFolder;
import org.junit.jupiter.api.io.TempDir;
import org.mockito.BDDMockito;
import releaser.cloud.SpringCloudReleaserProperties;
import releaser.cloud.github.SpringCloudGithubIssuesAccessor;
@@ -48,11 +47,9 @@ import org.springframework.util.FileSystemUtils;
*/
public class SpringCloudCustomProjectDocumentationUpdaterTests {
@Rule
public TemporaryFolder tmp = new TemporaryFolder();
File project;
@TempDir
File tmpFolder;
ProjectGitHandler handler;
@@ -65,7 +62,6 @@ public class SpringCloudCustomProjectDocumentationUpdaterTests {
@BeforeEach
public void setup() throws IOException, URISyntaxException {
this.tmpFolder = this.tmp.newFolder();
this.project = new File(SpringCloudCustomProjectDocumentationUpdater.class
.getResource("/projects/spring-cloud-static").toURI());
TestUtils.prepareLocalRepo();

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2019 the original author or authors.
* Copyright 2013-2022 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.
@@ -25,10 +25,8 @@ import com.jcabi.github.Issue;
import com.jcabi.github.Repo;
import com.jcabi.github.Repos;
import com.jcabi.github.mock.MkGithub;
import org.junit.Rule;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.rules.TemporaryFolder;
import org.mockito.BDDMockito;
import releaser.cloud.SpringCloudReleaserProperties;
import releaser.internal.ReleaserProperties;
@@ -44,9 +42,6 @@ import static org.assertj.core.api.BDDAssertions.thenThrownBy;
*/
public class SpringCloudGithubIssuesTests {
@Rule
public TemporaryFolder folder = new TemporaryFolder();
ReleaserProperties properties = SpringCloudReleaserProperties.get();
MkGithub github;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2019 the original author or authors.
* Copyright 2013-2022 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.
@@ -35,7 +35,6 @@ public class AbstractSpringCloudAcceptanceTests extends AbstractSpringAcceptance
@BeforeEach
public void setupCloud() throws Exception {
this.temporaryFolder = this.tmp.newFolder();
this.springCloudConsulProject = new File(
AbstractSpringAcceptanceTests.class.getResource("/projects/spring-cloud-consul").toURI());
this.springCloudBuildProject = new File(

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2019 the original author or authors.
* Copyright 2013-2022 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.

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2019 the original author or authors.
* Copyright 2013-2022 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.
@@ -22,6 +22,7 @@ import java.util.LinkedHashMap;
import java.util.Map;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.io.TempDir;
import org.mockito.BDDMockito;
import releaser.internal.Releaser;
import releaser.internal.ReleaserProperties;
@@ -39,7 +40,6 @@ import releaser.internal.tasks.TrainPostReleaseReleaserTask;
import releaser.internal.tasks.composite.MetaReleaseCompositeTask;
import releaser.internal.tasks.composite.ReleaseCompositeTask;
import releaser.internal.tasks.release.BuildProjectReleaseTask;
import releaser.internal.tech.BuildUnstableException;
import releaser.internal.tech.ExecutionResult;
import org.springframework.beans.factory.annotation.Value;
@@ -64,17 +64,35 @@ import static org.mockito.BDDMockito.given;
*/
public class SpringMetaReleaseAcceptanceTests extends AbstractSpringCloudMetaAcceptanceTests {
@TempDir
File tempDirTestSamplesProject;
@TempDir
File tempDirReleaseTrainDocs;
@TempDir
File tempDirSpringCloud;
@TempDir
File tempDirReleaseTrainWiki;
@TempDir
File tempDirAllTestSample;
@Test
public void should_perform_a_meta_release_of_sc_release_and_consul() throws Exception {
public void should_perform_a_meta_release_of_sc_release_and_consul(@TempDir File tempDirSpringCloudConsulOrigin,
@TempDir File tempDirSpringCloudConsulProject) throws Exception {
checkoutReleaseTrainBranch("/projects/spring-cloud-release/", "Greenwich");
File origin = cloneToTemporaryDirectory(this.springCloudConsulProject);
File origin = cloneToTemporaryDirectory(tempDirSpringCloudConsulOrigin, this.springCloudConsulProject);
assertThatClonedConsulProjectIsInSnapshots(origin);
File project = cloneToTemporaryDirectory(tmpFile("spring-cloud-consul"));
File project = cloneToTemporaryDirectory(tempDirSpringCloudConsulProject, tmpFile("spring-cloud-consul"));
GitTestUtils.setOriginOnProjectToTmp(origin, project);
run(defaultRunner(),
properties("debugx=true").properties("test.metarelease=true").properties(
metaReleaseArgs(project).bomBranch("vGreenwich.SR2").addFixedVersions(edgwareSr10()).build()),
properties("debugx=true").properties("test.metarelease=true")
.properties(metaReleaseArgs(project, tempDirTestSamplesProject, tempDirReleaseTrainDocs,
tempDirSpringCloud, tempDirReleaseTrainWiki, tempDirAllTestSample)
.bomBranch("vGreenwich.SR2").addFixedVersions(edgwareSr10()).build()),
context -> {
SpringReleaser releaser = context.getBean(SpringReleaser.class);
NonAssertingTestProjectGitHandler nonAssertingTestProjectGitHandler = context
@@ -104,16 +122,18 @@ public class SpringMetaReleaseAcceptanceTests extends AbstractSpringCloudMetaAcc
}
@Test
public void should_perform_a_meta_release_of_sc_release_and_consul_in_parallel() throws Exception {
public void should_perform_a_meta_release_of_sc_release_and_consul_in_parallel(
@TempDir File tempDirSpringCloudConsulOrigin, @TempDir File tempDirSpringCloudConsulProject)
throws Exception {
checkoutReleaseTrainBranch("/projects/spring-cloud-release/", "Greenwich");
File origin = cloneToTemporaryDirectory(this.springCloudConsulProject);
File origin = cloneToTemporaryDirectory(tempDirSpringCloudConsulOrigin, this.springCloudConsulProject);
assertThatClonedConsulProjectIsInSnapshots(origin);
File project = cloneToTemporaryDirectory(tmpFile("spring-cloud-consul"));
File project = cloneToTemporaryDirectory(tempDirSpringCloudConsulProject, tmpFile("spring-cloud-consul"));
GitTestUtils.setOriginOnProjectToTmp(origin, project);
run(defaultRunner(),
properties("debugx=true").properties("test.metarelease=true")
.properties(metaReleaseArgsForParallel(project).bomBranch("vGreenwich.SR2")
run(defaultRunner(), properties("debugx=true").properties("test.metarelease=true")
.properties(metaReleaseArgsForParallel(project, tempDirTestSamplesProject, tempDirReleaseTrainDocs,
tempDirSpringCloud, tempDirReleaseTrainWiki, tempDirAllTestSample).bomBranch("vGreenwich.SR2")
.addFixedVersions(edgwareSr10())
.metaReleaseGroups("example1,example2",
"spring-cloud-build,spring-cloud-consul,spring-cloud-release")
@@ -150,16 +170,20 @@ public class SpringMetaReleaseAcceptanceTests extends AbstractSpringCloudMetaAcc
}
@Test
public void should_perform_a_meta_release_dry_run_of_sc_release_and_consul() throws Exception {
public void should_perform_a_meta_release_dry_run_of_sc_release_and_consul(
@TempDir File tempDirSpringCloudConsulOrigin, @TempDir File tempDirSpringCloudConsulProject)
throws Exception {
checkoutReleaseTrainBranch("/projects/spring-cloud-release/", "Greenwich");
File origin = cloneToTemporaryDirectory(this.springCloudConsulProject);
File origin = cloneToTemporaryDirectory(tempDirSpringCloudConsulOrigin, this.springCloudConsulProject);
assertThatClonedConsulProjectIsInSnapshots(origin);
File project = cloneToTemporaryDirectory(tmpFile("spring-cloud-consul"));
File project = cloneToTemporaryDirectory(tempDirSpringCloudConsulProject, tmpFile("spring-cloud-consul"));
GitTestUtils.setOriginOnProjectToTmp(origin, project);
run(defaultRunner(),
properties("debugx=true").properties("test.metarelease=true").properties(
metaReleaseArgs(project).bomBranch("vGreenwich.SR2").addFixedVersions(edgwareSr10()).build()),
properties("debugx=true").properties("test.metarelease=true")
.properties(metaReleaseArgs(project, tempDirTestSamplesProject, tempDirReleaseTrainDocs,
tempDirSpringCloud, tempDirReleaseTrainWiki, tempDirAllTestSample)
.bomBranch("vGreenwich.SR2").addFixedVersions(edgwareSr10()).build()),
context -> {
SpringReleaser releaser = context.getBean(SpringReleaser.class);
NonAssertingTestProjectGitHandler nonAssertingTestProjectGitHandler = context
@@ -191,18 +215,22 @@ public class SpringMetaReleaseAcceptanceTests extends AbstractSpringCloudMetaAcc
}
@Test
public void should_not_release_any_projects_when_they_are_on_list_of_projects_to_skip() throws Exception {
public void should_not_release_any_projects_when_they_are_on_list_of_projects_to_skip(
@TempDir File tempDirSpringCloudConsulOrigin, @TempDir File tempDirSpringCloudConsulProject,
@TempDir File temporaryDestination) throws Exception {
checkoutReleaseTrainBranch("/projects/spring-cloud-release/", "Greenwich");
File origin = cloneToTemporaryDirectory(this.springCloudConsulProject);
File origin = cloneToTemporaryDirectory(tempDirSpringCloudConsulOrigin, this.springCloudConsulProject);
assertThatClonedConsulProjectIsInSnapshots(origin);
File project = cloneToTemporaryDirectory(tmpFile("spring-cloud-consul"));
File project = cloneToTemporaryDirectory(tempDirSpringCloudConsulProject, tmpFile("spring-cloud-consul"));
GitTestUtils.setOriginOnProjectToTmp(origin, project);
File temporaryDestination = this.tmp.newFolder();
run(defaultRunner(), properties("debugx=true").properties("test.metarelease=true", "test.mockBuild=true")
.properties(metaReleaseArgs(project).bomBranch("Greenwich")
.addFixedVersions(consulAndReleaseSnapshots()).updateReleaseTrainWiki(false)
.cloneDestinationDirectory(temporaryDestination).projectsToSkip("spring-cloud-consul").build()),
run(defaultRunner(),
properties("debugx=true").properties("test.metarelease=true", "test.mockBuild=true")
.properties(metaReleaseArgs(project, tempDirTestSamplesProject, tempDirReleaseTrainDocs,
tempDirSpringCloud, tempDirReleaseTrainWiki, tempDirAllTestSample)
.bomBranch("Greenwich").addFixedVersions(consulAndReleaseSnapshots())
.updateReleaseTrainWiki(false).cloneDestinationDirectory(temporaryDestination)
.projectsToSkip("spring-cloud-consul").build()),
context -> {
SpringReleaser releaser = context.getBean(SpringReleaser.class);
BuildProjectReleaseTask build = context.getBean(BuildProjectReleaseTask.class);
@@ -222,19 +250,21 @@ public class SpringMetaReleaseAcceptanceTests extends AbstractSpringCloudMetaAcc
}
@Test
public void should_perform_a_meta_release_of_consul_only_when_run_from_got_passed() throws Exception {
public void should_perform_a_meta_release_of_consul_only_when_run_from_got_passed(
@TempDir File tempDirSpringCloudConsulOrigin, @TempDir File tempDirSpringCloudConsulProject,
@TempDir File temporaryDestination) throws Exception {
checkoutReleaseTrainBranch("/projects/spring-cloud-release/", "Greenwich");
File origin = cloneToTemporaryDirectory(this.springCloudConsulProject);
File origin = cloneToTemporaryDirectory(tempDirSpringCloudConsulOrigin, this.springCloudConsulProject);
assertThatClonedConsulProjectIsInSnapshots(origin);
File project = cloneToTemporaryDirectory(tmpFile("spring-cloud-consul"));
File project = cloneToTemporaryDirectory(tempDirSpringCloudConsulProject, tmpFile("spring-cloud-consul"));
GitTestUtils.setOriginOnProjectToTmp(origin, project);
File temporaryDestination = this.tmp.newFolder();
run(defaultRunner(),
properties("debugx=true").properties("test.metarelease=true", "test.mockBuild=true")
.properties(metaReleaseArgs(project).bomBranch("Greenwich")
.addFixedVersions(releaseConsulBuildSnapshots())
.cloneDestinationDirectory(temporaryDestination).build()),
.properties(metaReleaseArgs(project, tempDirTestSamplesProject, tempDirReleaseTrainDocs,
tempDirSpringCloud, tempDirReleaseTrainWiki, tempDirAllTestSample)
.bomBranch("Greenwich").addFixedVersions(releaseConsulBuildSnapshots())
.cloneDestinationDirectory(temporaryDestination).build()),
context -> {
SpringReleaser releaser = context.getBean(SpringReleaser.class);
BuildProjectReleaseTask build = context.getBean(BuildProjectReleaseTask.class);
@@ -263,19 +293,21 @@ public class SpringMetaReleaseAcceptanceTests extends AbstractSpringCloudMetaAcc
}
@Test
public void should_perform_a_meta_release_of_consul_only_when_task_names_got_passed() throws Exception {
public void should_perform_a_meta_release_of_consul_only_when_task_names_got_passed(
@TempDir File tempDirSpringCloudConsulOrigin, @TempDir File tempDirSpringCloudConsulProject,
@TempDir File temporaryDestination) throws Exception {
checkoutReleaseTrainBranch("/projects/spring-cloud-release/", "Greenwich");
File origin = cloneToTemporaryDirectory(this.springCloudConsulProject);
File origin = cloneToTemporaryDirectory(tempDirSpringCloudConsulOrigin, this.springCloudConsulProject);
assertThatClonedConsulProjectIsInSnapshots(origin);
File project = cloneToTemporaryDirectory(tmpFile("spring-cloud-consul"));
File project = cloneToTemporaryDirectory(tempDirSpringCloudConsulProject, tmpFile("spring-cloud-consul"));
GitTestUtils.setOriginOnProjectToTmp(origin, project);
File temporaryDestination = this.tmp.newFolder();
run(defaultRunner(),
properties("debugx=true").properties("test.metarelease=true", "test.mockBuild=true")
.properties(metaReleaseArgs(project).bomBranch("Greenwich")
.addFixedVersions(releaseConsulBuildSnapshots())
.cloneDestinationDirectory(temporaryDestination).build()),
.properties(metaReleaseArgs(project, tempDirTestSamplesProject, tempDirReleaseTrainDocs,
tempDirSpringCloud, tempDirReleaseTrainWiki, tempDirAllTestSample)
.bomBranch("Greenwich").addFixedVersions(releaseConsulBuildSnapshots())
.cloneDestinationDirectory(temporaryDestination).build()),
context -> {
SpringReleaser releaser = context.getBean(SpringReleaser.class);
BuildProjectReleaseTask build = context.getBean(BuildProjectReleaseTask.class);
@@ -304,18 +336,22 @@ public class SpringMetaReleaseAcceptanceTests extends AbstractSpringCloudMetaAcc
}
@Test
public void should_not_execute_any_subsequent_task_when_first_one_fails() throws Exception {
public void should_not_execute_any_subsequent_task_when_first_one_fails(
@TempDir File tempDirSpringCloudConsulOrigin, @TempDir File tempDirSpringCloudConsulProject)
throws Exception {
checkoutReleaseTrainBranch("/projects/spring-cloud-release/", "Greenwich");
File origin = cloneToTemporaryDirectory(this.springCloudConsulProject);
File origin = cloneToTemporaryDirectory(tempDirSpringCloudConsulOrigin, this.springCloudConsulProject);
assertThatClonedConsulProjectIsInSnapshots(origin);
File project = cloneToTemporaryDirectory(tmpFile("spring-cloud-consul"));
File project = cloneToTemporaryDirectory(tempDirSpringCloudConsulProject, tmpFile("spring-cloud-consul"));
GitTestUtils.setOriginOnProjectToTmp(origin, project);
run(failingBuildRunner(), properties("debugx=true")
.properties("test.metarelease=true", "test.metarelease.failing=true",
"releaser.flow.default-enabled=false")
.properties(
metaReleaseArgs(project).bomBranch("vGreenwich.SR2").addFixedVersions(edgwareSr10()).build()),
run(failingBuildRunner(),
properties("debugx=true")
.properties("test.metarelease=true", "test.metarelease.failing=true",
"releaser.flow.default-enabled=false")
.properties(metaReleaseArgs(project, tempDirTestSamplesProject, tempDirReleaseTrainDocs,
tempDirSpringCloud, tempDirReleaseTrainWiki, tempDirAllTestSample)
.bomBranch("vGreenwich.SR2").addFixedVersions(edgwareSr10()).build()),
context -> {
SpringReleaser releaser = context.getBean(SpringReleaser.class);
NonAssertingTestProjectGitHandler nonAssertingTestProjectGitHandler = context
@@ -502,7 +538,7 @@ class FirstTask implements ReleaseReleaserTask {
}
@Override
public ExecutionResult runTask(Arguments args) throws BuildUnstableException, RuntimeException {
public ExecutionResult runTask(Arguments args) throws RuntimeException {
return ExecutionResult.failure(new IllegalStateException("Failure"));
}
@@ -536,7 +572,7 @@ class SecondTask implements ReleaseReleaserTask {
}
@Override
public ExecutionResult runTask(Arguments args) throws BuildUnstableException, RuntimeException {
public ExecutionResult runTask(Arguments args) throws RuntimeException {
return ExecutionResult.success();
}
@@ -570,7 +606,7 @@ class PostReleaseTask implements TrainPostReleaseReleaserTask {
}
@Override
public ExecutionResult runTask(Arguments args) throws BuildUnstableException, RuntimeException {
public ExecutionResult runTask(Arguments args) throws RuntimeException {
return ExecutionResult.success();
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2019 the original author or authors.
* Copyright 2013-2022 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.
@@ -23,6 +23,7 @@ import java.util.Iterator;
import org.assertj.core.api.BDDAssertions;
import org.eclipse.jgit.revwalk.RevCommit;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.io.TempDir;
import org.mockito.BDDMockito;
import releaser.cloud.spring.AbstractSpringCloudAcceptanceTests;
import releaser.internal.ReleaserProperties;
@@ -59,23 +60,41 @@ import static org.mockito.Mockito.times;
*/
public class SpringSingleProjectAcceptanceTests extends AbstractSpringCloudAcceptanceTests {
@TempDir
File tempDirTestSamplesProject;
@TempDir
File tempDirReleaseTrainDocs;
@TempDir
File tempDirSpringCloud;
@TempDir
File tempDirReleaseTrainWiki;
@TempDir
File tempDirAllTestSample;
SpringApplicationBuilder runner = new SpringApplicationBuilder(
SpringSingleProjectAcceptanceTests.SingleProjectReleaseConfig.class,
SpringSingleProjectAcceptanceTests.SingleProjectScanningConfiguration.class).web(WebApplicationType.NONE)
.properties("spring.jmx.enabled=false");
@Test
public void should_fail_to_perform_a_release_of_consul_when_sc_release_contains_snapshots() throws Exception {
public void should_fail_to_perform_a_release_of_consul_when_sc_release_contains_snapshots(
@TempDir File tempDirSpringCloudConsulOrigin, @TempDir File tempDirSpringCloudConsulProject)
throws Exception {
checkoutReleaseTrainBranch("/projects/spring-cloud-release-with-snapshot/", "vCamden.SR5.BROKEN");
File origin = cloneToTemporaryDirectory(this.springCloudConsulProject);
File origin = cloneToTemporaryDirectory(tempDirSpringCloudConsulOrigin, this.springCloudConsulProject);
assertThatClonedConsulProjectIsInSnapshots(origin);
File project = cloneToTemporaryDirectory(tmpFile("spring-cloud-consul"));
File project = cloneToTemporaryDirectory(tempDirSpringCloudConsulProject, tmpFile("spring-cloud-consul"));
GitTestUtils.setOriginOnProjectToTmp(origin, project);
run(this.runner,
properties("debugx=true").properties(new ArgsBuilder(project, this.tmp)
.releaseTrainUrl("/projects/spring-cloud-release-with-snapshot/")
.bomBranch("vCamden.SR5.BROKEN").expectedVersion("1.1.2.RELEASE").build()),
properties("debugx=true").properties(new ArgsBuilder(project, tempDirTestSamplesProject,
tempDirReleaseTrainDocs, tempDirSpringCloud, tempDirReleaseTrainWiki, tempDirAllTestSample)
.releaseTrainUrl("/projects/spring-cloud-release-with-snapshot/")
.bomBranch("vCamden.SR5.BROKEN").expectedVersion("1.1.2.RELEASE").build()),
context -> {
SpringReleaser releaser = context.getBean(SpringReleaser.class);
BDDAssertions.thenThrownBy(releaser::release).hasMessageContaining(
@@ -85,17 +104,19 @@ public class SpringSingleProjectAcceptanceTests extends AbstractSpringCloudAccep
}
@Test
public void should_perform_a_release_of_consul() throws Exception {
public void should_perform_a_release_of_consul(@TempDir File tempDirSpringCloudConsulOrigin,
@TempDir File tempDirSpringCloudConsulProject) throws Exception {
checkoutReleaseTrainBranch("/projects/spring-cloud-release/", "Greenwich");
File origin = cloneToTemporaryDirectory(this.springCloudConsulProject);
File origin = cloneToTemporaryDirectory(tempDirSpringCloudConsulOrigin, this.springCloudConsulProject);
assertThatClonedConsulProjectIsInSnapshots(origin);
File project = cloneToTemporaryDirectory(tmpFile("spring-cloud-consul"));
File project = cloneToTemporaryDirectory(tempDirSpringCloudConsulProject, tmpFile("spring-cloud-consul"));
GitTestUtils.setOriginOnProjectToTmp(origin, project);
run(this.runner,
properties("debugx=true").properties(
new ArgsBuilder(project, this.tmp).releaseTrainUrl("/projects/spring-cloud-release/")
.bomBranch("vGreenwich.SR2").expectedVersion("2.1.2.RELEASE").build()),
properties("debugx=true").properties(new ArgsBuilder(project, tempDirTestSamplesProject,
tempDirReleaseTrainDocs, tempDirSpringCloud, tempDirReleaseTrainWiki, tempDirAllTestSample)
.releaseTrainUrl("/projects/spring-cloud-release/").bomBranch("vGreenwich.SR2")
.expectedVersion("2.1.2.RELEASE").build()),
context -> {
SpringReleaser releaser = context.getBean(SpringReleaser.class);
TestProjectGitHubHandler gitHubHandler = context.getBean(TestProjectGitHubHandler.class);
@@ -137,17 +158,19 @@ public class SpringSingleProjectAcceptanceTests extends AbstractSpringCloudAccep
// issue #74
@Test
public void should_perform_a_release_of_sc_build() throws Exception {
public void should_perform_a_release_of_sc_build(@TempDir File tempDirSpringCloudConsulOrigin,
@TempDir File tempDirSpringCloudConsulProject) throws Exception {
checkoutReleaseTrainBranch("/projects/spring-cloud-release/", "vGreenwich.SR2");
File origin = cloneToTemporaryDirectory(this.springCloudBuildProject);
File origin = cloneToTemporaryDirectory(tempDirSpringCloudConsulOrigin, this.springCloudBuildProject);
assertThatClonedBuildProjectIsInSnapshots(origin);
File project = cloneToTemporaryDirectory(tmpFile("spring-cloud-build"));
File project = cloneToTemporaryDirectory(tempDirSpringCloudConsulProject, tmpFile("spring-cloud-build"));
GitTestUtils.setOriginOnProjectToTmp(origin, project);
run(this.runner,
properties("debugx=true").properties(new ArgsBuilder(project, this.tmp)
.releaseTrainUrl("/projects/spring-cloud-release/").bomBranch("vGreenwich.SR2")
.projectName("spring-cloud-build").expectedVersion("2.1.6.RELEASE").build()),
properties("debugx=true").properties(new ArgsBuilder(project, tempDirTestSamplesProject,
tempDirReleaseTrainDocs, tempDirSpringCloud, tempDirReleaseTrainWiki, tempDirAllTestSample)
.releaseTrainUrl("/projects/spring-cloud-release/").bomBranch("vGreenwich.SR2")
.projectName("spring-cloud-build").expectedVersion("2.1.6.RELEASE").build()),
context -> {
SpringReleaser releaser = context.getBean(SpringReleaser.class);
TestProjectGitHubHandler gitHubHandler = context.getBean(TestProjectGitHubHandler.class);
@@ -188,17 +211,19 @@ public class SpringSingleProjectAcceptanceTests extends AbstractSpringCloudAccep
}
@Test
public void should_perform_a_release_of_consul_rc1() throws Exception {
public void should_perform_a_release_of_consul_rc1(@TempDir File tempDirSpringCloudConsulOrigin,
@TempDir File tempDirSpringCloudConsulProject) throws Exception {
checkoutReleaseTrainBranch("/projects/spring-cloud-release/", "vDalston.RC1");
File origin = cloneToTemporaryDirectory(this.springCloudConsulProject);
File origin = cloneToTemporaryDirectory(tempDirSpringCloudConsulOrigin, this.springCloudConsulProject);
assertThatClonedConsulProjectIsInSnapshots(origin);
File project = cloneToTemporaryDirectory(tmpFile("spring-cloud-consul"));
File project = cloneToTemporaryDirectory(tempDirSpringCloudConsulProject, tmpFile("spring-cloud-consul"));
GitTestUtils.setOriginOnProjectToTmp(origin, project);
run(this.runner,
properties("debugx=true").properties(
new ArgsBuilder(project, this.tmp).releaseTrainUrl("/projects/spring-cloud-release/")
.bomBranch("vDalston.RC1").expectedVersion("1.2.0.RC1").build()),
properties("debugx=true").properties(new ArgsBuilder(project, tempDirTestSamplesProject,
tempDirReleaseTrainDocs, tempDirSpringCloud, tempDirReleaseTrainWiki, tempDirAllTestSample)
.releaseTrainUrl("/projects/spring-cloud-release/").bomBranch("vDalston.RC1")
.expectedVersion("1.2.0.RC1").build()),
context -> {
SpringReleaser releaser = context.getBean(SpringReleaser.class);
TestProjectGitHubHandler gitHubHandler = context.getBean(TestProjectGitHubHandler.class);
@@ -239,22 +264,24 @@ public class SpringSingleProjectAcceptanceTests extends AbstractSpringCloudAccep
}
@Test
public void should_not_clone_when_option_not_to_clone_was_switched_on() throws Exception {
public void should_not_clone_when_option_not_to_clone_was_switched_on(@TempDir File tempDirSpringCloudConsulOrigin,
@TempDir File tempDirSpringCloudConsulProject, @TempDir File temporaryDestination) throws Exception {
checkoutReleaseTrainBranch("/projects/spring-cloud-release/", "master");
File origin = cloneToTemporaryDirectory(this.springCloudConsulProject);
File origin = cloneToTemporaryDirectory(tempDirSpringCloudConsulOrigin, this.springCloudConsulProject);
assertThatClonedConsulProjectIsInSnapshots(origin);
File project = cloneToTemporaryDirectory(tmpFile("spring-cloud-consul"));
File project = cloneToTemporaryDirectory(tempDirSpringCloudConsulProject, tmpFile("spring-cloud-consul"));
GitTestUtils.setOriginOnProjectToTmp(origin, project);
final File temporaryDestination = this.tmp.newFolder();
run(this.runner,
properties("debugx=true").properties(new ArgsBuilder(project, this.tmp)
.releaseTrainUrl("/projects/spring-cloud-release/").bomBranch("vCamden.SR5")
.expectedVersion("1.1.2.RELEASE")
// just build
.chosenOption("6").fetchVersionsFromGit(false).cloneDestinationDirectory(temporaryDestination)
.addFixedVersion("spring-cloud-release", "Finchley.RELEASE")
.addFixedVersion("spring-cloud-consul", "2.3.4.RELEASE").build()),
properties("debugx=true").properties(new ArgsBuilder(project, tempDirTestSamplesProject,
tempDirReleaseTrainDocs, tempDirSpringCloud, tempDirReleaseTrainWiki, tempDirAllTestSample)
.releaseTrainUrl("/projects/spring-cloud-release/").bomBranch("vCamden.SR5")
.expectedVersion("1.1.2.RELEASE")
// just build
.chosenOption("6").fetchVersionsFromGit(false)
.cloneDestinationDirectory(temporaryDestination)
.addFixedVersion("spring-cloud-release", "Finchley.RELEASE")
.addFixedVersion("spring-cloud-consul", "2.3.4.RELEASE").build()),
context -> {
SpringReleaser releaser = context.getBean(SpringReleaser.class);

View File

@@ -115,11 +115,6 @@
<version>${awaitility.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.spring.sagan</groupId>
<artifactId>sagan-site</artifactId>

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2019 the original author or authors.
* Copyright 2013-2022 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.
@@ -45,13 +45,10 @@ import static org.assertj.core.api.BDDAssertions.then;
public class PomUpdateAcceptanceTests {
@TempDir
public File tmp;
File temporaryFolder;
@BeforeEach
public void setup() throws Exception {
this.temporaryFolder = new File(tmp, "test");
TestUtils.prepareLocalRepo();
FileSystemUtils.copyRecursively(file("/projects/"), this.temporaryFolder);
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2019 the original author or authors.
* Copyright 2013-2022 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.

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2019 the original author or authors.
* Copyright 2013-2022 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.
@@ -83,7 +83,7 @@ public class ReleaserTests {
File pom;
@BeforeEach
@Before
public void setup() throws URISyntaxException {
URI pomUri = ReleaserTests.class.getResource("/projects/project/pom.xml").toURI();
this.pom = new File(pomUri);
@@ -107,12 +107,12 @@ public class ReleaserTests {
}
@Test
public void should_not_bump_versions_for_original_release_project(CapturedOutput outputCapture) {
public void should_not_bump_versions_for_original_release_project(CapturedOutput capturedOutput) {
releaser(() -> new ProjectVersion("original", "1.0.0.RELEASE")).rollbackReleaseVersion(this.pom,
new Projects(new ProjectVersion("changed", "1.0.0.RELEASE")),
new ProjectVersion("changed", "1.0.0.RELEASE"));
BDDAssertions.then(outputCapture.toString())
BDDAssertions.then(capturedOutput.toString())
.contains("Successfully reverted the commit and came back to snapshot versions");
then(this.projectGitHandler).should(never()).commitAfterBumpingVersions(any(File.class),
any(ProjectVersion.class));
@@ -120,18 +120,18 @@ public class ReleaserTests {
@Test
public void should_not_bump_versions_for_original_snapshot_project_and_current_snapshot(
CapturedOutput outputCapture) {
CapturedOutput capturedOutput) {
releaser(() -> new ProjectVersion("original", "1.0.0.BUILD-SNAPSHOT")).rollbackReleaseVersion(this.pom,
new Projects(new ProjectVersion("changed", "1.0.0.BUILD-SNAPSHOT")),
new ProjectVersion("changed", "1.0.0.BUILD-SNAPSHOT"));
BDDAssertions.then(outputCapture.toString()).contains("Won't rollback a snapshot version");
BDDAssertions.then(capturedOutput.toString()).contains("Won't rollback a snapshot version");
then(this.projectGitHandler).should(never()).commitAfterBumpingVersions(any(File.class),
any(ProjectVersion.class));
}
@Test
public void should_bump_versions_for_original_snapshot_project(CapturedOutput outputCapture) {
public void should_bump_versions_for_original_snapshot_project(CapturedOutput capturedOutput) {
ProjectVersion scReleaseVersion = new ProjectVersion("changed", "1.0.0.RELEASE");
releaser(() -> new ProjectVersion("original", "1.0.0.BUILD-SNAPSHOT")).rollbackReleaseVersion(this.pom,
new Projects(new ProjectVersion("changed", "1.0.0.RELEASE"),
@@ -139,7 +139,7 @@ public class ReleaserTests {
new ProjectVersion("spring-boot-starter", "3.0.0.RELEASE")),
scReleaseVersion);
BDDAssertions.then(outputCapture.toString()).contains("Project was successfully updated")
BDDAssertions.then(capturedOutput.toString()).contains("Project was successfully updated")
.contains("Successfully reverted the commit and bumped snapshot versions")
.contains("spring-boot-starter=>3.0.0.RELEASE").contains("spring-cloud-build=>2.0.1.SNAPSHOT")
.contains("changed=>1.0.1.SNAPSHOT");

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2019 the original author or authors.
* Copyright 2013-2022 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.

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2019 the original author or authors.
* Copyright 2013-2022 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.

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2019 the original author or authors.
* Copyright 2013-2022 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.

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2019 the original author or authors.
* Copyright 2013-2022 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.
@@ -41,20 +41,17 @@ import org.springframework.util.FileSystemUtils;
*/
public class PomUpdaterTests {
@TempDir
public File tmp;
VersionsFromBom versionsFromBom = new VersionsFromBomBuilder()
.releaserProperties(SpringCloudReleaserProperties.get()).projects(projects())
.parsers(Collections.emptyList()).retrieveFromBom();
PomUpdater pomUpdater = new PomUpdater();
@TempDir
File temporaryFolder;
@BeforeEach
public void setup() throws Exception {
this.temporaryFolder = new File(tmp, "test");
FileSystemUtils.copyRecursively(file("/projects/"), this.temporaryFolder);
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2019 the original author or authors.
* Copyright 2013-2022 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.

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2019 the original author or authors.
* Copyright 2013-2022 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.

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2019 the original author or authors.
* Copyright 2013-2022 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.

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2019 the original author or authors.
* Copyright 2013-2022 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.

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2019 the original author or authors.
* Copyright 2013-2022 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.

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2019 the original author or authors.
* Copyright 2013-2022 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.

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2019 the original author or authors.
* Copyright 2013-2022 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.

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2019 the original author or authors.
* Copyright 2013-2022 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.
@@ -44,9 +44,6 @@ import org.springframework.util.FileSystemUtils;
*/
public class ReleaseTrainContentsUpdaterTests {
@TempDir
public File tmp;
ReleaserProperties properties = SpringCloudReleaserProperties.get();
ProjectGitHubHandler projectGitHubHandler = new ProjectGitHubHandler(this.properties, Collections.emptyList()) {
@@ -56,10 +53,10 @@ public class ReleaseTrainContentsUpdaterTests {
}
};
ProjectGitHandler projectGitHandler = new ProjectGitHandler(this.properties);
TemplateGenerator templateGenerator = new TemplateGenerator(this.properties, this.projectGitHubHandler);
ProjectGitHandler projectGitHandler = new ProjectGitHandler(this.properties);
ReleaseTrainContentsUpdater updater = new ReleaseTrainContentsUpdater(this.properties, this.projectGitHandler,
this.templateGenerator);
@@ -67,11 +64,11 @@ public class ReleaseTrainContentsUpdaterTests {
File wikiRepo;
@TempDir
File temporaryFolder;
@BeforeEach
public void setup() throws Exception {
this.temporaryFolder = new File(tmp, "test");
TestUtils.prepareLocalRepo();
FileSystemUtils.copyRecursively(file("/projects"), this.temporaryFolder);
this.springCloudRepo = new File(this.temporaryFolder, "spring-cloud/");

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2019 the original author or authors.
* Copyright 2013-2022 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.

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2019 the original author or authors.
* Copyright 2013-2022 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.
@@ -70,11 +70,11 @@ public class SpringCloudGhPagesParserTests {
}
@Test
public void should_not_parse_the_components_table_when_markers_are_not_found(CapturedOutput capture) {
public void should_not_parse_the_components_table_when_markers_are_not_found(CapturedOutput capturedOutput) {
ReleaseTrainContents contents = new ReleaseTrainContentsParser().parseProjectPage(this.wrongHtml);
BDDAssertions.then(contents).isNull();
BDDAssertions.then(capture.toString()).contains("The page is missing the components table markers");
BDDAssertions.then(capturedOutput.toString()).contains("The page is missing the components table markers");
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2019 the original author or authors.
* Copyright 2013-2022 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.
@@ -22,6 +22,7 @@ import java.io.IOException;
import java.io.PrintStream;
import java.net.URISyntaxException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.List;
import org.assertj.core.api.BDDAssertions;
@@ -45,18 +46,15 @@ import static org.assertj.core.api.BDDAssertions.thenThrownBy;
*/
public class GitRepoTests {
@TempDir
public File tmp;
File springCloudReleaseProject;
@TempDir
File tmpFolder;
GitRepo gitRepo;
@BeforeEach
public void setup() throws IOException, URISyntaxException {
this.tmpFolder = new File(tmp, "test");
this.springCloudReleaseProject = new File(
GitRepoTests.class.getResource("/projects/spring-cloud-release").toURI());
TestUtils.prepareLocalRepo();
@@ -189,9 +187,10 @@ public class GitRepoTests {
}
@Test
public void should_push_changes_to_master_branch() throws Exception {
File origin = GitTestUtils.clonedProject(new File(tmp, "test1"), this.springCloudReleaseProject);
File project = new GitRepo(this.tmpFolder)
public void should_push_changes_to_master_branch(@TempDir Path tempDirOrigin, @TempDir Path tempDirProject)
throws Exception {
File origin = GitTestUtils.clonedProject(tempDirOrigin.toFile(), this.springCloudReleaseProject);
File project = new GitRepo(tempDirProject.toFile())
.cloneProject(new URIish(this.springCloudReleaseProject.toURI().toURL()));
GitTestUtils.setOriginOnProjectToTmp(origin, project);
createNewFile(project);
@@ -206,9 +205,10 @@ public class GitRepoTests {
}
@Test
public void should_push_changes_to_current_branch() throws Exception {
File origin = GitTestUtils.clonedProject(new File(tmp, "test2"), this.springCloudReleaseProject);
File project = new GitRepo(this.tmpFolder)
public void should_push_changes_to_current_branch(@TempDir Path tempDirOrigin, @TempDir Path tempDirProject)
throws Exception {
File origin = GitTestUtils.clonedProject(tempDirOrigin.toFile(), this.springCloudReleaseProject);
File project = new GitRepo(tempDirProject.toFile())
.cloneProject(new URIish(this.springCloudReleaseProject.toURI().toURL()));
GitTestUtils.setOriginOnProjectToTmp(origin, project);
createNewFile(project);
@@ -223,9 +223,10 @@ public class GitRepoTests {
}
@Test
public void should_return_the_branch_name() throws Exception {
File origin = GitTestUtils.clonedProject(new File(tmp, "test3"), this.springCloudReleaseProject);
File project = new GitRepo(this.tmpFolder)
public void should_return_the_branch_name(@TempDir Path tempDirOrigin, @TempDir Path tempDirProject)
throws Exception {
File origin = GitTestUtils.clonedProject(tempDirOrigin.toFile(), this.springCloudReleaseProject);
File project = new GitRepo(tempDirProject.toFile())
.cloneProject(new URIish(this.springCloudReleaseProject.toURI().toURL()));
GitTestUtils.setOriginOnProjectToTmp(origin, project);
createNewFile(project);
@@ -236,9 +237,10 @@ public class GitRepoTests {
}
@Test
public void should_push_a_tag_to_new_branch_in_origin() throws Exception {
File origin = GitTestUtils.clonedProject(new File(tmp, "test4"), this.springCloudReleaseProject);
File project = new GitRepo(this.tmpFolder)
public void should_push_a_tag_to_new_branch_in_origin(@TempDir Path tempDirOrigin, @TempDir Path tempDirProject)
throws Exception {
File origin = GitTestUtils.clonedProject(tempDirOrigin.toFile(), this.springCloudReleaseProject);
File project = new GitRepo(tempDirProject.toFile())
.cloneProject(new URIish(this.springCloudReleaseProject.toURI().toURL()));
GitTestUtils.setOriginOnProjectToTmp(origin, project);
createNewFile(project);

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2019 the original author or authors.
* Copyright 2013-2022 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.

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2019 the original author or authors.
* Copyright 2013-2022 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.
@@ -26,23 +26,15 @@ import com.jcabi.github.Repos;
import com.jcabi.github.mock.MkGithub;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.junit.jupiter.api.io.TempDir;
import org.mockito.BDDMockito;
import releaser.internal.project.ProjectVersion;
import releaser.internal.project.Projects;
import org.springframework.boot.test.system.OutputCaptureExtension;
/**
* @author Marcin Grzejszczak
*/
@ExtendWith(OutputCaptureExtension.class)
public class GithubIssuesTests {
@TempDir
public File folder;
MkGithub github;
Repo repo;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2019 the original author or authors.
* Copyright 2013-2022 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.
@@ -16,7 +16,6 @@
package releaser.internal.github;
import java.io.File;
import java.io.IOException;
import java.net.URL;
@@ -27,7 +26,6 @@ import com.jcabi.github.mock.MkGithub;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.junit.jupiter.api.io.TempDir;
import releaser.internal.ReleaserProperties;
import releaser.internal.project.ProjectVersion;
@@ -43,9 +41,6 @@ import static org.assertj.core.api.BDDAssertions.thenThrownBy;
@ExtendWith(OutputCaptureExtension.class)
public class GithubMilestonesTests {
@TempDir
public File folder;
MkGithub github;
Repo repo;
@@ -57,7 +52,7 @@ public class GithubMilestonesTests {
}
@Test
public void should_close_milestone_if_there_is_one(CapturedOutput capture) throws IOException {
public void should_close_milestone_if_there_is_one(CapturedOutput capturedOutput) throws IOException {
GithubMilestones milestones = new GithubMilestones(this.github, withToken()) {
@Override
String org() {
@@ -73,12 +68,12 @@ public class GithubMilestonesTests {
milestones.closeMilestone(nonGaSleuthProject());
then(capture.toString()).doesNotContain("No matching milestone was found");
then(capturedOutput.toString()).doesNotContain("No matching milestone was found");
}
@Test
public void should_close_milestone_when_the_milestone_contains_numeric_version_only_and_version_is_ga(
CapturedOutput capture) throws IOException {
CapturedOutput capturedOutput) throws IOException {
GithubMilestones milestones = new GithubMilestones(this.github, withToken()) {
@Override
String org() {
@@ -94,7 +89,7 @@ public class GithubMilestonesTests {
milestones.closeMilestone(gaSleuthProject());
then(capture.toString()).doesNotContain("No matching milestone was found");
then(capturedOutput.toString()).doesNotContain("No matching milestone was found");
}
private ProjectVersion gaSleuthProject() {
@@ -102,8 +97,8 @@ public class GithubMilestonesTests {
}
@Test
public void should_not_close_milestone_when_the_milestone_contains_numeric_version_only(CapturedOutput capture)
throws IOException {
public void should_not_close_milestone_when_the_milestone_contains_numeric_version_only(
CapturedOutput capturedOutput) throws IOException {
GithubMilestones milestones = new GithubMilestones(this.github, withToken()) {
@Override
String org() {
@@ -119,7 +114,7 @@ public class GithubMilestonesTests {
milestones.closeMilestone(nonGaSleuthProject());
then(capture.toString()).contains("No matching milestone was found");
then(capturedOutput.toString()).contains("No matching milestone was found");
}
@Test
@@ -183,7 +178,7 @@ public class GithubMilestonesTests {
}
@Test
public void should_return_null_if_no_matching_milestone_was_found_within_threshold(CapturedOutput capture)
public void should_return_null_if_no_matching_milestone_was_found_within_threshold(CapturedOutput capturedOutput)
throws IOException {
GithubMilestones milestones = new GithubMilestones(this.github, withThreshold()) {
@Override
@@ -200,7 +195,7 @@ public class GithubMilestonesTests {
milestones.closeMilestone(gaSleuthProject());
then(capture.toString()).contains("No matching milestones were found within the provided threshold [0]");
then(capturedOutput.toString()).contains("No matching milestones were found within the provided threshold [0]");
}
private ProjectVersion nonGaSleuthProject() {
@@ -208,7 +203,8 @@ public class GithubMilestonesTests {
}
@Test
public void should_throw_exception_when_there_is_no_matching_milestone(CapturedOutput capture) throws IOException {
public void should_throw_exception_when_there_is_no_matching_milestone(CapturedOutput capturedOutput)
throws IOException {
GithubMilestones milestones = new GithubMilestones(this.github, withToken()) {
@Override
String org() {
@@ -223,11 +219,11 @@ public class GithubMilestonesTests {
this.repo.milestones().create("v0.2.0.BUILD-SNAPSHOT");
milestones.closeMilestone(nonGaSleuthProject());
then(capture.toString()).contains("No matching milestone was found");
then(capturedOutput.toString()).contains("No matching milestone was found");
}
@Test
public void should_print_that_no_milestones_were_found_when_io_problems_occurred(CapturedOutput capture)
public void should_print_that_no_milestones_were_found_when_io_problems_occurred(CapturedOutput capturedOutput)
throws IOException {
GithubMilestones milestones = new GithubMilestones(this.github, withToken()) {
@Override
@@ -244,7 +240,7 @@ public class GithubMilestonesTests {
milestones.closeMilestone(nonGaSleuthProject());
then(capture.toString()).contains("No matching milestone was found");
then(capturedOutput.toString()).contains("No matching milestone was found");
}
private Repo createSleuthRepo(MkGithub github) throws IOException {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2019 the original author or authors.
* Copyright 2013-2022 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.
@@ -42,13 +42,10 @@ import static org.assertj.core.api.BDDAssertions.thenThrownBy;
public class GradleUpdaterTests {
@TempDir
public File tmp;
File temporaryFolder;
@BeforeEach
public void setup() throws Exception {
this.temporaryFolder = new File(tmp, "test.txt");
FileSystemUtils.copyRecursively(file("/projects/"), this.temporaryFolder);
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2019 the original author or authors.
* Copyright 2013-2022 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.
@@ -60,8 +60,6 @@ import org.springframework.util.LinkedMultiValueMap;
public class PostReleaseActionsTests {
@TempDir
File tmp;
File temporaryFolder;
GradleUpdater gradleUpdater = BDDMockito.mock(GradleUpdater.class);
@@ -115,7 +113,6 @@ public class PostReleaseActionsTests {
@BeforeEach
public void setup() throws Exception {
this.temporaryFolder = new File(tmp, "test.txt");
TestUtils.prepareLocalRepo();
FileSystemUtils.copyRecursively(file("/projects/"), this.temporaryFolder);
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2019 the original author or authors.
* Copyright 2013-2022 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.
@@ -25,8 +25,10 @@ import java.net.URISyntaxException;
import java.nio.file.Files;
import java.util.concurrent.TimeoutException;
import org.junit.jupiter.api.Assumptions;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.junit.jupiter.api.io.TempDir;
import org.zeroturnaround.exec.ProcessExecutor;
import org.zeroturnaround.exec.ProcessResult;
@@ -34,26 +36,24 @@ import releaser.internal.PomUpdateAcceptanceTests;
import releaser.internal.ReleaserProperties;
import releaser.internal.buildsystem.TestUtils;
import org.springframework.boot.test.system.OutputCaptureExtension;
import org.springframework.util.FileSystemUtils;
import static org.assertj.core.api.BDDAssertions.then;
import static org.assertj.core.api.BDDAssertions.thenThrownBy;
import static org.junit.jupiter.api.Assumptions.assumeFalse;
/**
* @author Marcin Grzejszczak
*/
@ExtendWith(OutputCaptureExtension.class)
public class ProjectCommandExecutorTests {
@TempDir
public File tmp;
File temporaryFolder;
@BeforeEach
public void checkOs() throws Exception {
assumeFalse(System.getProperty("os.name").toLowerCase().startsWith("win"));
this.temporaryFolder = new File(tmp, "test");
Assumptions.assumeFalse(System.getProperty("os.name").toLowerCase().startsWith("win"));
TestUtils.prepareLocalRepo();
FileSystemUtils.copyRecursively(file("/projects"), this.temporaryFolder);
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2019 the original author or authors.
* Copyright 2013-2022 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.
@@ -19,8 +19,8 @@ package releaser.internal.sagan;
import java.io.IOException;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.junit.Ignore;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import releaser.internal.ReleaserProperties;
@@ -105,7 +105,7 @@ public class RestTemplateSaganClientTests {
}
@Test
@Ignore("no api yet https://github.com/spring-io/sagan/issues/1052")
@Disabled("no api yet https://github.com/spring-io/sagan/issues/1052")
public void should_patch_a_project() throws IOException {
String projectJson = "{\n \"id\" : \"spring-framework\",\n "
+ "\"rawBootConfig\" : \"rawBootConfig\",\n \"rawOverview\" : \"rawOverview\",\n "

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2019 the original author or authors.
* Copyright 2013-2022 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.

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2019 the original author or authors.
* Copyright 2013-2022 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.

View File

@@ -59,11 +59,6 @@
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<profiles>

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2019 the original author or authors.
* Copyright 2013-2022 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.

View File

@@ -40,11 +40,6 @@
<artifactId>spring-boot-starter-test</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<scope>compile</scope>
</dependency>
</dependencies>
<profiles>

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2019 the original author or authors.
* Copyright 2013-2022 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.
@@ -34,10 +34,9 @@ import org.eclipse.jgit.api.Git;
import org.eclipse.jgit.api.ResetCommand;
import org.eclipse.jgit.api.errors.GitAPIException;
import org.eclipse.jgit.revwalk.RevCommit;
import org.junit.After;
import org.junit.Rule;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.rules.TemporaryFolder;
import org.junit.jupiter.api.io.TempDir;
import org.mockito.BDDMockito;
import releaser.internal.ReleaserProperties;
import releaser.internal.buildsystem.TestPomReader;
@@ -68,9 +67,7 @@ import static org.assertj.core.api.BDDAssertions.then;
*/
public abstract class AbstractSpringAcceptanceTests {
@Rule
public TemporaryFolder tmp = new TemporaryFolder();
@TempDir
public File temporaryFolder;
public TestPomReader testPomReader = new TestPomReader();
@@ -91,13 +88,12 @@ public abstract class AbstractSpringAcceptanceTests {
@BeforeEach
public void setup() throws Exception {
this.temporaryFolder = this.tmp.newFolder();
TestUtils.prepareLocalRepo();
FileSystemUtils.copyRecursively(file("/projects/"), this.temporaryFolder);
clean();
}
@After
@AfterEach
public void cleanup() throws Exception {
clean();
}
@@ -200,8 +196,8 @@ public abstract class AbstractSpringAcceptanceTests {
return new String(Files.readAllBytes(file.toPath()));
}
public File cloneToTemporaryDirectory(File project) throws IOException {
return GitTestUtils.clonedProject(this.tmp.newFolder(), project);
public File cloneToTemporaryDirectory(File tempDir, File project) throws IOException {
return GitTestUtils.clonedProject(tempDir, project);
}
public void checkoutReleaseTrainBranch(String fileToRepo, String branch)
@@ -358,7 +354,7 @@ public abstract class AbstractSpringAcceptanceTests {
public class Props {
private List<String> args = new LinkedList<>();
private final List<String> args = new LinkedList<>();
public Props(String... args) {
properties(args);

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2019 the original author or authors.
* Copyright 2013-2022 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.
@@ -17,44 +17,55 @@
package releaser.internal.spring;
import java.io.File;
import java.io.IOException;
import java.net.URISyntaxException;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import org.junit.rules.TemporaryFolder;
import releaser.internal.git.GitTestUtils;
public class ArgsBuilder {
private final File project;
private final TemporaryFolder tmp;
private final File tempDirTestSamplesProject;
private final File tempDirReleaseTrainDocs;
private final File tempDirSpringCloud;
private final File tempDirReleaseTrainWiki;
private final File tempDirAllTestSample;
List<String> args = new LinkedList<>();
public ArgsBuilder(File project, TemporaryFolder tmp) throws Exception {
public ArgsBuilder(File project, File tempDirTestSamplesProject, File tempDirReleaseTrainDocs,
File tempDirSpringCloud, File tempDirReleaseTrainWiki, File tempDirAllTestSample) throws Exception {
this.project = project;
this.tmp = tmp;
this.tempDirTestSamplesProject = tempDirTestSamplesProject;
this.tempDirReleaseTrainDocs = tempDirReleaseTrainDocs;
this.tempDirSpringCloud = tempDirSpringCloud;
this.tempDirReleaseTrainWiki = tempDirReleaseTrainWiki;
this.tempDirAllTestSample = tempDirAllTestSample;
defaults();
}
public ArgsBuilder defaults() throws Exception {
// @formatter:off
this.args.addAll(Arrays.asList(
"releaser.git.documentation-url=" + file("/projects/spring-cloud-static-angel/").toURI().toString(),
"releaser.git.test-samples-project-url=" + this.tmp.newFolder().toString(),
"releaser.git.release-train-docs-url=" + this.tmp.newFolder().toString(),
"releaser.git.documentation-url=" + file("/projects/spring-cloud-static-angel/").toURI(),
"releaser.git.test-samples-project-url=" + tempDirTestSamplesProject.getAbsolutePath(),
"releaser.git.release-train-docs-url=" + tempDirReleaseTrainDocs.getAbsolutePath(),
"releaser.maven.build-command=echo build",
"releaser.maven.deploy-command=echo deploy",
"releaser.maven.deploy-guides-command=echo guides",
"releaser.maven.publish-docs-command=echo docs",
"releaser.maven.generate-release-train-docs-command=echo releaseTrainDocs",
"releaser.working-dir=" + project.getPath(),
"releaser.git.spring-project-url=" + tmpFile("spring-cloud").getAbsolutePath() + "/",
"releaser.git.release-train-wiki-url=" + tmpGitRepo("spring-cloud-wiki").getAbsolutePath() + "/",
"releaser.git.spring-project-url=" + tempDirSpringCloud.getAbsolutePath(),
"releaser.git.release-train-wiki-url=" + tmpGitRepo(tempDirReleaseTrainWiki).getAbsolutePath() + "/",
"releaser.git.run-updated-samples=true",
"releaser.git.update-spring-guides=true",
"releaser.git.update-spring-project=true",
@@ -63,11 +74,11 @@ public class ArgsBuilder {
"releaser.git.update-documentation-repo=true",
"releaser.git.update-github-milestones=true",
"releaser.git.update-release-train-docs=true",
"releaser.git.all-test-sample-urls[spring-cloud-consul]=" + this.tmp.newFolder().toString(),
"releaser.git.all-test-sample-urls[spring-cloud-consul]=" + tempDirAllTestSample.getAbsolutePath(),
"releaser.sagan.update-sagan=true",
"releaser.template.enabled=true",
"releaser.versions.all-versions-file-url="
+ ArgsBuilder.class.getResource("/raw/initializr.yml").toURI().toString()
+ ArgsBuilder.class.getResource("/raw/initializr.yml").toURI()
));
// @formatter:on
fetchVersionsFromGit(true);
@@ -155,7 +166,7 @@ public class ArgsBuilder {
public ArgsBuilder releaseTrainUrl(String relativePath) throws Exception {
removeIfPresent("releaser.git.release-train-bom-url");
this.args.add("releaser.git.release-train-bom-url=" + file(relativePath).toURI().toString());
this.args.add("releaser.git.release-train-bom-url=" + file(relativePath).toURI());
return this;
}
@@ -191,24 +202,9 @@ public class ArgsBuilder {
return new File(ArgsBuilder.class.getResource(relativePath).toURI());
}
private File tmpFile(String relativePath) {
try {
return new File(this.tmp.newFolder(), relativePath);
}
catch (IOException e) {
throw new IllegalStateException(e);
}
}
private File tmpGitRepo(String relativePath) {
try {
File file = new File(this.tmp.newFolder(), relativePath);
GitTestUtils.initGitProject(file);
return file;
}
catch (IOException e) {
throw new IllegalStateException(e);
}
private File tmpGitRepo(File tempDir) {
GitTestUtils.initGitProject(tempDir);
return tempDir;
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2019 the original author or authors.
* Copyright 2013-2022 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.
@@ -38,32 +38,40 @@ import static org.assertj.core.api.BDDAssertions.then;
*/
public abstract class AbstractSpringMetaReleaseAcceptanceTests extends AbstractSpringAcceptanceTests {
public ArgsBuilder metaReleaseArgs(File project) throws Exception {
return new ArgsBuilder(project, this.tmp).releaseTrainUrl("/projects/spring-cloud-release/")
.projectsToSkip("spring-boot", "spring-cloud-build", "spring-cloud-commons", "spring-cloud-stream",
"spring-cloud-task", "spring-cloud-function", "spring-cloud-aws", "spring-cloud-bus",
"spring-cloud-config", "spring-cloud-netflix", "spring-cloud-cloudfoundry",
"spring-cloud-gateway", "spring-cloud-security", "spring-cloud-zookeeper",
"spring-cloud-sleuth", "spring-cloud-contract", "spring-cloud-vault")
.mavenBuildCommand("echo '{{profiles}}' > /tmp/executed_build")
.mavenPublishCommand("echo '{{profiles}}' > /tmp/executed_docs")
.mavenDeployCommand("echo '{{profiles}}' > /tmp/executed_deploy")
.gitOrgUrl("file://" + this.temporaryFolder.getAbsolutePath())
.releaseTrainBomUrl(file("/projects/spring-cloud-release/").toURI().toString());
public ArgsBuilder metaReleaseArgs(File project, File tempDirTestSamplesProject, File tempDirReleaseTrainDocs,
File tempDirSpringCloud, File tempDirReleaseTrainWiki, File tempDirAllTestSample) throws Exception {
return new ArgsBuilder(project, tempDirTestSamplesProject, tempDirReleaseTrainDocs, tempDirSpringCloud,
tempDirReleaseTrainWiki, tempDirAllTestSample)
.releaseTrainUrl("/projects/spring-cloud-release/")
.projectsToSkip("spring-boot", "spring-cloud-build", "spring-cloud-commons",
"spring-cloud-stream", "spring-cloud-task", "spring-cloud-function", "spring-cloud-aws",
"spring-cloud-bus", "spring-cloud-config", "spring-cloud-netflix",
"spring-cloud-cloudfoundry", "spring-cloud-gateway", "spring-cloud-security",
"spring-cloud-zookeeper", "spring-cloud-sleuth", "spring-cloud-contract",
"spring-cloud-vault")
.mavenBuildCommand("echo '{{profiles}}' > /tmp/executed_build")
.mavenPublishCommand("echo '{{profiles}}' > /tmp/executed_docs")
.mavenDeployCommand("echo '{{profiles}}' > /tmp/executed_deploy")
.gitOrgUrl("file://" + this.temporaryFolder.getAbsolutePath())
.releaseTrainBomUrl(file("/projects/spring-cloud-release/").toURI().toString());
}
public ArgsBuilder metaReleaseArgsForParallel(File project) throws Exception {
return new ArgsBuilder(project, this.tmp).releaseTrainUrl("/projects/spring-cloud-release/")
.projectsToSkip("spring-boot", "spring-cloud-commons", "spring-cloud-stream", "spring-cloud-task",
"spring-cloud-function", "spring-cloud-aws", "spring-cloud-bus", "spring-cloud-config",
"spring-cloud-netflix", "spring-cloud-cloudfoundry", "spring-cloud-gateway",
"spring-cloud-security", "spring-cloud-zookeeper", "spring-cloud-sleuth",
"spring-cloud-contract", "spring-cloud-vault")
.mavenBuildCommand("echo '{{profiles}}' > /tmp/executed_build")
.mavenPublishCommand("echo '{{profiles}}' > /tmp/executed_docs")
.mavenDeployCommand("echo '{{profiles}}' > /tmp/executed_deploy")
.gitOrgUrl("file://" + this.temporaryFolder.getAbsolutePath())
.releaseTrainBomUrl(file("/projects/spring-cloud-release/").toURI().toString());
public ArgsBuilder metaReleaseArgsForParallel(File project, File tempDirTestSamplesProject,
File tempDirReleaseTrainDocs, File tempDirSpringCloud, File tempDirReleaseTrainWiki,
File tempDirAllTestSample) throws Exception {
return new ArgsBuilder(project, tempDirTestSamplesProject, tempDirReleaseTrainDocs, tempDirSpringCloud,
tempDirReleaseTrainWiki, tempDirAllTestSample)
.releaseTrainUrl("/projects/spring-cloud-release/")
.projectsToSkip("spring-boot", "spring-cloud-commons", "spring-cloud-stream",
"spring-cloud-task", "spring-cloud-function", "spring-cloud-aws", "spring-cloud-bus",
"spring-cloud-config", "spring-cloud-netflix", "spring-cloud-cloudfoundry",
"spring-cloud-gateway", "spring-cloud-security", "spring-cloud-zookeeper",
"spring-cloud-sleuth", "spring-cloud-contract", "spring-cloud-vault")
.mavenBuildCommand("echo '{{profiles}}' > /tmp/executed_build")
.mavenPublishCommand("echo '{{profiles}}' > /tmp/executed_docs")
.mavenDeployCommand("echo '{{profiles}}' > /tmp/executed_deploy")
.gitOrgUrl("file://" + this.temporaryFolder.getAbsolutePath())
.releaseTrainBomUrl(file("/projects/spring-cloud-release/").toURI().toString());
}
public Map<String, String> edgwareSr10() {