diff --git a/docs/release-process.md b/docs/release-process.md index e9fdaeaa..7e14a820 100644 --- a/docs/release-process.md +++ b/docs/release-process.md @@ -103,6 +103,14 @@ Follow the instructions prompted by the `do_release.sh` script. You will need to > Make sure to Normal Merge the pull request i.e. merge the pull request with merge commit and not a squash merge. This is required because we create the tag from the pull request, so in order to have the tag on the release branche's history, it has to be a normal merge. +##### On `main` + +Once you have done the release on the release branch, there are several steps to follow on `main`. + +- The `vitess/lite` image tag must be changed in [101_initial_cluster.yaml](..%2Ftest%2Fendtoend%2Foperator%2F101_initial_cluster.yaml). The latest Vitess release tag must be used. +- We must copy the [operator-latest.yaml](..%2Ftest%2Fendtoend%2Foperator%2Foperator-latest.yaml) file we created during the release onto `main`'s [operator.yaml](..%2Ftest%2Fendtoend%2Foperator%2Foperator.yaml) file. +- Bump the `planetscale/vitess-operator` image tag to the latest version we just released in [operator.yaml](..%2Ftest%2Fendtoend%2Foperator%2Foperator.yaml). + ### UI Release Create a [new release](https://github.com/planetscale/vitess-operator/releases/new) diff --git a/tools/release/do_release.sh b/tools/release/do_release.sh index 08932468..11603160 100755 --- a/tools/release/do_release.sh +++ b/tools/release/do_release.sh @@ -26,23 +26,15 @@ fi function updateVitessImages() { old_vitess_version=$1 new_vitess_version=$2 - new_operator_version=$3 - operator_files=$(find -E $ROOT/test/endtoend/operator/* -name "*.yaml" | grep -v "101_initial_cluster.yaml") + operator_files=$(find -E $ROOT/test/endtoend/operator/* -name "*.yaml" | grep -v "101_initial_cluster.yaml" | grep -v "101_initial_cluster_backup.yaml") sed -i.bak -E "s/vitess\/lite:(.*)/vitess\/lite:v$new_vitess_version/g" $operator_files sed -i.bak -E "s/vitess\/vtadmin:(.*)/vitess\/vtadmin:v$new_vitess_version/g" $operator_files sed -i.bak -E "s/vitess\/lite:(.*)/vitess\/lite:v$new_vitess_version\"/g" $ROOT/pkg/apis/planetscale/v2/defaults.go sed -i.bak -E "s/vitess\/lite:(.*)/vitess\/lite:v$old_vitess_version/g" $ROOT/test/endtoend/operator/101_initial_cluster.yaml - sed -i.bak -E "s/planetscale\/vitess-operator:(.*)/planetscale\/vitess-operator:v$new_operator_version/g" $ROOT/test/endtoend/operator/operator.yaml + sed -i.bak -E "s/vitess\/lite:(.*)/vitess\/lite:v$new_vitess_version-mysql57/g" $ROOT/test/endtoend/operator/101_initial_cluster_backup.yaml - rm -f $(find -E $ROOT/test/endtoend/operator/ -name "*.yaml.bak") $ROOT/pkg/apis/planetscale/v2/defaults.go.bak $ROOT/test/endtoend/operator/operator.yaml.bak -} - -function updateOperatorYaml() { - new_operator_version=$1 - - sed -i.bak -E "s/planetscale\/vitess-operator:(.*)/planetscale\/vitess-operator:v$new_operator_version/g" "$ROOT/deploy/operator.yaml" - rm -f $ROOT/deploy/operator.yaml.bak + rm -f $(find -E $ROOT/test/endtoend/operator/ -name "*.yaml.bak") $ROOT/pkg/apis/planetscale/v2/defaults.go.bak } function updateVersion() { @@ -63,7 +55,6 @@ fi updateVersion $NEW_OPERATOR_VERSION updateVitessImages $OLD_VITESS_VERSION $NEW_VITESS_VERSION $NEW_OPERATOR_VERSION -updateOperatorYaml $NEW_OPERATOR_VERSION git add --all git commit -n -s -m "Release commit for $NEW_OPERATOR_VERSION" @@ -77,10 +68,10 @@ git commit -n -s -m "Back to dev mode" echo "" echo "-----------------------" echo "" -echo "\tPlease push the new git tag:" +echo "Please push the new git tag:" echo "" -echo "\t\tgit push origin v$NEW_OPERATOR_VERSION" +echo " git push origin v$NEW_OPERATOR_VERSION" echo "" -echo "\tAnd push your current branch in order to open a Pull Request against the release branch." +echo "And push your current branch in order to open a Pull Request against the release branch." echo "" echo "" \ No newline at end of file