Skip to content

Commit

Permalink
Update release procedure (#1514)
Browse files Browse the repository at this point in the history
  • Loading branch information
hariso authored May 1, 2024
1 parent 3360cf7 commit 7ad8e66
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 3 deletions.
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"

0 comments on commit 7ad8e66

Please sign in to comment.