Skip to content

Commit

Permalink
release(chart): 0.28.2
Browse files Browse the repository at this point in the history
Signed-off-by: Viet Nguyen Duc <[email protected]>
  • Loading branch information
VietND96 committed Feb 24, 2024
1 parent 9e99f2a commit f4e98d2
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 34 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
- name: Update tag in docs and files
run: ./update_tag_in_docs_and_files.sh ${LATEST_TAG} ${NEXT_TAG}
- name: Update chart CHANGELOG
run: ./generate_chart_changelog.sh HEAD
run: ./generate_chart_changelog.sh
- name: Build images
run: VERSION="${GRID_VERSION}" BUILD_DATE=${BUILD_DATE} make build
- name: Login Docker Hub
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/helm-chart-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,25 +27,25 @@ jobs:
git config user.email "[email protected]"
- name: Get chart release notes (chart_release_notes.md)
run: ./generate_chart_changelog.sh HEAD
run: ./generate_chart_changelog.sh

- name: Run chart-releaser
uses: helm/chart-releaser-action@main
with:
mark_as_latest: false
skip_existing: true
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
CR_RELEASE_NOTES_FILE: RELEASE_NOTES.md

- name: Commit files
run: |
git config --local user.email "[email protected]"
git config --local user.name "Selenium CI Bot"
git commit -m "Update tag in docs and files" -a
git commit -m "Update tag in docs and files" -a || true
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.SELENIUM_CI_TOKEN }}
branch: trunk

- name: Run chart-releaser
uses: helm/chart-releaser-action@main
with:
mark_as_latest: false
skip_existing: true
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
CR_RELEASE_NOTES_FILE: RELEASE_NOTES.md
18 changes: 10 additions & 8 deletions charts/selenium-grid/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
## :heavy_check_mark: selenium-grid-0.0.10.28.1
## :heavy_check_mark: selenium-grid-0.28.1

- Chart is using image tag "1.0.0"4.18.1-20240224
- Chart is tested on Kubernetes versions: v1.25.16 v1.26.14 v1.27.11 v1.28.7 v1.29.2

### Added
- feat(chart): option to disable release name prefix in object naming :: Viet Nguyen Duc
- Chart is using image tag 4.18.0-20240220
- Chart is tested on Kubernetes versions: v1.25.16 v1.26.14 v1.27.11 v1.28.7 v1.29.2

### Fixed
- fix(chart): extra scripts can be imported in sub-chart by default :: Viet Nguyen Duc
- bug(chart): template issue when chart is imported as dependency in umbrella charts :: Viet Nguyen Duc
- bug(chart): SE_NODE_GRID_URL missing port when `hostname` is `selenium-grid.local` :: Viet Nguyen Duc
- bug(chart) CRITICAL: Node startup probe loop infinite when ingress hostname is set :: Viet Nguyen Duc

### Changed
- test(chart): test extra scripts import when import as sub-chart :: Viet Nguyen Duc
- test(chart): update docs :: Viet Nguyen Duc
- test(chart): add tests for the case basic auth is enabled :: Viet Nguyen Duc
- test(chart): add tests for the case ingress is enabled with `hostname` set :: Viet Nguyen Duc
- build(chart): change log and release notes for helm chart :: Viet Nguyen Duc

## :heavy_check_mark: selenium-grid-0.28.0

Expand Down
2 changes: 1 addition & 1 deletion charts/selenium-grid/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: selenium-grid
description: A Helm chart for creating a Selenium Grid Server in Kubernetes
type: application
version: 0.28.1
version: 0.28.2
appVersion: 4.18.1-20240224
icon: https://github.com/SeleniumHQ/docker-selenium/raw/trunk/logo.png
dependencies:
Expand Down
19 changes: 10 additions & 9 deletions generate_chart_changelog.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,33 @@
CHART_DIR="./charts/selenium-grid"
CHANGELOG_FILE="./charts/selenium-grid/CHANGELOG.md"
TAG_PATTERN="selenium-grid"
SET_TAG=${1:-""}
DEFAULT_TAG="trunk"
SET_TAG=${1:-$(git rev-parse --abbrev-ref HEAD)}

# Get current chart app version
CHART_APP_VERSION=$(find . \( -type d -name .git -prune \) -o -type f -name 'Chart.yaml' -print0 | xargs -0 cat | grep ^appVersion | cut -d ':' -f 2 | tr -d '[:space:]')
CHART_APP_VERSION=$(find . \( -type d -name .git -prune \) -o -type f -wholename '*/selenium-grid/Chart.yaml' -print0 | xargs -0 cat | grep ^appVersion | cut -d ':' -f 2 | tr -d '[:space:]')

