Skip to content

Commit

Permalink
[ci] Add option to choose edition on e2e tests
Browse files Browse the repository at this point in the history
Signed-off-by: Vladimir Portnov <[email protected]>
  • Loading branch information
Taior committed Sep 18, 2024
1 parent fa2624d commit 54eccdc
Show file tree
Hide file tree
Showing 22 changed files with 80 additions and 11 deletions.
1 change: 1 addition & 0 deletions .github/ci_templates/e2e_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -636,6 +636,7 @@ check_e2e_labels:
KUBERNETES_VERSION: "{!{ $ctx.kubernetesVersion }!}"
{!{- end }!}
EVENT_LABEL: ${{ github.event.label.name }}
WERF_ENV: "${{ fromJson(inputs.test_config).edition || 'FE'}}"
runs-on: [self-hosted, {!{ $runsOnLabel }!}]
steps:
{!{ tmpl.Exec "started_at_output" . | strings.Indent 4 }!}
Expand Down
9 changes: 8 additions & 1 deletion .github/scripts/js/ci.js
Original file line number Diff line number Diff line change
Expand Up @@ -711,6 +711,7 @@ const detectSlashCommand = ({ comment , context, core}) => {
if (workflow_id) {
let ver = [];
let cri = [];
let edition = "fe";
for (const line of lines) {
let useParts = line.split('/e2e/use/cri/');
if (useParts[1]) {
Expand All @@ -720,10 +721,14 @@ const detectSlashCommand = ({ comment , context, core}) => {
if (useParts[1]) {
ver.push(useParts[1]);
}
useParts = line.split('/e2e/use/edition/');
if (useParts[1]) {
edition = useParts[1]
}
}

inputs = {
test_config: JSON.stringify({ cri: cri.join(','), ver: ver.join(','), editions: "FE" }),
test_config: JSON.stringify({ cri: cri.join(','), ver: ver.join(','), edition: edition }),
}

// Add initial_ref_slug input when e2e command has two args.
Expand Down Expand Up @@ -1199,6 +1204,8 @@ You can trigger release related actions by commenting on this issue:
- \`git_ref_2\` is a release-* or main branch
- \`/e2e/use/k8s/<version>\` specifies which Kubernetes version to use for e2e test.
- \`version\` is one of \`${availableKubernetesVersions}\`
- \`/e2e/use/edition/<edition>\` specifies which edition to use for e2e test.
- \`edition\` is one of \`${availableEditions}\`
- \`/build git_ref\` will run build for release related refs.
- \`git_ref\` is ${possibleGitRefs}
Expand Down
7 changes: 7 additions & 0 deletions .github/scripts/js/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,13 @@ const labels = {
'e2e/use/k8s/1.30': { type: 'e2e-use', ver: '1.30' },
'e2e/use/k8s/automatic': { type: 'e2e-use', ver: 'Automatic' },

// E2E: edition
'e2e/use/edition/ce': { type: 'e2e-edition', edition: 'CE' },
'e2e/use/edition/ee': { type: 'e2e-edition', edition: 'EE' },
'e2e/use/edition/be': { type: 'e2e-edition', edition: 'BE' },
'e2e/use/edition/se': { type: 'e2e-edition', edition: 'SE' },
'e2e/use/edition/fe': { type: 'e2e-edition', edition: 'FE' },

// Allow running workflows for external PRs.
'status/ok-to-test': { type: 'ok-to-test' },

Expand Down
2 changes: 1 addition & 1 deletion .github/workflow_templates/e2e.multi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ on:
test_config:
description: 'JSON string of parameters of current test'
required: false
default: '{"cri":"Containerd","ver":"1.27","editions":"FE"}'
default: '{"cri":"Containerd","ver":"1.27","edition":"FE"}'
initial_ref_slug:
description: 'An image tag to install first and then switch to workflow context ref'
required: false
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/e2e-abort-aws.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ jobs:
LAYOUT: WithoutNAT
KUBERNETES_VERSION: "1.26"
EVENT_LABEL: ${{ github.event.label.name }}
WERF_ENV: "${{ fromJson(inputs.test_config).edition || 'FE'}}"
runs-on: [self-hosted, e2e-common]
steps:

Expand Down Expand Up @@ -360,6 +361,7 @@ jobs:
LAYOUT: WithoutNAT
KUBERNETES_VERSION: "1.27"
EVENT_LABEL: ${{ github.event.label.name }}
WERF_ENV: "${{ fromJson(inputs.test_config).edition || 'FE'}}"
runs-on: [self-hosted, e2e-common]
steps:

Expand Down Expand Up @@ -638,6 +640,7 @@ jobs:
LAYOUT: WithoutNAT
KUBERNETES_VERSION: "1.28"
EVENT_LABEL: ${{ github.event.label.name }}
WERF_ENV: "${{ fromJson(inputs.test_config).edition || 'FE'}}"
runs-on: [self-hosted, e2e-common]
steps:

Expand Down Expand Up @@ -916,6 +919,7 @@ jobs:
LAYOUT: WithoutNAT
KUBERNETES_VERSION: "1.29"
EVENT_LABEL: ${{ github.event.label.name }}
WERF_ENV: "${{ fromJson(inputs.test_config).edition || 'FE'}}"
runs-on: [self-hosted, e2e-common]
steps:

Expand Down Expand Up @@ -1194,6 +1198,7 @@ jobs:
LAYOUT: WithoutNAT
KUBERNETES_VERSION: "1.30"
EVENT_LABEL: ${{ github.event.label.name }}
WERF_ENV: "${{ fromJson(inputs.test_config).edition || 'FE'}}"
runs-on: [self-hosted, e2e-common]
steps:

Expand Down Expand Up @@ -1472,6 +1477,7 @@ jobs:
LAYOUT: WithoutNAT
KUBERNETES_VERSION: "Automatic"
EVENT_LABEL: ${{ github.event.label.name }}
WERF_ENV: "${{ fromJson(inputs.test_config).edition || 'FE'}}"
runs-on: [self-hosted, e2e-common]
steps:

Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/e2e-abort-azure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ jobs:
LAYOUT: Standard
KUBERNETES_VERSION: "1.26"
EVENT_LABEL: ${{ github.event.label.name }}
WERF_ENV: "${{ fromJson(inputs.test_config).edition || 'FE'}}"
runs-on: [self-hosted, e2e-common]
steps:

Expand Down Expand Up @@ -364,6 +365,7 @@ jobs:
LAYOUT: Standard
KUBERNETES_VERSION: "1.27"
EVENT_LABEL: ${{ github.event.label.name }}
WERF_ENV: "${{ fromJson(inputs.test_config).edition || 'FE'}}"
runs-on: [self-hosted, e2e-common]
steps:

Expand Down Expand Up @@ -646,6 +648,7 @@ jobs:
LAYOUT: Standard
KUBERNETES_VERSION: "1.28"
EVENT_LABEL: ${{ github.event.label.name }}
WERF_ENV: "${{ fromJson(inputs.test_config).edition || 'FE'}}"
runs-on: [self-hosted, e2e-common]
steps:

Expand Down Expand Up @@ -928,6 +931,7 @@ jobs:
LAYOUT: Standard
KUBERNETES_VERSION: "1.29"
EVENT_LABEL: ${{ github.event.label.name }}
WERF_ENV: "${{ fromJson(inputs.test_config).edition || 'FE'}}"
runs-on: [self-hosted, e2e-common]
steps:

Expand Down Expand Up @@ -1210,6 +1214,7 @@ jobs:
LAYOUT: Standard
KUBERNETES_VERSION: "1.30"
EVENT_LABEL: ${{ github.event.label.name }}
WERF_ENV: "${{ fromJson(inputs.test_config).edition || 'FE'}}"
runs-on: [self-hosted, e2e-common]
steps:

Expand Down Expand Up @@ -1492,6 +1497,7 @@ jobs:
LAYOUT: Standard
KUBERNETES_VERSION: "Automatic"
EVENT_LABEL: ${{ github.event.label.name }}
WERF_ENV: "${{ fromJson(inputs.test_config).edition || 'FE'}}"
runs-on: [self-hosted, e2e-common]
steps:

Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/e2e-abort-eks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ jobs:
LAYOUT: WithoutNAT
KUBERNETES_VERSION: "1.26"
EVENT_LABEL: ${{ github.event.label.name }}
WERF_ENV: "${{ fromJson(inputs.test_config).edition || 'FE'}}"
runs-on: [self-hosted, e2e-common]
steps:

Expand Down Expand Up @@ -363,6 +364,7 @@ jobs:
LAYOUT: WithoutNAT
KUBERNETES_VERSION: "1.27"
EVENT_LABEL: ${{ github.event.label.name }}
WERF_ENV: "${{ fromJson(inputs.test_config).edition || 'FE'}}"
runs-on: [self-hosted, e2e-common]
steps:

Expand Down Expand Up @@ -644,6 +646,7 @@ jobs:
LAYOUT: WithoutNAT
KUBERNETES_VERSION: "1.28"
EVENT_LABEL: ${{ github.event.label.name }}
WERF_ENV: "${{ fromJson(inputs.test_config).edition || 'FE'}}"
runs-on: [self-hosted, e2e-common]
steps:

Expand Down Expand Up @@ -925,6 +928,7 @@ jobs:
LAYOUT: WithoutNAT
KUBERNETES_VERSION: "1.29"
EVENT_LABEL: ${{ github.event.label.name }}
WERF_ENV: "${{ fromJson(inputs.test_config).edition || 'FE'}}"
runs-on: [self-hosted, e2e-common]
steps:

Expand Down Expand Up @@ -1206,6 +1210,7 @@ jobs:
LAYOUT: WithoutNAT
KUBERNETES_VERSION: "1.30"
EVENT_LABEL: ${{ github.event.label.name }}
WERF_ENV: "${{ fromJson(inputs.test_config).edition || 'FE'}}"
runs-on: [self-hosted, e2e-common]
steps:

Expand Down Expand Up @@ -1487,6 +1492,7 @@ jobs:
LAYOUT: WithoutNAT
KUBERNETES_VERSION: "1.27"
EVENT_LABEL: ${{ github.event.label.name }}
WERF_ENV: "${{ fromJson(inputs.test_config).edition || 'FE'}}"
runs-on: [self-hosted, e2e-common]
steps:

Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/e2e-abort-gcp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ jobs:
LAYOUT: WithoutNAT
KUBERNETES_VERSION: "1.26"
EVENT_LABEL: ${{ github.event.label.name }}
WERF_ENV: "${{ fromJson(inputs.test_config).edition || 'FE'}}"
runs-on: [self-hosted, e2e-common]
steps:

Expand Down Expand Up @@ -358,6 +359,7 @@ jobs:
LAYOUT: WithoutNAT
KUBERNETES_VERSION: "1.27"
EVENT_LABEL: ${{ github.event.label.name }}
WERF_ENV: "${{ fromJson(inputs.test_config).edition || 'FE'}}"
runs-on: [self-hosted, e2e-common]
steps:

Expand Down Expand Up @@ -634,6 +636,7 @@ jobs:
LAYOUT: WithoutNAT
KUBERNETES_VERSION: "1.28"
EVENT_LABEL: ${{ github.event.label.name }}
WERF_ENV: "${{ fromJson(inputs.test_config).edition || 'FE'}}"
runs-on: [self-hosted, e2e-common]
steps:

Expand Down Expand Up @@ -910,6 +913,7 @@ jobs:
LAYOUT: WithoutNAT
KUBERNETES_VERSION: "1.29"
EVENT_LABEL: ${{ github.event.label.name }}
WERF_ENV: "${{ fromJson(inputs.test_config).edition || 'FE'}}"
runs-on: [self-hosted, e2e-common]
steps:

Expand Down Expand Up @@ -1186,6 +1190,7 @@ jobs:
LAYOUT: WithoutNAT
KUBERNETES_VERSION: "1.30"
EVENT_LABEL: ${{ github.event.label.name }}
WERF_ENV: "${{ fromJson(inputs.test_config).edition || 'FE'}}"
runs-on: [self-hosted, e2e-common]
steps:

Expand Down Expand Up @@ -1462,6 +1467,7 @@ jobs:
LAYOUT: WithoutNAT
KUBERNETES_VERSION: "Automatic"
EVENT_LABEL: ${{ github.event.label.name }}
WERF_ENV: "${{ fromJson(inputs.test_config).edition || 'FE'}}"
runs-on: [self-hosted, e2e-common]
steps:

Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/e2e-abort-openstack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ jobs:
LAYOUT: Standard
KUBERNETES_VERSION: "1.26"
EVENT_LABEL: ${{ github.event.label.name }}
WERF_ENV: "${{ fromJson(inputs.test_config).edition || 'FE'}}"
runs-on: [self-hosted, e2e-common]
steps:

Expand Down Expand Up @@ -358,6 +359,7 @@ jobs:
LAYOUT: Standard
KUBERNETES_VERSION: "1.27"
EVENT_LABEL: ${{ github.event.label.name }}
WERF_ENV: "${{ fromJson(inputs.test_config).edition || 'FE'}}"
runs-on: [self-hosted, e2e-common]
steps:

Expand Down Expand Up @@ -634,6 +636,7 @@ jobs:
LAYOUT: Standard
KUBERNETES_VERSION: "1.28"
EVENT_LABEL: ${{ github.event.label.name }}
WERF_ENV: "${{ fromJson(inputs.test_config).edition || 'FE'}}"
runs-on: [self-hosted, e2e-common]
steps:

Expand Down Expand Up @@ -910,6 +913,7 @@ jobs:
LAYOUT: Standard
KUBERNETES_VERSION: "1.29"
EVENT_LABEL: ${{ github.event.label.name }}
WERF_ENV: "${{ fromJson(inputs.test_config).edition || 'FE'}}"
runs-on: [self-hosted, e2e-common]
steps:

Expand Down Expand Up @@ -1186,6 +1190,7 @@ jobs:
LAYOUT: Standard
KUBERNETES_VERSION: "1.30"
EVENT_LABEL: ${{ github.event.label.name }}
WERF_ENV: "${{ fromJson(inputs.test_config).edition || 'FE'}}"
runs-on: [self-hosted, e2e-common]
steps:

Expand Down Expand Up @@ -1462,6 +1467,7 @@ jobs:
LAYOUT: Standard
KUBERNETES_VERSION: "Automatic"
EVENT_LABEL: ${{ github.event.label.name }}
WERF_ENV: "${{ fromJson(inputs.test_config).edition || 'FE'}}"
runs-on: [self-hosted, e2e-common]
steps:

Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/e2e-abort-static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ jobs:
LAYOUT: Static
KUBERNETES_VERSION: "1.26"
EVENT_LABEL: ${{ github.event.label.name }}
WERF_ENV: "${{ fromJson(inputs.test_config).edition || 'FE'}}"
runs-on: [self-hosted, e2e-common]
steps:

Expand Down Expand Up @@ -358,6 +359,7 @@ jobs:
LAYOUT: Static
KUBERNETES_VERSION: "1.27"
EVENT_LABEL: ${{ github.event.label.name }}
WERF_ENV: "${{ fromJson(inputs.test_config).edition || 'FE'}}"
runs-on: [self-hosted, e2e-common]
steps:

Expand Down Expand Up @@ -634,6 +636,7 @@ jobs:
LAYOUT: Static
KUBERNETES_VERSION: "1.28"
EVENT_LABEL: ${{ github.event.label.name }}
WERF_ENV: "${{ fromJson(inputs.test_config).edition || 'FE'}}"
runs-on: [self-hosted, e2e-common]
steps:

Expand Down Expand Up @@ -910,6 +913,7 @@ jobs:
LAYOUT: Static
KUBERNETES_VERSION: "1.29"
EVENT_LABEL: ${{ github.event.label.name }}
WERF_ENV: "${{ fromJson(inputs.test_config).edition || 'FE'}}"
runs-on: [self-hosted, e2e-common]
steps:

Expand Down Expand Up @@ -1186,6 +1190,7 @@ jobs:
LAYOUT: Static
KUBERNETES_VERSION: "1.30"
EVENT_LABEL: ${{ github.event.label.name }}
WERF_ENV: "${{ fromJson(inputs.test_config).edition || 'FE'}}"
runs-on: [self-hosted, e2e-common]
steps:

Expand Down Expand Up @@ -1462,6 +1467,7 @@ jobs:
LAYOUT: Static
KUBERNETES_VERSION: "Automatic"
EVENT_LABEL: ${{ github.event.label.name }}
WERF_ENV: "${{ fromJson(inputs.test_config).edition || 'FE'}}"
runs-on: [self-hosted, e2e-common]
steps:

Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/e2e-abort-vcd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ jobs:
LAYOUT: Standard
KUBERNETES_VERSION: "1.26"
EVENT_LABEL: ${{ github.event.label.name }}
WERF_ENV: "${{ fromJson(inputs.test_config).edition || 'FE'}}"
runs-on: [self-hosted, e2e-common]
steps:

Expand Down Expand Up @@ -366,6 +367,7 @@ jobs:
LAYOUT: Standard
KUBERNETES_VERSION: "1.27"
EVENT_LABEL: ${{ github.event.label.name }}
WERF_ENV: "${{ fromJson(inputs.test_config).edition || 'FE'}}"
runs-on: [self-hosted, e2e-common]
steps:

Expand Down Expand Up @@ -650,6 +652,7 @@ jobs:
LAYOUT: Standard
KUBERNETES_VERSION: "1.28"
EVENT_LABEL: ${{ github.event.label.name }}
WERF_ENV: "${{ fromJson(inputs.test_config).edition || 'FE'}}"
runs-on: [self-hosted, e2e-common]
steps:

Expand Down Expand Up @@ -934,6 +937,7 @@ jobs:
LAYOUT: Standard
KUBERNETES_VERSION: "1.29"
EVENT_LABEL: ${{ github.event.label.name }}
WERF_ENV: "${{ fromJson(inputs.test_config).edition || 'FE'}}"
runs-on: [self-hosted, e2e-common]
steps:

Expand Down Expand Up @@ -1218,6 +1222,7 @@ jobs:
LAYOUT: Standard
KUBERNETES_VERSION: "1.30"
EVENT_LABEL: ${{ github.event.label.name }}
WERF_ENV: "${{ fromJson(inputs.test_config).edition || 'FE'}}"
runs-on: [self-hosted, e2e-common]
steps:

Expand Down Expand Up @@ -1502,6 +1507,7 @@ jobs:
LAYOUT: Standard
KUBERNETES_VERSION: "Automatic"
EVENT_LABEL: ${{ github.event.label.name }}
WERF_ENV: "${{ fromJson(inputs.test_config).edition || 'FE'}}"
runs-on: [self-hosted, e2e-common]
steps:

Expand Down
Loading

0 comments on commit 54eccdc

Please sign in to comment.