Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
Taior committed Sep 19, 2024
1 parent 54eccdc commit f7aadd9
Show file tree
Hide file tree
Showing 20 changed files with 834 additions and 110 deletions.
16 changes: 14 additions & 2 deletions .github/ci_templates/e2e_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,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 Expand Up @@ -368,6 +369,12 @@ check_e2e_labels:
# GITHUB_RUN_ATTEMPT is a unique number for each attempt of a particular workflow run in a repository.
# Add CRI and KUBERNETES_VERSION to create unique directory for each job.
# CRI and PROVIDER values are trimmed to reduce prefix length.
echo "CASE1"
echo "INPUTS"
echo "CRI=${{ fromJson(inputs.test_config).cri }}"
echo "VER=${{ fromJson(inputs.test_config).ver }}"
echo "EDITION=${{ fromJson(inputs.test_config).edition }}"
if [[ "${KUBERNETES_VERSION}" == "Automatic" ]] ; then
KUBERNETES_VERSION_SUF="auto"
else
Expand Down Expand Up @@ -486,6 +493,7 @@ check_e2e_labels:
- name: "Run e2e test: {!{ $ctx.providerName }!}/{!{ $ctx.criName }!}/{!{ $ctx.kubernetesVersion }!}"
id: e2e_test_run
timeout-minutes: 80
if: false
env:
PROVIDER: {!{ $ctx.providerName }!}
CRI: {!{ $ctx.criName }!}
Expand Down Expand Up @@ -625,7 +633,7 @@ check_e2e_labels:
# <template: e2e_run_job_template>
{!{ $ctx.jobID }!}:
name: "{!{ $ctx.jobName }!}"
if: ${{ fromJson(inputs.test_config).cri == '{!{ $ctx.cri }!}' && github.event.inputs.k8s_version == '{!{ $ctx.kubernetesVersion }!}' && github.event.inputs.layout == '{!{ $ctx.layout }!}' }}
if: false
env:
PROVIDER: {!{ $ctx.providerName }!}
CRI: {!{ $ctx.criName }!}
Expand All @@ -636,7 +644,6 @@ 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 All @@ -658,6 +665,11 @@ check_e2e_labels:
INSTALL_IMAGE_PATH: ${{ github.event.inputs.installer_image_path }}
run: |
# Create tmppath for test script.
echo "CASE2"
echo "INPUTS"
echo "CRI=${{ fromJson(inputs.test_config).cri }}"
echo "VER=${{ fromJson(inputs.test_config).ver }}"
echo "EDITION=${{ fromJson(inputs.test_config).edition }}"
TMP_DIR_PATH="/mnt/cloud-layouts/layouts/${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}-${DHCTL_PREFIX}"
if [[ -d "${TMP_DIR_PATH}" ]] ; then
echo "Temporary dir already exists: ${TMP_DIR_PATH}. ERROR!"
Expand Down
48 changes: 36 additions & 12 deletions .github/workflows/e2e-abort-aws.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,13 @@ jobs:
# <template: e2e_run_job_template>
run_containerd_1_26:
name: "destroy cluster: AWS, Containerd, Kubernetes 1.26"
if: ${{ fromJson(inputs.test_config).cri == 'containerd' && github.event.inputs.k8s_version == '1.26' && github.event.inputs.layout == 'WithoutNAT' }}
if: false
env:
PROVIDER: AWS
CRI: Containerd
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 @@ -180,6 +179,11 @@ jobs:
INSTALL_IMAGE_PATH: ${{ github.event.inputs.installer_image_path }}
run: |
# Create tmppath for test script.
echo "CASE2"
echo "INPUTS"
echo "CRI=${{ fromJson(inputs.test_config).cri }}"
echo "VER=${{ fromJson(inputs.test_config).ver }}"
echo "EDITION=${{ fromJson(inputs.test_config).edition }}"
TMP_DIR_PATH="/mnt/cloud-layouts/layouts/${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}-${DHCTL_PREFIX}"
if [[ -d "${TMP_DIR_PATH}" ]] ; then
echo "Temporary dir already exists: ${TMP_DIR_PATH}. ERROR!"
Expand Down Expand Up @@ -354,14 +358,13 @@ jobs:
# <template: e2e_run_job_template>
run_containerd_1_27:
name: "destroy cluster: AWS, Containerd, Kubernetes 1.27"
if: ${{ fromJson(inputs.test_config).cri == 'containerd' && github.event.inputs.k8s_version == '1.27' && github.event.inputs.layout == 'WithoutNAT' }}
if: false
env:
PROVIDER: AWS
CRI: Containerd
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 @@ -459,6 +462,11 @@ jobs:
INSTALL_IMAGE_PATH: ${{ github.event.inputs.installer_image_path }}
run: |
# Create tmppath for test script.
echo "CASE2"
echo "INPUTS"
echo "CRI=${{ fromJson(inputs.test_config).cri }}"
echo "VER=${{ fromJson(inputs.test_config).ver }}"
echo "EDITION=${{ fromJson(inputs.test_config).edition }}"
TMP_DIR_PATH="/mnt/cloud-layouts/layouts/${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}-${DHCTL_PREFIX}"
if [[ -d "${TMP_DIR_PATH}" ]] ; then
echo "Temporary dir already exists: ${TMP_DIR_PATH}. ERROR!"
Expand Down Expand Up @@ -633,14 +641,13 @@ jobs:
# <template: e2e_run_job_template>
run_containerd_1_28:
name: "destroy cluster: AWS, Containerd, Kubernetes 1.28"
if: ${{ fromJson(inputs.test_config).cri == 'containerd' && github.event.inputs.k8s_version == '1.28' && github.event.inputs.layout == 'WithoutNAT' }}
if: false
env:
PROVIDER: AWS
CRI: Containerd
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 @@ -738,6 +745,11 @@ jobs:
INSTALL_IMAGE_PATH: ${{ github.event.inputs.installer_image_path }}
run: |
# Create tmppath for test script.
echo "CASE2"
echo "INPUTS"
echo "CRI=${{ fromJson(inputs.test_config).cri }}"
echo "VER=${{ fromJson(inputs.test_config).ver }}"
echo "EDITION=${{ fromJson(inputs.test_config).edition }}"
TMP_DIR_PATH="/mnt/cloud-layouts/layouts/${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}-${DHCTL_PREFIX}"
if [[ -d "${TMP_DIR_PATH}" ]] ; then
echo "Temporary dir already exists: ${TMP_DIR_PATH}. ERROR!"
Expand Down Expand Up @@ -912,14 +924,13 @@ jobs:
# <template: e2e_run_job_template>
run_containerd_1_29:
name: "destroy cluster: AWS, Containerd, Kubernetes 1.29"
if: ${{ fromJson(inputs.test_config).cri == 'containerd' && github.event.inputs.k8s_version == '1.29' && github.event.inputs.layout == 'WithoutNAT' }}
if: false
env:
PROVIDER: AWS
CRI: Containerd
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 @@ -1017,6 +1028,11 @@ jobs:
INSTALL_IMAGE_PATH: ${{ github.event.inputs.installer_image_path }}
run: |
# Create tmppath for test script.
echo "CASE2"
echo "INPUTS"
echo "CRI=${{ fromJson(inputs.test_config).cri }}"
echo "VER=${{ fromJson(inputs.test_config).ver }}"
echo "EDITION=${{ fromJson(inputs.test_config).edition }}"
TMP_DIR_PATH="/mnt/cloud-layouts/layouts/${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}-${DHCTL_PREFIX}"
if [[ -d "${TMP_DIR_PATH}" ]] ; then
echo "Temporary dir already exists: ${TMP_DIR_PATH}. ERROR!"
Expand Down Expand Up @@ -1191,14 +1207,13 @@ jobs:
# <template: e2e_run_job_template>
run_containerd_1_30:
name: "destroy cluster: AWS, Containerd, Kubernetes 1.30"
if: ${{ fromJson(inputs.test_config).cri == 'containerd' && github.event.inputs.k8s_version == '1.30' && github.event.inputs.layout == 'WithoutNAT' }}
if: false
env:
PROVIDER: AWS
CRI: Containerd
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 @@ -1296,6 +1311,11 @@ jobs:
INSTALL_IMAGE_PATH: ${{ github.event.inputs.installer_image_path }}
run: |
# Create tmppath for test script.
echo "CASE2"
echo "INPUTS"
echo "CRI=${{ fromJson(inputs.test_config).cri }}"
echo "VER=${{ fromJson(inputs.test_config).ver }}"
echo "EDITION=${{ fromJson(inputs.test_config).edition }}"
TMP_DIR_PATH="/mnt/cloud-layouts/layouts/${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}-${DHCTL_PREFIX}"
if [[ -d "${TMP_DIR_PATH}" ]] ; then
echo "Temporary dir already exists: ${TMP_DIR_PATH}. ERROR!"
Expand Down Expand Up @@ -1470,14 +1490,13 @@ jobs:
# <template: e2e_run_job_template>
run_containerd_automatic:
name: "destroy cluster: AWS, Containerd, Kubernetes Automatic"
if: ${{ fromJson(inputs.test_config).cri == 'containerd' && github.event.inputs.k8s_version == 'Automatic' && github.event.inputs.layout == 'WithoutNAT' }}
if: false
env:
PROVIDER: AWS
CRI: Containerd
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 Expand Up @@ -1575,6 +1594,11 @@ jobs:
INSTALL_IMAGE_PATH: ${{ github.event.inputs.installer_image_path }}
run: |
# Create tmppath for test script.
echo "CASE2"
echo "INPUTS"
echo "CRI=${{ fromJson(inputs.test_config).cri }}"
echo "VER=${{ fromJson(inputs.test_config).ver }}"
echo "EDITION=${{ fromJson(inputs.test_config).edition }}"
TMP_DIR_PATH="/mnt/cloud-layouts/layouts/${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}-${DHCTL_PREFIX}"
if [[ -d "${TMP_DIR_PATH}" ]] ; then
echo "Temporary dir already exists: ${TMP_DIR_PATH}. ERROR!"
Expand Down
48 changes: 36 additions & 12 deletions .github/workflows/e2e-abort-azure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,13 @@ jobs:
# <template: e2e_run_job_template>
run_containerd_1_26:
name: "destroy cluster: Azure, Containerd, Kubernetes 1.26"
if: ${{ fromJson(inputs.test_config).cri == 'containerd' && github.event.inputs.k8s_version == '1.26' && github.event.inputs.layout == 'Standard' }}
if: false
env:
PROVIDER: Azure
CRI: Containerd
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 @@ -180,6 +179,11 @@ jobs:
INSTALL_IMAGE_PATH: ${{ github.event.inputs.installer_image_path }}
run: |
# Create tmppath for test script.
echo "CASE2"
echo "INPUTS"
echo "CRI=${{ fromJson(inputs.test_config).cri }}"
echo "VER=${{ fromJson(inputs.test_config).ver }}"
echo "EDITION=${{ fromJson(inputs.test_config).edition }}"
TMP_DIR_PATH="/mnt/cloud-layouts/layouts/${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}-${DHCTL_PREFIX}"
if [[ -d "${TMP_DIR_PATH}" ]] ; then
echo "Temporary dir already exists: ${TMP_DIR_PATH}. ERROR!"
Expand Down Expand Up @@ -358,14 +362,13 @@ jobs:
# <template: e2e_run_job_template>
run_containerd_1_27:
name: "destroy cluster: Azure, Containerd, Kubernetes 1.27"
if: ${{ fromJson(inputs.test_config).cri == 'containerd' && github.event.inputs.k8s_version == '1.27' && github.event.inputs.layout == 'Standard' }}
if: false
env:
PROVIDER: Azure
CRI: Containerd
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 @@ -463,6 +466,11 @@ jobs:
INSTALL_IMAGE_PATH: ${{ github.event.inputs.installer_image_path }}
run: |
# Create tmppath for test script.
echo "CASE2"
echo "INPUTS"
echo "CRI=${{ fromJson(inputs.test_config).cri }}"
echo "VER=${{ fromJson(inputs.test_config).ver }}"
echo "EDITION=${{ fromJson(inputs.test_config).edition }}"
TMP_DIR_PATH="/mnt/cloud-layouts/layouts/${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}-${DHCTL_PREFIX}"
if [[ -d "${TMP_DIR_PATH}" ]] ; then
echo "Temporary dir already exists: ${TMP_DIR_PATH}. ERROR!"
Expand Down Expand Up @@ -641,14 +649,13 @@ jobs:
# <template: e2e_run_job_template>
run_containerd_1_28:
name: "destroy cluster: Azure, Containerd, Kubernetes 1.28"
if: ${{ fromJson(inputs.test_config).cri == 'containerd' && github.event.inputs.k8s_version == '1.28' && github.event.inputs.layout == 'Standard' }}
if: false
env:
PROVIDER: Azure
CRI: Containerd
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 @@ -746,6 +753,11 @@ jobs:
INSTALL_IMAGE_PATH: ${{ github.event.inputs.installer_image_path }}
run: |
# Create tmppath for test script.
echo "CASE2"
echo "INPUTS"
echo "CRI=${{ fromJson(inputs.test_config).cri }}"
echo "VER=${{ fromJson(inputs.test_config).ver }}"
echo "EDITION=${{ fromJson(inputs.test_config).edition }}"
TMP_DIR_PATH="/mnt/cloud-layouts/layouts/${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}-${DHCTL_PREFIX}"
if [[ -d "${TMP_DIR_PATH}" ]] ; then
echo "Temporary dir already exists: ${TMP_DIR_PATH}. ERROR!"
Expand Down Expand Up @@ -924,14 +936,13 @@ jobs:
# <template: e2e_run_job_template>
run_containerd_1_29:
name: "destroy cluster: Azure, Containerd, Kubernetes 1.29"
if: ${{ fromJson(inputs.test_config).cri == 'containerd' && github.event.inputs.k8s_version == '1.29' && github.event.inputs.layout == 'Standard' }}
if: false
env:
PROVIDER: Azure
CRI: Containerd
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 @@ -1029,6 +1040,11 @@ jobs:
INSTALL_IMAGE_PATH: ${{ github.event.inputs.installer_image_path }}
run: |
# Create tmppath for test script.
echo "CASE2"
echo "INPUTS"
echo "CRI=${{ fromJson(inputs.test_config).cri }}"
echo "VER=${{ fromJson(inputs.test_config).ver }}"
echo "EDITION=${{ fromJson(inputs.test_config).edition }}"
TMP_DIR_PATH="/mnt/cloud-layouts/layouts/${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}-${DHCTL_PREFIX}"
if [[ -d "${TMP_DIR_PATH}" ]] ; then
echo "Temporary dir already exists: ${TMP_DIR_PATH}. ERROR!"
Expand Down Expand Up @@ -1207,14 +1223,13 @@ jobs:
# <template: e2e_run_job_template>
run_containerd_1_30:
name: "destroy cluster: Azure, Containerd, Kubernetes 1.30"
if: ${{ fromJson(inputs.test_config).cri == 'containerd' && github.event.inputs.k8s_version == '1.30' && github.event.inputs.layout == 'Standard' }}
if: false
env:
PROVIDER: Azure
CRI: Containerd
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 @@ -1312,6 +1327,11 @@ jobs:
INSTALL_IMAGE_PATH: ${{ github.event.inputs.installer_image_path }}
run: |
# Create tmppath for test script.
echo "CASE2"
echo "INPUTS"
echo "CRI=${{ fromJson(inputs.test_config).cri }}"
echo "VER=${{ fromJson(inputs.test_config).ver }}"
echo "EDITION=${{ fromJson(inputs.test_config).edition }}"
TMP_DIR_PATH="/mnt/cloud-layouts/layouts/${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}-${DHCTL_PREFIX}"
if [[ -d "${TMP_DIR_PATH}" ]] ; then
echo "Temporary dir already exists: ${TMP_DIR_PATH}. ERROR!"
Expand Down Expand Up @@ -1490,14 +1510,13 @@ jobs:
# <template: e2e_run_job_template>
run_containerd_automatic:
name: "destroy cluster: Azure, Containerd, Kubernetes Automatic"
if: ${{ fromJson(inputs.test_config).cri == 'containerd' && github.event.inputs.k8s_version == 'Automatic' && github.event.inputs.layout == 'Standard' }}
if: false
env:
PROVIDER: Azure
CRI: Containerd
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 Expand Up @@ -1595,6 +1614,11 @@ jobs:
INSTALL_IMAGE_PATH: ${{ github.event.inputs.installer_image_path }}
run: |
# Create tmppath for test script.
echo "CASE2"
echo "INPUTS"
echo "CRI=${{ fromJson(inputs.test_config).cri }}"
echo "VER=${{ fromJson(inputs.test_config).ver }}"
echo "EDITION=${{ fromJson(inputs.test_config).edition }}"
TMP_DIR_PATH="/mnt/cloud-layouts/layouts/${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}-${DHCTL_PREFIX}"
if [[ -d "${TMP_DIR_PATH}" ]] ; then
echo "Temporary dir already exists: ${TMP_DIR_PATH}. ERROR!"
Expand Down
Loading

0 comments on commit f7aadd9

Please sign in to comment.