diff --git a/README.adoc b/README.adoc index 00be2b6..985832b 100644 --- a/README.adoc +++ b/README.adoc @@ -69,43 +69,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-2.0.x.sh ` e.g. (`ci/create-release-2.0.x.sh 2.1.1.RELEASE 2.1.2.BUILD-SNAPSHOT`) - -From here, test things out locally. - -. `git checkout release-2.0.x` -. `./mvnw clean package` -. ...do all your testing... - -Once verified, push the `release-2.0.x` branch to `origin` and let the CI server deploy it. - -. `git push` - -After a clean release, switch back to 2.0.x branch and push it. - -. `git checkout 2.0.x` -. `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..8addfe1 100644 --- a/ci/README.adoc +++ b/ci/README.adoc @@ -28,20 +28,28 @@ WARNING: Do NOT check this file into source control! If you'll check, `credentia With this in place, run the following `fly` commands to create pipelines: ---- -% fly -t spring-team sp -p spring-session-data-mongodb -c ci/pipeline-template.yml -l credentials.yml -v branch=master -v release-branch=release % fly -t spring-team sp -p spring-session-data-mongodb-2.0.x -c ci/pipeline-template.yml -l credentials.yml -v branch=2.0.x -v release-branch=release-2.0.x ---- -This creates pipelines for: - -* Spring Session for MongoDB `master` branch -* Spring Session for MongoDB `2.0.x` branch - With these pipelines in place, you can now activate and expose them: ---- -% fly -t spring-team unpause-pipeline -p spring-session-data-mongodb -% 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 +% fly -t spring-team expose-pipeline -p spring-session-data-mongodb-2.0x +---- + +=== 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 release-2.0.x +% 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/create-release.sh b/ci/create-release.sh index 1aa456b..c026d46 100755 --- a/ci/create-release.sh +++ b/ci/create-release.sh @@ -5,19 +5,15 @@ set -euo pipefail RELEASE=$1 SNAPSHOT=$2 -git branch -f release -git checkout release - # Bump up the version in pom.xml to the desired version and commit the change ./mvnw versions:set -DnewVersion=$RELEASE -DgenerateBackupPoms=false git add . -git commit --message "Releasing Spring Session MongoDB v$RELEASE" +git commit --message "Releasing Spring Session for MongoDB v$RELEASE" # Tag the release git tag -s v$RELEASE -m "v$RELEASE" # Bump up the version in pom.xml to the next snapshot -git checkout master ./mvnw versions:set -DnewVersion=$SNAPSHOT -DgenerateBackupPoms=false git add . git commit --message "Continue development on v$SNAPSHOT" diff --git a/ci/pipeline-template.yml b/ci/pipeline-template.yml index 44315cb..c6a46f3 100644 --- a/ci/pipeline-template.yml +++ b/ci/pipeline-template.yml @@ -48,7 +48,7 @@ resources: uri: https://repo.spring.io username: ((artifactory-username)) password: ((artifactory-password)) - build_name: spring-session-data-mongodb + build_name: spring-session-data-mongodb-2.x - name: spring-session-data-mongodb-pull-requests type: pull-request @@ -106,8 +106,8 @@ jobs: - task: test file: spring-session-data-mongodb-github/ci/test.yml params: { PROFILE: "convergence" } - <<: *slack-success - <<: *slack-failure + <<: *slack-test-success + <<: *slack-test-failure - name: Test - JDK 8 and Spring.NEXT serial: true @@ -120,8 +120,8 @@ jobs: - task: test file: spring-session-data-mongodb-github/ci/test.yml params: { PROFILE: "spring5-next,convergence" } - <<: *slack-success - <<: *slack-failure + <<: *slack-test-success + <<: *slack-test-failure - name: Test - JDK 8 and Spring.NEXT 5.1 serial: true @@ -134,8 +134,8 @@ jobs: - task: test file: spring-session-data-mongodb-github/ci/test.yml params: { PROFILE: "spring51-next,convergence" } - <<: *slack-success - <<: *slack-failure + <<: *slack-test-success + <<: *slack-test-failure - name: Test - JDK 11 serial: true @@ -149,8 +149,8 @@ jobs: image: openjdk:11-jdk file: spring-session-data-mongodb-github/ci/test.yml params: { PROFILE: "convergence" } - <<: *slack-success - <<: *slack-failure + <<: *slack-test-success + <<: *slack-test-failure - name: Test - JDK 11 and Spring.NEXT serial: true @@ -164,8 +164,8 @@ jobs: image: openjdk:11-jdk file: spring-session-data-mongodb-github/ci/test.yml params: { PROFILE: "spring5-next,convergence" } - <<: *slack-success - <<: *slack-failure + <<: *slack-test-success + <<: *slack-test-failure - name: Test - JDK 11 and Spring.NEXT 5.1 serial: true @@ -179,8 +179,8 @@ jobs: image: openjdk:11-jdk file: spring-session-data-mongodb-github/ci/test.yml params: { PROFILE: "spring51-next,convergence" } - <<: *slack-success - <<: *slack-failure + <<: *slack-test-success + <<: *slack-test-failure - name: Build serial: true @@ -213,8 +213,8 @@ jobs: - "/**" properties: zip.deployed: false - zip.displayname: "Spring Session Data MongoDB" - zip.name: "spring-session-data-mongodb" + zip.displayname: "spring-session-data-mongodb-2.x" + zip.name: "spring-session-data-mongodb-2.x" zip.type: "docs" on_failure: aggregate: @@ -332,8 +332,8 @@ jobs: - "/**" properties: zip.deployed: false - zip.displayname: "Spring Session Data MongoDB" - zip.name: "spring-session-data-mongodb" + zip.displayname: "spring-session-data-mongodb-2.x" + zip.name: "spring-session-data-mongodb-2.x" zip.type: "docs" on_failure: aggregate: @@ -456,7 +456,7 @@ jobs: title: "$BUILD_PIPELINE_NAME/$BUILD_JOB_NAME #$BUILD_NAME" title_link: $ATC_EXTERNAL_URL/teams/$BUILD_TEAM_NAME/pipelines/$BUILD_PIPELINE_NAME/jobs/$BUILD_JOB_NAME/builds/$BUILD_NAME -slack-failure: &slack-failure +slack-test-failure: &slack-test-failure on_failure: put: slack params: @@ -467,7 +467,7 @@ slack-failure: &slack-failure title: "$BUILD_PIPELINE_NAME/$BUILD_JOB_NAME #$BUILD_NAME" title_link: $ATC_EXTERNAL_URL/teams/$BUILD_TEAM_NAME/pipelines/$BUILD_PIPELINE_NAME/jobs/$BUILD_JOB_NAME/builds/$BUILD_NAME -slack-success: &slack-success +slack-test-success: &slack-test-success on_success: put: slack params: