Skip to content

ApeCloud:v0.4.0-alpha.8 K3S:1.26 #8

ApeCloud:v0.4.0-alpha.8 K3S:1.26

ApeCloud:v0.4.0-alpha.8 K3S:1.26 #8

name: Cloud E2E Test on Amd K3S
on:
workflow_call:
inputs:
APECLOUD_VERSION:
description: 'ApeCloud release version'
type: string
required: false
default: 'v0.3.5'
KUBEBLOCKS_VERSION:
description: 'kubeblocks release version'
type: string
required: false
default: 'latest'
K3S_VERSION:
description: 'k8s cluster version (e.g. 1.26)'
type: string
required: false
default: '1.26'
TESTINFRA_BRANCH:
description: 'testinfra branch name'
type: string
required: false
default: 'main'
E2ETEST_BRANCH:
description: 'e2etest branch name'
type: string
required: false
default: 'main'
APECD_REF:
description: "The branch name of apecloud-cd"
type: string
required: false
default: 'main'
ARGS:
description: "Test args"
type: string
required: false
default: ''
workflow_dispatch:
inputs:
APECLOUD_VERSION:
description: 'ApeCloud release version'
type: string
required: false
default: 'v0.3.5'
KUBEBLOCKS_VERSION:
description: 'kubeblocks release version'
type: string
required: false
default: 'latest'
K3S_VERSION:
description: 'k8s cluster version (e.g. 1.26)'
type: string
required: false
default: '1.26'
TESTINFRA_BRANCH:
description: 'testinfra branch name'
type: string
required: false
default: 'main'
E2ETEST_BRANCH:
description: 'e2etest branch name'
type: string
required: false
default: 'main'
APECD_REF:
description: "The branch name of apecloud-cd"
type: string
required: false
default: 'main'
ARGS:
description: "Test args"
type: string
required: false
default: ''
run-name: ApeCloud:${{ inputs.APECLOUD_VERSION }} K3S:${{ inputs.K3S_VERSION }}
env:
GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
permissions:
id-token: write
contents: read
jobs:
enable-gke-runner:
uses: ./.github/workflows/enable-gke-runner.yml
with:
GITHUB_REPO: "${{ github.repository }}"
RUNNER_NAMESPACE: "default"
RUNNER_LABEL: "k3d-runner"
secrets: inherit
e2e-test:
needs: [ enable-gke-runner ]
uses: ./.github/workflows/test-cloud-k3s-amd.yml
with:
release-version: ${{ inputs.APECLOUD_VERSION }}
kubeblocks-version: ${{ inputs.KUBEBLOCKS_VERSION }}
test-type: "0"
test-type-name: "e2e-test"
test-args: ${{ inputs.ARGS }}
k3s-version: ${{ inputs.K3S_VERSION }}
testinfra-branch: ${{ inputs.TESTINFRA_BRANCH }}
e2etest-branch: ${{ inputs.E2ETEST_BRANCH }}
secrets: inherit
# send-message:
# if: ${{ always() }}
# runs-on: ubuntu-latest
# needs: [ e2e-test ]
# steps:
# - uses: actions/checkout@v4
# with:
# repository: apecloud/apecloud-cd
# path: ./
# ref: ${{ inputs.APECD_REF }}
#
# - name: send message
# id: get_trigger_mode
# run: |
# TEST_RESULT="deploy-cloud|${{ needs.e2e-test.outputs.deploy-result }}"
# TEST_RESULT="${TEST_RESULT}##e2e-test|${{ needs.e2e-test.outputs.test-result }}"
#
# TEST_RESULT=$( bash .github/utils/utils.sh --type 12 \
# --github-repo "${{ github.repository }}" \
# --github-token "${{ env.GITHUB_TOKEN }}" \
# --test-result "${TEST_RESULT}" \
# --run-id "$GITHUB_RUN_ID" )
#
# date_ret=$(date +%Y-%m-%d-%T)
# test_title="[${{ inputs.APECLOUD_VERSION }}] Test ApeCloud on K3S:${{ inputs.K3S_VERSION }} [${date_ret}]"
# python3 .github/utils/send_mesage.py \
# --url ${{ vars.TEST_BOT_WEBHOOK }} \
# --title "$test_title" \
# --result "$TEST_RESULT"
# disable-gke-runner:
# if: ${{ always() }}
# needs: [ enable-gke-runner, send-message ]
# uses: ./.github/workflows/enable-gke-runner.yml
# with:
# GITHUB_REPO: "${{ github.repository }}"
# RUNNER_NAMESPACE: "default"
# RUNNER_LABEL: "k3d-runner"
# ENABLE: "disable"
# secrets: inherit