# Generate the changelog
generate_changelog() {
# Get a list of tags sorted by commit date
tags=($(git tag --sort=committerdate | grep "^$TAG_PATTERN"))
tags_size=${#tags[@]}

CURRENT_CHART_VERSION=$(find . \( -type d -name .git -prune \) -o -type f -name 'Chart.yaml' -print0 | xargs -0 cat | grep ^version | cut -d ':' -f 2 | tr -d '[:space:]')
CURRENT_CHART_VERSION=$(find . \( -type d -name .git -prune \) -o -type f -wholename '*/selenium-grid/Chart.yaml' -print0 | xargs -0 cat | grep ^version | cut -d ':' -f 2 | tr -d '[:space:]')

# Check if there are tags
if [ ${#tags[@]} -eq 0 ]; then
commit_range="HEAD"
commit_range="$DEFAULT_TAG"
change_title="${TAG_PATTERN}-${CURRENT_CHART_VERSION}"
elif [ ${#tags[@]} -eq 1 ] || [ "$SET_TAG" = "HEAD" ]; then
elif [ ${#tags[@]} -eq 1 ] || [ "$SET_TAG" = "$DEFAULT_TAG" ]; then
previous_tag="${tags[$tags_size-1]}"
current_tag="HEAD"
commit_range="${previous_tag}..${current_tag}"
current_tag="$DEFAULT_TAG"
commit_range="${previous_tag}..origin/${current_tag}"
change_title="${TAG_PATTERN}-${CURRENT_CHART_VERSION}"
else
previous_tag="${tags[$tags_size-2]}"
current_tag="${tags[$tags_size-1]}"
commit_range="${previous_tag}..${current_tag}"
commit_range="${previous_tag}..origin/${current_tag}"
change_title="$current_tag"
fi

Expand Down Expand Up @@ -79,7 +80,7 @@ generate_changelog() {

# Create chart_release_notes.md
release_notes_file="$CHART_DIR/RELEASE_NOTES.md"
chart_description=$(find . \( -type d -name .git -prune \) -o -type f -name 'Chart.yaml' -print0 | xargs -0 cat | grep ^description | cut -d ':' -f 2)
chart_description=$(find . \( -type d -name .git -prune \) -o -type f -wholename '*/selenium-grid/Chart.yaml' -print0 | xargs -0 cat | grep ^description | cut -d ':' -f 2)
echo "$chart_description" > "$release_notes_file"
echo "" >> "$release_notes_file"
cat $temp_file >> "$release_notes_file"
Expand Down
2 changes: 1 addition & 1 deletion tests/charts/umbrella-charts/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ version: 0.0.1
appVersion: "1.0.0"
dependencies:
- name: selenium-grid
version: 0.28.1
version: 0.28.2
repository: file://../../../charts/selenium-grid
6 changes: 3 additions & 3 deletions update_tag_in_docs_and_files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ LATEST_TAG=$1
NEXT_TAG=$2
LATEST_DATE=$(echo ${LATEST_TAG} | sed 's/.*-//')
NEXT_DATE=$(echo ${NEXT_TAG} | sed 's/.*-//')
latest_chart_app_version=$(find . \( -type d -name .git -prune \) -o -type f -name 'Chart.yaml' -print0 | xargs -0 cat | grep ^appVersion | cut -d ':' -f 2 | tr -d '[:space:]')
latest_chart_app_version=$(find . \( -type d -name .git -prune \) -o -type f -wholename '*/selenium-grid/Chart.yaml' -print0 | xargs -0 cat | grep ^appVersion | cut -d ':' -f 2 | tr -d '[:space:]')
FFMPEG_TAG_VERSION=$(grep FFMPEG_TAG_VERSION Makefile | sed 's/.*,\([^)]*\))/\1/p' | head -n 1)
RCLONE_TAG_VERSION=$(grep RCLONE_TAG_VERSION Makefile | sed 's/.*,\([^)]*\))/\1/p' | head -n 1)

Expand Down Expand Up @@ -34,7 +34,7 @@ find . \( -type d -name .git -prune \) -o -type f ! -name 'CHANGELOG.md' -print0
if [ "$latest_chart_app_version" == $LATEST_TAG ] && [ "$latest_chart_app_version" != "$NEXT_TAG" ]; then
IFS='.' read -ra latest_version_parts <<< "$LATEST_TAG"
IFS='.' read -ra next_version_parts <<< "$NEXT_TAG"
latest_chart_version=$(find . \( -type d -name .git -prune \) -o -type f -name 'Chart.yaml' -print0 | xargs -0 cat | grep ^version | cut -d ':' -f 2 | tr -d '[:space:]')
latest_chart_version=$(find . \( -type d -name .git -prune \) -o -type f -wholename '*/selenium-grid/Chart.yaml' -print0 | xargs -0 cat | grep ^version | cut -d ':' -f 2 | tr -d '[:space:]')
IFS='.' read -ra latest_chart_version_parts <<< "$latest_chart_version"
if [ "${latest_version_parts[0]}" != "${next_version_parts[0]}" ]; then
((latest_chart_version_parts[0]++))
Expand All @@ -51,7 +51,7 @@ if [ "$latest_chart_app_version" == $LATEST_TAG ] && [ "$latest_chart_app_versio
echo -e "\033[0;32m LATEST_CHART_VERSION -> ${latest_chart_version}\033[0m"
echo -e "\033[0;32m NEXT_CHART_VERSION -> ${next_chart_version}\033[0m"
# If you want to test this locally and you are using macOS, do `brew install gnu-sed` and change `sed` for `gsed`.
find . \( -type d -name .git -prune \) -o -type f -name 'Chart.yaml' -print0 | xargs -0 sed -i "s/${latest_chart_version}/${next_chart_version}/g"
find . \( -type d -name .git -prune \) -o -type f -wholename '*/selenium-grid/Chart.yaml' -print0 | xargs -0 sed -i "s/${latest_chart_version}/${next_chart_version}/g"
find . \( -type d -name .git -prune \) -o -type f -name 'bug_report.yaml' -print0 | xargs -0 sed -i "s/${latest_chart_version}/${next_chart_version}/g"
fi

Expand Down

0 comments on commit f4e98d2

Please sign in to comment.