diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 22bb63151..c7a5f3fa4 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -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 diff --git a/.github/workflows/helm-chart-release.yml b/.github/workflows/helm-chart-release.yml index 460327fea..bd7dd13a3 100644 --- a/.github/workflows/helm-chart-release.yml +++ b/.github/workflows/helm-chart-release.yml @@ -27,25 +27,25 @@ jobs: git config user.email "$GITHUB_ACTOR@users.noreply.github.com" - 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 "selenium-ci@users.noreply.github.com" 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 diff --git a/charts/selenium-grid/CHANGELOG.md b/charts/selenium-grid/CHANGELOG.md index 8cda0eb54..6683b7f12 100644 --- a/charts/selenium-grid/CHANGELOG.md +++ b/charts/selenium-grid/CHANGELOG.md @@ -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 diff --git a/charts/selenium-grid/Chart.yaml b/charts/selenium-grid/Chart.yaml index dcc9e7a6a..78d2222d2 100644 --- a/charts/selenium-grid/Chart.yaml +++ b/charts/selenium-grid/Chart.yaml @@ -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: diff --git a/generate_chart_changelog.sh b/generate_chart_changelog.sh index 90d4675c9..aebe41acd 100755 --- a/generate_chart_changelog.sh +++ b/generate_chart_changelog.sh @@ -4,10 +4,11 @@ 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() { @@ -15,21 +16,21 @@ generate_changelog() { 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 @@ -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" diff --git a/tests/charts/umbrella-charts/Chart.yaml b/tests/charts/umbrella-charts/Chart.yaml index f4b51669e..7f655364c 100644 --- a/tests/charts/umbrella-charts/Chart.yaml +++ b/tests/charts/umbrella-charts/Chart.yaml @@ -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 diff --git a/update_tag_in_docs_and_files.sh b/update_tag_in_docs_and_files.sh index 745feb371..48fdd1233 100755 --- a/update_tag_in_docs_and_files.sh +++ b/update_tag_in_docs_and_files.sh @@ -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) @@ -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]++)) @@ -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