Skip to content

Merge pull request #799 from yiannistri/fix-e2e-tests #1

Merge pull request #799 from yiannistri/fix-e2e-tests

Merge pull request #799 from yiannistri/fix-e2e-tests #1

Workflow file for this run

name: E2E test branch
on:
workflow_call:
secrets:
GKE_CREDENTIALS:
description: "GKE credentials"
GKE_PROJECT_ID:
description: "GKE project ID"
SLACK_WEBHOOK_URL:
description: "WebHook URL to use for Slack"
required: true
inputs:
branch:
type: string
default: "release-v2.9"
env:
GKE_CREDENTIALS: ${{ secrets.GKE_CREDENTIALS }}
GKE_PROJECT_ID: ${{ secrets.GKE_PROJECT_ID }}
jobs:
e2e-tests:
env:
BRANCH: ${{ inputs.branch }}
runs-on: ubuntu-latest
steps:

Check failure on line 26 in .github/workflows/e2e-branch.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/e2e-branch.yaml

Invalid workflow file

You have an error in your yaml syntax on line 26
- name: Checkout code
uses: actions/checkout@v4
with:
ref: |
${{ env.BRANCH }}
- name: Login to GHCR registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@6524bf65af31da8d45b59e8c27de4bd072b392f5 # v3.8.0
- name: Build and push image
env:
REPO: ghcr.io/rancher
run: |
make image-push
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.23.x
- uses: helm/kind-action@a1b0e391336a6ee6713a0583f8c6240d70863de3 # v1.12.0
with:
version: v0.23.0
install_only: true
- name: Create kind cluster
run: make setup-kind
- name: Set the value
run: |
GKE_PROJECT_ID="${{ env.GKE_PROJECT_ID }}"
echo "GKE_PROJECT_ID=${GKE_PROJECT_ID}" >> $GITHUB_ENV
- name: E2E tests
env:
GKE_CREDENTIALS: "${{ secrets.GKE_CREDENTIALS }}"
REPO: ghcr.io/rancher
run: make e2e-tests
- name: Archive artifacts
if: always()
uses: actions/[email protected]
with:
name: ci-artifacts-${{ env.BRANCH }}
path: _artifacts
if-no-files-found: ignore
- name: Send failed status to slack
if: failure() && github.event_name == 'schedule'
uses: slackapi/[email protected]
with:
payload: |
{
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "AKS Operator E2E test run failed."
},
"accessory": {
"type": "button",
"text": {
"type": "plain_text",
"text": ":github:",
"emoji": true
},
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
}
}
]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK