Skip to content

Commit

Permalink
[DEVOPS-3129] Helm chart packaging post-2024.1
Browse files Browse the repository at this point in the history
Summary: Allow force option on version down-grades for preview releases.

Test Plan: jenkins internal build packaging

Reviewers: jharveysmith

Reviewed By: jharveysmith

Subscribers: devops, yugaware

Differential Revision: https://phorge.dev.yugabyte.com/D35727
  • Loading branch information
svarnau committed Jun 10, 2024
1 parent 2d625c9 commit b8aa3c4
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 33 deletions.
31 changes: 0 additions & 31 deletions .ci/update_version.sh

This file was deleted.

11 changes: 10 additions & 1 deletion .ci/update_yba_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ function is_semver_compatible() {
fi
}

force_update="False"
if [[ "$1" == "--force" ]]; then
force_update="True"
shift
fi

if [[ $# != 2 ]]; then
echo "Incorrect number of arguments. Usage: ${0%*/} <version> <docker-tag>" 1>&2
Expand All @@ -38,7 +43,11 @@ current_version="$(grep -r "^appVersion" "stable/yugaware/Chart.yaml" | awk '{ p
if ! version_gt "${release_version}" "${current_version%-b*}" ; then
echo "Release version is either older or equal to the current version: " \
"'${release_version}' <= '${current_version%-b*}'" 1>&2
exit 3
if [[ "$force_update" == "True" ]]; then
echo "Continuing with forced-update."
else
exit 3
fi
fi

chart_release_version="$(echo "${release_version}" | grep -o '[0-9]\+.[0-9]\+.[0-9]\+')"
Expand Down
11 changes: 10 additions & 1 deletion .ci/update_ybdb_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ function is_semver_compatible() {
fi
}

force_update="False"
if [[ "$1" == "--force" ]]; then
force_update="True"
shift
fi

if [[ $# != 2 ]]; then
echo "Incorrect number of arguments. Usage: ${0%*/} <version> <docker-tag>" 1>&2
Expand All @@ -38,7 +43,11 @@ current_version="$(grep -r "^appVersion" "stable/yugabyte/Chart.yaml" | awk '{ p
if ! version_gt "${release_version}" "${current_version%-b*}" ; then
echo "Release version is either older or equal to the current version: " \
"'${release_version}' <= '${current_version%-b*}'" 1>&2
exit 3
if [[ "$force_update" == "True" ]]; then
echo "Continuing with forced-update."
else
exit 3
fi
fi

chart_release_version="$(echo "${release_version}" | grep -o '[0-9]\+.[0-9]\+.[0-9]\+')"
Expand Down

0 comments on commit b8aa3c4

Please sign in to comment.