update(chart): Node preStop and startupProbe in autoscaling Deployment #251
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test Helm Charts | |
concurrency: | |
group: ${{ github.workflow }} | |
on: | |
push: | |
paths-ignore: | |
- '**.md' | |
pull_request: | |
paths-ignore: | |
- '**.md' | |
workflow_dispatch: | |
inputs: | |
request-timeout: | |
description: 'Test parameter for different request timeout' | |
required: false | |
default: '370' | |
cluster: | |
description: 'Cluster type to test (kind, minikube)' | |
required: false | |
schedule: | |
- cron: '0 0 * * *' | |
permissions: | |
contents: read | |
jobs: | |
build-and-test: | |
name: Build & test | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
test-strategy: | |
- job | |
- job_https | |
- deployment | |
- deployment_https | |
env: | |
CLUSTER: ${{ github.event.inputs.cluster || 'minikube' }} | |
steps: | |
- uses: actions/checkout@main | |
- name: Output Docker info | |
run: docker info | |
- name: Set up Python | |
uses: actions/setup-python@main | |
with: | |
python-version: '3.11' | |
check-latest: true | |
- name: Get branch name (only for push to branch) | |
if: github.event_name == 'push' | |
run: echo "BRANCH=$(echo ${PUSH_BRANCH##*/})" >> $GITHUB_ENV | |
env: | |
PUSH_BRANCH: ${{ github.ref }} | |
- name: Get target branch name (only for PRs) | |
if: github.event_name == 'pull_request' | |
run: echo "BRANCH=$(echo ${TARGET_BRANCH##*/})" >> $GITHUB_ENV | |
env: | |
TARGET_BRANCH: ${{ github.head_ref }} | |
- name: Output branch name | |
run: echo ${BRANCH} | |
- name: Sets build date | |
run: | | |
echo "BUILD_DATE=$(date '+%Y%m%d')" >> $GITHUB_ENV | |
echo "IMAGE_REGISTRY=artifactory/selenium" >> $GITHUB_ENV | |
- name: Setup Kubernetes environment | |
uses: nick-invision/retry@master | |
with: | |
timeout_minutes: 10 | |
max_attempts: 3 | |
command: CLUSTER=${CLUSTER} make chart_setup_env | |
- name: Build Helm charts | |
run: | | |
BUILD_DATE=${BUILD_DATE} make chart_build | |
echo "CHART_PACKAGE_PATH=$(cat /tmp/selenium_chart_version)" >> $GITHUB_ENV | |
echo "CHART_FILE_NAME=$(basename $(cat /tmp/selenium_chart_version))" >> $GITHUB_ENV | |
- name: Test chart template | |
run: NAME=${IMAGE_REGISTRY} VERSION=${BRANCH} BUILD_DATE=${BUILD_DATE} make chart_test_template | |
- name: Setup Kubernetes cluster | |
uses: nick-invision/retry@master | |
with: | |
timeout_minutes: 10 | |
max_attempts: 3 | |
command: CLUSTER=${CLUSTER} NAME=${IMAGE_REGISTRY} VERSION=${BRANCH} BUILD_DATE=${BUILD_DATE} make chart_cluster_setup | |
- name: Build Docker images | |
run: NAME=${IMAGE_REGISTRY} VERSION=${BRANCH} BUILD_DATE=${BUILD_DATE} make build | |
- name: Test set custom CA certificate | |
run: NAME=${IMAGE_REGISTRY} VERSION=${BRANCH} BUILD_DATE=${BUILD_DATE} make test_custom_ca_cert | |
- name: Set test parameters | |
if: (matrix.test-strategy == 'job' || matrix.test-strategy == 'deployment') && (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') | |
run: | | |
echo "AUTOSCALING_POLL_INTERVAL=${AUTOSCALING_POLL_INTERVAL}" >> $GITHUB_ENV | |
env: | |
AUTOSCALING_POLL_INTERVAL: ${{ github.event.inputs.request-timeout || '370' }} | |
- name: Test Selenium Grid on Kubernetes (Autoscaling ${{ matrix.test-strategy }}) | |
uses: nick-invision/retry@master | |
with: | |
timeout_minutes: 30 | |
max_attempts: 3 | |
command: | | |
NAME=${IMAGE_REGISTRY} VERSION=${BRANCH} BUILD_DATE=${BUILD_DATE} make chart_test_autoscaling_${{ matrix.test-strategy }} | |
- name: Cleanup Kubernetes cluster | |
if: always() | |
run: CLUSTER=${CLUSTER} make chart_cluster_cleanup | |
- name: Upload Helm chart package | |
if: always() | |
uses: actions/upload-artifact@main | |
with: | |
name: ${{ matrix.test-strategy }}_${{ env.CHART_FILE_NAME }} | |
path: ${{ env.CHART_PACKAGE_PATH }} | |
- name: Upload chart test artifacts | |
if: always() | |
uses: actions/upload-artifact@main | |
with: | |
name: ${{ matrix.test-strategy }}-artifacts | |
path: ./tests/tests/ | |
if-no-files-found: ignore |