From af179bdf542a838f74d9ff8000c33c03f47b6c1b Mon Sep 17 00:00:00 2001 From: Greg Turnquist Date: Sat, 23 Feb 2019 12:18:13 -0600 Subject: [PATCH] Improve pipeline. --- README.adoc | 53 ++++++---------------------------------- ci/README.adoc | 18 +++++++++++++- ci/pipeline-template.yml | 40 +++++++++++++++--------------- 3 files changed, 45 insertions(+), 66 deletions(-) diff --git a/README.adoc b/README.adoc index 30a71ba..03fbc99 100644 --- a/README.adoc +++ b/README.adoc @@ -53,20 +53,20 @@ Check the matrix below to see the status of supported versions: | image:https://ci.spring.io/api/v1/teams/spring-team/pipelines/spring-session-data-mongodb/jobs/Test%20-%20JDK%2011%20and%20Spring%20Data.NEXT/badge[link="https://ci.spring.io/teams/spring-team/pipelines/spring-session-data-mongodb"] | image:https://ci.spring.io/api/v1/teams/spring-team/pipelines/spring-session-data-mongodb-2.0.x/jobs/Test%20-%20JDK%2011%20and%20Spring%20Data.NEXT/badge[link="https://ci.spring.io/teams/spring-team/pipelines/spring-session-data-mongodb-2.0.x"] -| Test - JDK 12* -| image:https://ci.spring.io/api/v1/teams/spring-team/pipelines/spring-session-data-mongodb/jobs/Test%20-%20JDK%2012/badge[link="https://ci.spring.io/teams/spring-team/pipelines/spring-session-data-mongodb"] +| Test - JDK 13* +| image:https://ci.spring.io/api/v1/teams/spring-team/pipelines/spring-session-data-mongodb/jobs/Test%20-%20JDK%2013/badge[link="https://ci.spring.io/teams/spring-team/pipelines/spring-session-data-mongodb"] | -| Test - JDK 12* and Spring.NEXT -| image:https://ci.spring.io/api/v1/teams/spring-team/pipelines/spring-session-data-mongodb/jobs/Test%20-%20JDK%2012%20and%20Spring.NEXT/badge[link="https://ci.spring.io/teams/spring-team/pipelines/spring-session-data-mongodb"] +| Test - JDK 13* and Spring.NEXT +| image:https://ci.spring.io/api/v1/teams/spring-team/pipelines/spring-session-data-mongodb/jobs/Test%20-%20JDK%2013%20and%20Spring.NEXT/badge[link="https://ci.spring.io/teams/spring-team/pipelines/spring-session-data-mongodb"] | -| Test - JDK 12* and Spring.NEXT 5.1 -| image:https://ci.spring.io/api/v1/teams/spring-team/pipelines/spring-session-data-mongodb/jobs/Test%20-%20JDK%2012%20and%20Spring.NEXT%205.1/badge[link="https://ci.spring.io/teams/spring-team/pipelines/spring-session-data-mongodb"] +| Test - JDK 13* and Spring.NEXT 5.1 +| image:https://ci.spring.io/api/v1/teams/spring-team/pipelines/spring-session-data-mongodb/jobs/Test%20-%20JDK%2013%20and%20Spring.NEXT%205.1/badge[link="https://ci.spring.io/teams/spring-team/pipelines/spring-session-data-mongodb"] | -| Test - JDK 12* and Spring Data.NEXT -| image:https://ci.spring.io/api/v1/teams/spring-team/pipelines/spring-session-data-mongodb/jobs/Test%20-%20JDK%2012%20and%20Spring%20Data.NEXT/badge[link="https://ci.spring.io/teams/spring-team/pipelines/spring-session-data-mongodb"] +| Test - JDK 13* and Spring Data.NEXT +| image:https://ci.spring.io/api/v1/teams/spring-team/pipelines/spring-session-data-mongodb/jobs/Test%20-%20JDK%2013%20and%20Spring%20Data.NEXT/badge[link="https://ci.spring.io/teams/spring-team/pipelines/spring-session-data-mongodb"] | | Build - Release to repo.spring.io @@ -87,43 +87,6 @@ This will generate the artifact. You can also import the project into your IDE. -== Releasing Spring Session MongoDB - -To do a release (.RELEASE, .RC?, .M?): - -. Check in all changes and ensure there are no edited files. -. Run `ci/create-release.sh ` e.g. (`ci/create-release.sh 2.1.1.RELEASE 2.1.2.BUILD-SNAPSHOT`) - -From here, test things out locally. - -. `git checkout release` -. `./mvn clean package` -. ...do all your testing... - -Once verified, push the `release` branch to `origin` and let the CI server deploy it. - -. `git push` - -After a clean release, switch back to master branch and push the master development branch. - -. `git checkout master` -. `git push` -. `git push --tags` - -//To deploy your changes: -// -//. `git checkout release` -//. Execute a maven deploy. -//* For a milestone: `USERNAME= PASSWORD= ./mvnw -Pdistribute,milestone,docs clean deploy` -//* For a release: `USERNAME= PASSWORD= ./mvnw -Pdistribute,release,docs clean deploy` -//* For a release to maven central: `USERNAME= PASSWORD= ./mvnw -Pdistribute,gpg,central clean deploy -s settings.xml` (At SonaType, *close* and *releases*) -//. Inspect handiwork at https://repo.spring.io/ or https://oss.sonatype.org/#stagingRepositories - - -CI server should build the new snapshot and automatically deploy to artifactory. - -NOTE: A word about reference documentation. Based upon https://github.com/spring-projects/spring-framework/wiki/gradle-build-and-release-faq#user-content-wiki-docs_schema_dist_publication[this], the `distribute` profile contains an artifactory property that is applied to the ZIP file generated by the `docs` profile. A CRON job will scoop up the zipped up docs and unpack them inside the target location. - == Code of Conduct This project adheres to the Contributor Covenant link:CODE_OF_CONDUCT.adoc[code of conduct]. By participating, you are expected to uphold this code. Please report unacceptable behavior to spring-code-of-conduct@pivotal.io. diff --git a/ci/README.adoc b/ci/README.adoc index a26b414..e9048db 100644 --- a/ci/README.adoc +++ b/ci/README.adoc @@ -44,4 +44,20 @@ With these pipelines in place, you can now activate and expose them: % fly -t spring-team expose-pipeline -p spring-session-data-mongodb % fly -t spring-team unpause-pipeline -p spring-session-data-mongodb-2.0.x % fly -t spring-team expose-pipeline -p spring-session-data-mongodb-2.x ----- \ No newline at end of file +---- + +=== Making a release + +1. Create a new release (on the main branch). +---- +% ci/create-release.sh +---- + +2. With the release tagged, push the tagged version to the release branch. +---- +% git checkout -b release +% git reset --hard +% git push -f origin release +---- + +NOTE: You can chain the previous set of commands together using `&&`. \ No newline at end of file diff --git a/ci/pipeline-template.yml b/ci/pipeline-template.yml index 8e01779..9cad7de 100644 --- a/ci/pipeline-template.yml +++ b/ci/pipeline-template.yml @@ -36,11 +36,11 @@ resources: repository: openjdk tag: 11-jdk -- name: openjdk:12-jdk +- name: openjdk:13-jdk type: docker-image source: repository: openjdk - tag: 12-jdk + tag: 13-jdk - name: spring-session-data-mongodb-github type: git @@ -88,8 +88,8 @@ groups: - Test - JDK 8 and Spring.NEXT - Test - JDK 11 - Test - JDK 11 and Spring.NEXT - - Test - JDK 12 - - Test - JDK 12 and Spring.NEXT + - Test - JDK 13 + - Test - JDK 13 and Spring.NEXT - Build - name: pull-requests jobs: @@ -160,31 +160,31 @@ jobs: <<: *slack-success <<: *slack-failure -- name: Test - JDK 12 +- name: Test - JDK 13 serial: true public: true plan: - get: spring-session-data-mongodb-github trigger: true - - get: openjdk:12-jdk + - get: openjdk:13-jdk trigger: true - task: test - image: openjdk:12-jdk + image: openjdk:13-jdk file: spring-session-data-mongodb-github/ci/test.yml params: { PROFILE: "convergence" } <<: *slack-success <<: *slack-failure -- name: Test - JDK 12 and Spring.NEXT +- name: Test - JDK 13 and Spring.NEXT serial: true public: true plan: - get: spring-session-data-mongodb-github trigger: true - - get: openjdk:12-jdk + - get: openjdk:13-jdk trigger: true - task: test - image: openjdk:12-jdk + image: openjdk:13-jdk file: spring-session-data-mongodb-github/ci/test.yml params: { PROFILE: "spring-next,convergence" } <<: *slack-success @@ -201,8 +201,8 @@ jobs: Test - JDK 8 and Spring.NEXT, Test - JDK 11, Test - JDK 11 and Spring.NEXT, - Test - JDK 12, - Test - JDK 12 and Spring.NEXT + Test - JDK 13, + Test - JDK 13 and Spring.NEXT ] - put: spring-session-data-mongodb-status params: @@ -221,7 +221,7 @@ jobs: - "/**" properties: zip.deployed: false - zip.displayname: "Spring Session Data MongoDB" + zip.displayname: "spring-session-data-mongodb" zip.name: "spring-session-data-mongodb" zip.type: "docs" on_failure: @@ -261,7 +261,7 @@ jobs: trigger: true version: every - get: openjdk:11-jdk - - get: openjdk:12-jdk + - get: openjdk:13-jdk - put: spring-session-data-mongodb-pull-requests params: path: spring-session-data-mongodb-github @@ -281,12 +281,12 @@ jobs: image: openjdk:11-jdk file: spring-session-data-mongodb-github/ci/test.yml params: { PROFILE: "spring-next,convergence" } - - task: test (JDK 12) - image: openjdk:12-jdk + - task: test (JDK 13) + image: openjdk:13-jdk file: spring-session-data-mongodb-github/ci/test.yml params: { PROFILE: "convergence" } - - task: test (JDK 12 and Spring.NEXT) - image: openjdk:12-jdk + - task: test (JDK 13 and Spring.NEXT) + image: openjdk:13-jdk file: spring-session-data-mongodb-github/ci/test.yml params: { PROFILE: "spring-next,convergence" } on_failure: @@ -327,7 +327,7 @@ jobs: trigger: true - put: spring-session-data-mongodb-status params: - commit: spring-session-data-mongodb-release + commit: spring-session-data-mongodb-github state: pending - task: build file: spring-session-data-mongodb-github/ci/build.yml @@ -342,7 +342,7 @@ jobs: - "/**" properties: zip.deployed: false - zip.displayname: "Spring Session Data MongoDB" + zip.displayname: "spring-session-data-mongodb" zip.name: "spring-session-data-mongodb" zip.type: "docs" on_failure: