Skip to content

Commit

Permalink
build(chart): Chart built on top of Nightly images (#2089)
Browse files Browse the repository at this point in the history
build(chart): Chart built on top of Nightly images

Signed-off-by: Viet Nguyen Duc <[email protected]>
  • Loading branch information
VietND96 authored Jan 10, 2024
1 parent 61781f3 commit 4bc9bc3
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 5 deletions.
26 changes: 22 additions & 4 deletions .github/workflows/nightly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,21 +61,39 @@ jobs:
timeout_minutes: 20
max_attempts: 3
command: VERSION="${GRID_VERSION}" BUILD_DATE=${BUILD_DATE} make release_nightly
- name: Sets env var for the next tag
run: echo "NEXT_TAG=nightly" >> $GITHUB_ENV
- name: Get current latest tag
run: echo "LATEST_TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
run: echo "LATEST_TAG=$(git describe --tags --abbrev=0 --exclude=nightly --exclude=selenium-grid*)" >> $GITHUB_ENV
- name: Display latest tag
run: echo ${LATEST_TAG}
- name: Sets env var for nightly tag
run: |
echo "NEXT_TAG=nightly" >> $GITHUB_ENV
echo "FILTER_IMAGE_TAG=nightly" >> $GITHUB_ENV
- name: Create release notes (release_notes.md)
run: ./generate_release_notes.sh ${LATEST_TAG} origin/trunk ${GRID_VERSION} ${BUILD_DATE}

- name: Set up Python
uses: actions/[email protected]
with:
python-version: '3.11'
check-latest: true
- name: Update tag in docs and files
run: ./update_tag_in_docs_and_files.sh ${LATEST_TAG} ${NEXT_TAG}
- name: Setup environment to build chart
run: make chart_setup_env
- name: Build and lint charts
run: |
make chart_build_nightly
echo "CHART_PACKAGE_PATH=$(cat /tmp/selenium_chart_version)" >> $GITHUB_ENV
echo "CHART_FILE_NAME=$(basename $(cat /tmp/selenium_chart_version))" >> $GITHUB_ENV
- name: Create Nightly Release
id: create_release
uses: ncipollo/release-action@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
#artifacts:
artifacts: "${{ env.CHART_PACKAGE_PATH }}"
replacesArtifacts: true
bodyFile: "release_notes.md"
generateReleaseNotes: true
Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ BASE_RELEASE_NIGHTLY := $(or $(BASE_RELEASE_NIGHTLY),$(BASE_RELEASE_NIGHTLY),nig
BASE_VERSION_NIGHTLY := $(or $(BASE_VERSION_NIGHTLY),$(BASE_VERSION_NIGHTLY),4.17.0-SNAPSHOT)
VERSION := $(or $(VERSION),$(VERSION),$(BASE_VERSION))
TAG_VERSION := $(VERSION)-$(BUILD_DATE)
CHART_VERSION_NIGHTLY := $(or $(CHART_VERSION_NIGHTLY),$(CHART_VERSION_NIGHTLY),1.0.0-nightly)
NAMESPACE := $(or $(NAMESPACE),$(NAMESPACE),$(NAME))
AUTHORS := $(or $(AUTHORS),$(AUTHORS),SeleniumHQ)
PUSH_IMAGE := $(or $(PUSH_IMAGE),$(PUSH_IMAGE),false)
Expand Down Expand Up @@ -417,6 +418,9 @@ chart_cluster_setup:
chart_cluster_cleanup:
./tests/charts/make/chart_cluster_cleanup.sh

chart_build_nightly:
VERSION=$(CHART_VERSION_NIGHTLY) ./tests/charts/make/chart_build.sh

chart_build:
VERSION=$(TAG_VERSION) ./tests/charts/make/chart_build.sh

Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Talk to us at https://www.selenium.dev/support/

* [Quick start](#quick-start)
* [Experimental Mult-Arch aarch64/armhf/amd64 Images](#experimental-mult-arch-aarch64armhfamd64-images)
* [Nightly Images](#nightly-images)
* [Dev and Beta Channel Browser Images](#dev-and-beta-channel-browser-images)
+ [Dev and Beta Standalone Mode](#dev-and-beta-standalone-mode)
+ [Dev and Beta on the Grid](#dev-and-beta-on-the-grid)
Expand Down Expand Up @@ -106,6 +107,14 @@ in _this_ repository (SeleniumHQ/docker-selenium) instead of the experimental on

___

## Nightly Images

Nightly images are built on top of the [Nightly](https://github.com/SeleniumHQ/selenium/releases/tag/nightly) build on the upstream project [Selenium](https://github.com/SeleniumHQ/selenium) with the latest changes on main branch in this repository. The image tag is `nightly`. This is not recommended to use images in production. It is only for testing purpose.

```bash
$ docker run -d -p 4442-4444:4442-4444 --name selenium-hub selenium/hub:nightly
```

## Dev and Beta Channel Browser Images

To run tests or otherwise work with pre-release browsers, Google, Mozilla, and Microsoft maintain a Dev and Beta release channel for those who need to see what's soon to be released to the general population.
Expand Down
9 changes: 9 additions & 0 deletions charts/selenium-grid/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ This chart enables the creation of a Selenium Grid Server in Kubernetes.
* [Contents](#contents)
* [Introduction](#introduction)
* [Installing the chart](#installing-the-chart)
* [Installing the Nightly chart](#installing-the-nightly-chart)
* [Enable Selenium Grid Autoscaling](#enable-selenium-grid-autoscaling)
* [Settings common for both `job` and `deployment` scalingType](#settings-common-for-both-job-and-deployment-scalingtype)
* [Settings when scalingType with `deployment`](#settings-when-scalingtype-with-deployment-)
Expand Down Expand Up @@ -67,6 +68,14 @@ helm install selenium-grid --set ingress.hostname=selenium-grid.k8s.local docker
# Notes: In case you want to set hostname is selenium-grid.local. You need to add the IP and hostname to the local host file in `/etc/hosts`
```

### Installing the Nightly chart

Nightly chart is built from the latest main branch of this repository with using Nightly images. It is not recommended to use this chart in production. It is only for testing purpose. The procedure to install the Nightly chart is the same as the above, only different on the version, it is `1.0.0-nightly`

```bash
helm install selenium-grid docker-selenium/selenium-grid --version 1.0.0-nightly
```

## Enable Selenium Grid Autoscaling

Selenium Grid has the ability to autoscaling browser nodes up/down based on the pending requests in the
Expand Down
2 changes: 1 addition & 1 deletion generate_release_notes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ echo "<details>" >> release_notes.md
echo "<summary>Click to see published Docker images</summary>" >> release_notes.md
echo "" >> release_notes.md
echo '```' >> release_notes.md
docker images --filter=reference=${NAMESPACE}'/*:*' --format "table {{.ID}}\t{{.Repository}}\t{{.Tag}}\t{{.Size}}" >> release_notes.md
docker images --filter=reference=${NAMESPACE}'/*:'${FILTER_IMAGE_TAG:-"*"} --format "table {{.ID}}\t{{.Repository}}\t{{.Tag}}\t{{.Size}}" >> release_notes.md
echo '```' >> release_notes.md
echo "" >> release_notes.md
echo "</details>" >> release_notes.md
Expand Down

0 comments on commit 4bc9bc3

Please sign in to comment.