Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Update release procedure #1514

Merged
merged 7 commits into from
May 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 43 additions & 1 deletion docs/releases.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,49 @@ A Conduit release has the following parts:
- a GitHub package, which is the official Docker image for Conduit. It's available on GitHub's Container Registry. The
latest Docker image which is not a nightly is tagged with `latest`.

## How to release a new version
## Before a release

### Update dependencies

Dependencies should be updated in the order described below. The instructions
assume that this repository and the other Conduit repositories are all cloned in
the same directory.

1. [`conduit-commons`](https://github.com/ConduitIO/conduit-commons)
- Run `scripts/get-compare-link.sh ../conduit-commons/` to compare the latest tag and the `main` branch.
- If the changes should be released/tagged, push a new tag.
2. [`conduit-connector-protocol`](https://github.com/conduitio/conduit-connector-protocol)
- Update `conduit-commons` if needed: `go get github.com/conduitio/[email protected]`
- Run `scripts/get-compare-link.sh ../conduit-connector-protocol/` to compare the latest tag and the `main` branch.
- If the changes should be released/tagged, push a new tag.
3. [`conduit-connector-sdk`](https://github.com/ConduitIO/conduit-connector-sdk)
- Update `conduit-commons` if needed: `go get github.com/conduitio/[email protected]`
- Update `conduit-connector-protocol` if needed: `go get github.com/conduitio/[email protected]`
- Run `scripts/get-compare-link.sh ../conduit-connector-sdk/` to compare the latest tag and the `main` branch.
- If the changes should be released/tagged, push a new tag.
4. [`conduit-processor-sdk`](https://github.com/ConduitIO/conduit-processor-sdk)
- Update `conduit-commons` if needed: `go get github.com/conduitio/[email protected]`
- Run `scripts/get-compare-link.sh ../conduit-processor-sdk/` to compare the latest tag and the `main` branch.
- If the changes should be released/tagged, push a new tag.
5. Bump the Connector SDK in all the built-in connectors: `scripts/bump-sdk-in-connectors.sh vX.Y.Z`
6. For each of the built-in connectors (file, kafka, generator, s3, postgres, log):
- Run `scripts/get-compare-link.sh ../conduit-processor-sdk/` to compare the latest tag and the `main` branch.
- If the changes should be released/tagged, push a new tag.
7. Bump the built-in connectors: `scripts/bump-builtin-connectors.sh`
8. Conduit itself
- Update `conduit-connector-sdk` if needed
- Update `conduit-processor-sdk` if needed
- Update `conduit-connector-protocol` if needed
- Update `conduit-commons` if needed
- Release Conduit (see instructions below)

## Documentation

1. Write a blog post.
2. Regenerate processor documentation on [`conduit-site`](https://github.com/ConduitIO/conduit-site).
3. Update banner on the web-site ([example](https://github.com/ConduitIO/conduit-site/pull/47/files#diff-cc8abb6104e21d495dc8f64639c7b03419226d920d1c545df51be9b0b73b2784)).

## Releasing Conduit

A release is triggered by pushing a new tag which starts with `v` (for example `v1.2.3`). Everything else is then
handled by GoReleaser and GitHub actions. To push a new tag, please use the script [scripts/tag.sh](https://github.com/ConduitIO/conduit/blob/main/scripts/tag.sh),
Expand Down
4 changes: 2 additions & 2 deletions scripts/bump-sdk-in-connectors.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ SDK_V=$1

for conn in 'file' 'kafka' 'generator' 's3' 'postgres' 'log'
do
cd ../conduit-connector-$conn
cd ../conduit-connector-$conn || exit

echo
echo "Working on conduit-connector-$conn"
Expand All @@ -36,5 +36,5 @@ do

gh pr create --fill --head bump-sdk-version-$SDK_V

cd ../conduit
cd ../conduit || exit
done
27 changes: 27 additions & 0 deletions scripts/get-compare-link.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash

# Check if the correct number of arguments are provided
if [ "$#" -ne 1 ]; then
echo "Usage: $0 <repository_directory>"
exit 1
fi

# Move into the repository directory
cd "$1" || { echo "Failed to move into repository directory"; exit 1; }

# Fetch tags
git fetch --tags || { echo "Failed to fetch tags"; exit 1; }

# Get the latest tag across all branches
latest_tag=$(git describe --tags "$(git rev-list --tags --max-count=1)") || { echo "Failed to get latest tag"; exit 1; }

# Get the owner and repository name from the remote URL
repo_url=$(git config --get remote.origin.url)
IFS='/' read -ra parts <<< "$repo_url"
owner="${parts[-2]}"
repo="${parts[-1]%.git}" # Remove the .git extension if it exists

# Create a link to compare the latest tag and the main branch
comparison_link="https://github.com/$owner/$repo/compare/$latest_tag...main"

echo "Comparison Link: $comparison_link"