Skip to content

Make sure the rancher/rancher repo doesn't dirty webhook #1

Make sure the rancher/rancher repo doesn't dirty webhook

Make sure the rancher/rancher repo doesn't dirty webhook #1

Workflow file for this run

# Add a comment to force a change.
name: Webhook CI
on:
workflow_call:
push:
branches:
- release/v*
paths-ignore:
- '*.md'
- '.gitignore'
- 'CODEOWNERS'
- 'LICENSE'
pull_request:
paths-ignore:
- '*.md'
- '.gitignore'
- 'CODEOWNERS'
- 'LICENSE'
permissions:
contents: read
jobs:
build:
name: CI
runs-on : ubuntu-latest
strategy:
matrix:
include:
- platform: linux/amd64
# - platform: linux/arm64
steps:
- name : Checkout repository
uses : actions/checkout@v4
with :
fetch-depth : 0
- name : build
run : make build
- name : package for ci
run : make package-for-ci
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: webhook-build-artifacts
path: ./dist/artifacts
####TODO: reinstate this
#### - name : CI
#### run : make ci
#### name: webhook-build-artifacts-${{ matrix.os }}
test:
name : integration-test
needs : [
build
]
runs-on : ubuntu-latest
strategy:
matrix:
include:
- platform: linux/amd64
# - platform: linux/arm64
steps:
- name : Checkout repository
uses : actions/checkout@v4
with :
fetch-depth : 0
- name : Checkout rancher/rancher
uses : actions/checkout@v4
with :
fetch-depth : 0
repository: rancher/rancher
path: "${{ runner.temp}}/rancherDir"
ref: release/v2.9
- name : Build rancher v2.9 helm chart
run: |

Check failure on line 78 in .github/workflows/ci.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/ci.yaml

Invalid workflow file

You have an error in your yaml syntax on line 78
pushd "${{ runner.temp}}/rancherDir"
./scripts/chart/build chart
tar cfz ${{ runner.temp }}/rancher.tgz -C build/chart/rancher .
popd
- name : Fetch build artifacts
uses: actions/download-artifact@v4
with:
name: webhook-build-artifacts
#### reinstate
#### name: webhook-build-artifacts-${{ matrix.os }}
path: ./dist/artifacts
- name : Debug
run : ls -R ./dist/artifacts
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build image
uses: docker/build-push-action@v5.1.0
with:
context: .
tags: ghcr.io/rancher/webhook:${{ github.sha }}
load: true
push: false
file: package/Dockerfile
build-args: |
TAG=${{ github.sha }}
REPO=ghcr.io/rancher/webhook
COMMIT=${{ github.sha }}
- name : install K3d
run : ./.github/workflows/scripts/install-k3d.sh
- name : setup cluster
run : ./.github/workflows/scripts/setup-cluster.sh
env:
CLUSTER_NAME: webhook
K3S_VERSION: v1.28.9-k3s1
- name : start rancher
run : ./.github/workflows/scripts/start-rancher.sh
env:
VERSION: "2.9"
RANCHER_IMAGE_TAG: "v2.9.0-alpha2"
CHART_PATH: "${{ runner.temp }}/rancher.tgz "
- name : Run integration tests
run : ./.github/workflows/scripts/integration-test-ci
env:
CLUSTER_NAME: webhook
IMAGE_REPO: ghcr.io/rancher/webhook
IMAGE_TAG: "${{ github.sha }}"