-
Notifications
You must be signed in to change notification settings - Fork 176
116 lines (110 loc) · 4.13 KB
/
e2e-kbcli.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
name: E2E Test KBCLI
on:
workflow_dispatch:
inputs:
VERSION:
description: 'kubeblocks release version'
required: true
default: ''
PRE_VERSION:
description: 'kubeblocks previous version of upgrade'
required: false
default: ''
TEST_TYPE:
description: 'test type (e.g. apecloud-mysql|postgresql|redis|mongodb|kafka|pulsar|mysqlscale|weaviate|qdrant|smartengine|
greptimedb|nebula|risingwave|starrocks|etcd|oceanbase|foxlake|orioledb|oracle-mysql|official-pg|asmysql|openldap|
polardbx|opensearch|elasticsearch|vllm|tdengine|milvus|clickhouse|pika|ggml|zookeeper|mariadb|tidb|xinference|
oracle|opengauss|influxdb|flink|solr|doris|halo|mogdb|oceanbase-ent|starrocks-ent|yashandb|redis-cluster|camellia-redis-proxy|dmdb|minio)'
required: false
default: ''
CLOUD_PROVIDER:
description: 'cloud provider'
required: true
default: 'eks'
type: choice
options:
- eks
- vke
- gke
- aks
- aks-cn
CLUSTER_VERSION:
description: 'k8s cluster version'
required: false
default: '1.28'
type: choice
options:
- 1.30
- 1.29
- 1.28
- 1.27
- 1.26
- 1.25
- 1.24
INSTANCE_TYPE:
description: 'node instance types (e.g. amd64/arm64)'
required: false
default: 'amd64'
type: choice
options:
- amd64
- arm64
BRANCH_NAME:
description: 'testinfra branch name'
required: false
default: 'main'
ARGS:
description: 'kbcli test args'
required: false
default: ''
run-name: kbcli:${{ inputs.PRE_VERSION }} to ${{ inputs.VERSION }} ${{ inputs.CLOUD_PROVIDER }}:${{ inputs.CLUSTER_VERSION }}:${{ inputs.INSTANCE_TYPE }} ${{ inputs.TEST_TYPE }}
env:
GH_TOKEN: ${{ github.token }}
jobs:
check:
runs-on: ubuntu-latest
outputs:
release-version: ${{ steps.get_release_version.outputs.release-version }}
cluster-region: ${{ steps.get_release_version.outputs.cluster-region }}
steps:
- uses: actions/checkout@v4
- name: check release version
id: get_release_version
run: |
RELEASE_VERSION=`bash .github/utils/utils.sh --type 18 \
--tag-name "${{ inputs.VERSION }}"`
if [[ -z "$RELEASE_VERSION" ]]; then
echo "release version ${{ inputs.VERSION }} not exists"
exit 1
else
echo $RELEASE_VERSION
echo release-version=$RELEASE_VERSION >> $GITHUB_OUTPUT
fi
CLUSTER_REGION=""
if [[ "${{ inputs.CLOUD_PROVIDER }}" == 'eks' && -z "$CLUSTER_REGION" ]]; then
CLUSTER_REGION="${{ vars.REGION_AWS_EKS }}"
elif [[ "${{ inputs.CLOUD_PROVIDER }}" == 'vke' && -z "$CLUSTER_REGION" ]]; then
CLUSTER_REGION="${{ vars.REGION_VOLCENGINE_VKE }}"
elif [[ "${{ inputs.CLOUD_PROVIDER }}" == 'gke' && -z "$CLUSTER_REGION" ]]; then
CLUSTER_REGION="${{ vars.REGION_GCP_GKE }}"
elif [[ "${{ inputs.CLOUD_PROVIDER }}" == 'aks' && -z "$CLUSTER_REGION" ]]; then
CLUSTER_REGION="${{ vars.REGION_AZURE_AKS }}"
elif [[ "${{ inputs.CLOUD_PROVIDER }}" == 'aks-cn' && -z "$CLUSTER_REGION" ]]; then
CLUSTER_REGION="${{ vars.REGION_AZURE_CN_AKS }}"
fi
echo cluster-region=$CLUSTER_REGION >> $GITHUB_OUTPUT
e2e:
name: ${{ inputs.CLOUD_PROVIDER }}
needs: check
uses: apecloud/apecloud-cd/.github/workflows/kbcli-test-k8s.yml@main
with:
CLOUD_PROVIDER: "${{ inputs.CLOUD_PROVIDER }}"
KB_VERSION: "${{ needs.check.outputs.release-version }}"
KB_PRE_VERSION: "${{ inputs.PRE_VERSION }}"
CLUSTER_VERSION: "${{ inputs.CLUSTER_VERSION }}"
INSTANCE_TYPE: "${{ inputs.INSTANCE_TYPE }}"
REGION: "${{ needs.check.outputs.cluster-region }}"
BRANCH_NAME: "${{ inputs.BRANCH_NAME }}"
ARGS: "${{ inputs.ARGS }}"
TEST_TYPE: "${{ inputs.TEST_TYPE }}"
secrets: inherit