@@ -7,70 +7,87 @@ and publish it to S3.
77## Prerequisites
88
99You will need:
10- * AWS credentials with write access to the ` packages.couchbase.com ` S3 bucket.
11- * The [ AWS CLI] ( https://docs.aws.amazon.com/cli/latest/userguide/ ) , for uploading the distribution archive to S3.
12- * A local Docker installation, if you wish to run the integration tests.
10+ * A local Docker installation if you wish to run the integration tests.
1311
14- All set? In that case...
1512
13+ ## Before you start
1614
17- ## Let's do this!
15+ ### Use a clean, up-to-date workspace
1816
19- Start by running ` ./gradlew clean integrationTest ` to make sure the project builds successfully,
20- and the unit and integration tests pass.
21- When you're satisfied with the test results, it's time to...
17+ Make sure your local repository is up-to-date:
2218
19+ git pull --rebase --autostash
2320
24- ## Bump the project version number
21+ Make sure you don't have any uncommitted files in your workspace; ` git status ` should say "nothing to commit, working tree clean".
2522
26- 1 . Edit ` build.gradle ` and remove the ` -SNAPSHOT ` suffix from the version string.
27- 2 . Edit ` docs/modules/ROOT/pages/_attributes ` and bump the ` :version: ` attribute.
28- 3 . Edit ` README.adoc ` and bump the version numbers if appropriate.
29- 4 . Check whether ` compatibility.adoc ` needs to be updated to include the new version.
30- 5 . Commit these changes, with message "Prepare x.y.z release"
31- (where x.y.z is the version you're releasing).
3223
33- # Check for Docker base image updates
24+ ## Check for Docker base image updates
3425
3526Look for a new version of the Docker base image, and update the Dockerfiles if necessary.
3627
28+
29+ ### Check test results
30+
31+ Check the ** Run Tests** GHA workflow and verify the connector was built successfully.
32+ https://github.com/couchbase/couchbase-elasticsearch-connector/actions/workflows/run-tests.yml
33+
34+ If there were issues with the workflow, resolve them before proceeding with the release.
35+
36+ Some tests might fail due to timeouts in the GHA environment.
37+ If that happens, try running them locally:
38+
39+ ./gradlew clean integrationTest
40+
41+ When you are satisfied with the test results, move on the next step.
42+
43+
44+ ## Bump the project version number
45+
46+ 1 . Edit ` build.gradle ` and remove the ` -SNAPSHOT ` suffix from the version string.
47+ 2 . Commit these changes, with message "Prepare x.y.z release"
48+ (where x.y.z is the version you're releasing).
49+
3750## Tag the release
3851
39- Run the command ` git tag -s x.y.z ` (where x.y.z is the release version number) .
52+ After submitting the version bump change in Gerrit, run ` git pull ` so your local repo matches what's in Gerrit .
4053
54+ Run the command ` git tag -s x.y.z ` (where x.y.z is the release version number).
4155Suggested tag message is "Release x.y.z".
4256
43- Don't push the tag right away, though.
44- Wait until the release is successful and you're sure there will be no more changes.
45- Otherwise it can be a pain to remove an unwanted tag from Gerrit.
57+ It's hard to change a tag once it has been pushed to Gerrit, so at this point you might want to do any final sanity checking.
58+ At a minimum, make sure ` ./gradlew clean build ` succeeds.
59+
60+ ## Trigger the release workflow
61+
62+ Go to the ** Deploy Release** GitHub Action:
4663
64+ https://github.com/couchbase/couchbase-elasticsearch-connector/actions/workflows/deploy-release.yml
4765
48- ## Go! Go! Go!
66+ Press the "Run workflow" button.
67+ Leave "Use workflow from" at the default of "Branch: master".
68+ Input the name of the tag you created in the previous step.
4969
50- Here it is, the moment of truth.
51- When you're ready to build the distribution archive:
70+ Take a deep breath, then push the "Run workflow" button to start the release process.
5271
53- ./gradlew clean build
72+ The workflow builds and uploads the connector distribution to our public S3 bucket.
73+ If it succeeds, you should be able to download the connector distribution from here:
5474
55- If the build is successful, you're ready to publish the distribution archive to S3 with this shell command:
75+ https://packages.couchbase.com/clients/connectors/elasticsearch/<VERSION>/couchbase-elasticsearch-connector-<VERSION>.zip
5676
57- VERS=x.y.z
58- aws s3 cp build/distributions/couchbase-elasticsearch-connector-${VERS}.zip \
59- s3://packages.couchbase.com/clients/connectors/elasticsearch/${VERS}/couchbase-elasticsearch-connector-${VERS}.zip \
60- --acl public-read
6177
78+ ## Update documentation
6279
63- Whew, you did it!
64- Or building or publishing failed and you're looking at a cryptic error message, in which case you might want to check out the Troubleshooting section below.
80+ In the ` docs-elastic-search ` repo:
6581
66- If the release succeeded, now's the time to publish the tag:
82+ 1 . Edit ` modules/ROOT/pages/_attributes ` and bump the ` :version: ` attribute.
83+ 2 . Verify ` compatibility.adoc ` is up-to-date.
84+ 3 . If releasing a new minor version, edit ` docs/antora.yml ` and update the version number.
6785
68- git push origin x.y.z
6986
7087## Publish Docker image
7188
7289A daily job builds a Docker image from the current ` master ` branch.
73- After pushing the tag, and ** before making any other changes to the repo,** sit on your butt until the new image appears here:
90+ After pushing the tag, and ** before making any other changes to the connector repo,** sit on your butt until the new image appears here:
7491
7592https://github.com/orgs/cb-vanilla/packages/container/package/elasticsearch-connector
7693
@@ -98,8 +115,3 @@ Update this element's `value` property to refer to the version under development
98115For example, if you just bumped the version to 4.3.2-SNAPSHOT, the version you're specifying in the manifest should be "4.3.2".
99116
100117Commit the change.
101-
102- ## Troubleshooting
103-
104- * Take another look at the Prerequisites section.
105- Did you miss anything?
0 commit comments