Skip to content

PANDARIA: Merge tag 'v0.8.6' into release/v0.8-ent #115

PANDARIA: Merge tag 'v0.8.6' into release/v0.8-ent

PANDARIA: Merge tag 'v0.8.6' into release/v0.8-ent #115

Workflow file for this run

# Add a comment to force a change.
name: Webhook CI
on:
push:
branches:
- release/v*
paths-ignore:
- '.gitignore'
- 'CODEOWNERS'
- 'LICENSE'
pull_request:
paths-ignore:
- '.gitignore'
- 'CODEOWNERS'
- 'LICENSE'
workflow_dispatch:
permissions:
contents: read
env:
OAUTH_TOKEN: ${{ secrets.RD_ONLY_GH_TOKEN }}
jobs:
build:
name: CI
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- ubuntu-24.04-arm
runs-on: ${{ matrix.os }}
steps:
- name : Checkout repository
# https://github.com/actions/checkout/releases/tag/v4.1.1
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
- name: Set arch variable
shell: bash
run: |
case "${{ runner.arch }}" in
"X64" )
echo "ARCH=amd64" >> $GITHUB_ENV
;;
"ARM64" )
echo "ARCH=arm64" >> $GITHUB_ENV
;;
esac
- name: Install dependencies
shell: bash
run: |
curl -sL https://get.helm.sh/helm-v3.13.3-linux-${ARCH}.tar.gz | sudo tar xvzf - -C /usr/local/bin --strip-components=1
curl -sL https://dl.k8s.io/v1.28.11/kubernetes-client-linux-${ARCH}.tar.gz | sudo tar xvzf - -C /usr/local/bin --strip-components=3
# TODO: Pull this next one out once there's a helm-release for rancher 2.9
- name: Checkout rancher/rancher and build the chart
run: |
mkdir -p "${{ runner.temp}}"
pushd "${{ runner.temp}}"
git clone --depth 1 -b release/v2.12 https://github.com/rancher/rancher.git rancherDir
cd rancherDir
./scripts/chart/build chart
tar cfz "${{ runner.temp }}/rancher.tgz" -C build/chart/rancher .
popd
- name: Build, Test, and Package
run: make ci
- name: install K3d
run: |
./.github/workflows/scripts/install-k3d.sh
sudo mv ./bin/k3d /usr/local/bin/k3d
- name: setup cluster
run: ./.github/workflows/scripts/setup-cluster.sh
env:
CLUSTER_NAME: webhook
K3S_VERSION: v1.28.9-k3s1
ARCH: "${ARCH}"
- name: import image
run: k3d image import dist/rancher-webhook-image.tar -c webhook
- name: start rancher
run: ./.github/workflows/scripts/start-rancher.sh
env:
CHART_PATH: "${{ runner.temp }}/rancher.tgz"
RANCHER_IMAGE_TAG: "v2.12-head"
VERSION: "release/v2.12"
- name: get vars
run: cat dist/image_tag >> $GITHUB_ENV
- name: Run integration tests
run: ./.github/workflows/scripts/integration-test-ci
env:
ARCH: "${ARCH}"
CLUSTER_NAME: webhook
IMAGE_REPO: cnrancher/webhook
IMAGE_TAG: "${{ env.IMAGE_TAG }}"