Skip to content

Commit

Permalink
[backport-2.10] Install logic switched to ele-testhelpers (#211)
Browse files Browse the repository at this point in the history
---------

Signed-off-by: Tomas Hehejik <thehejik@suse.com>
Co-authored-by: Parthvi Vala <parthvi.vala@suse.com>
Co-authored-by: Chandan Pinjani <chandan.pinjani@suse.com>
  • Loading branch information
3 people authored Nov 29, 2024
1 parent d3017c5 commit fa65069
Show file tree
Hide file tree
Showing 11 changed files with 404 additions and 186 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/aks.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This workflow calls the main workflow with custom variables
name: AKS-E2E
run-name: AKS ${{ inputs.downstream_k8s_minor_version }} on Rancher v${{ inputs.rancher_version || '2.10-head' }} deployed on ${{ inputs.k3s_version || 'v1.30.5+k3s1' }}
run-name: AKS ${{ inputs.downstream_k8s_minor_version }} on Rancher ${{ inputs.rancher_version || 'latest/devel/2.10' }} deployed on ${{ inputs.k3s_version || 'v1.30.5+k3s1' }}

on:
schedule:
Expand All @@ -9,10 +9,10 @@ on:
workflow_dispatch: # Allow running manually on demand
inputs:
rancher_version:
description: Rancher version to deploy
description: Rancher version channel/version/head_version latest/latest, latest/2.9.3[-rc2], prime/2.9.3, prime/devel/2.9, prime-optimus/2.9.3-rc2
required: true
type: string
default: 2.10-head
default: latest/devel/2.10
k3s_version:
description: k3s version of local cluster
required: true
Expand Down Expand Up @@ -57,7 +57,7 @@ jobs:
secrets: inherit
with:
hosted_provider: aks
rancher_version: ${{ inputs.rancher_version || '2.10-head' }}
rancher_version: ${{ inputs.rancher_version || 'latest/devel/2.10' }}
k3s_version: ${{ inputs.k3s_version || 'v1.30.5+k3s1' }}
operator_nightly_chart: ${{ inputs.operator_nightly_chart == true || (github.event_name == 'schedule' && true) }}
tests_to_run: ${{ inputs.tests_to_run || (github.event.schedule == '0 4 * * 1-6' && 'p0_provisioning/p0_import') || (github.event.schedule == '0 4 * * 0' && 'p1_provisioning/p1_import/sync_provisioning/sync_import') }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/eks.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This workflow calls the main workflow with custom variables
name: EKS-E2E
run-name: EKS ${{ inputs.downstream_k8s_minor_version }} on Rancher v${{ inputs.rancher_version || '2.10-head' }} deployed on ${{ inputs.k3s_version || 'v1.30.5+k3s1' }}
run-name: EKS ${{ inputs.downstream_k8s_minor_version }} on Rancher ${{ inputs.rancher_version || 'latest/devel/2.10' }} deployed on ${{ inputs.k3s_version || 'v1.30.5+k3s1' }}

on:
schedule:
Expand All @@ -9,10 +9,10 @@ on:
workflow_dispatch: # Allow running manually on demand
inputs:
rancher_version:
description: Rancher version to deploy
description: Rancher version channel/version/head_version latest/latest, latest/2.9.3[-rc2], prime/2.9.3, prime/devel/2.9, prime-optimus/2.9.3-rc2
required: true
type: string
default: 2.10-head
default: latest/devel/2.10
k3s_version:
description: k3s version of local cluster
required: true
Expand Down Expand Up @@ -57,7 +57,7 @@ jobs:
secrets: inherit
with:
hosted_provider: eks
rancher_version: ${{ inputs.rancher_version || '2.10-head' }}
rancher_version: ${{ inputs.rancher_version || 'latest/devel/2.10' }}
k3s_version: ${{ inputs.k3s_version || 'v1.30.5+k3s1' }}
operator_nightly_chart: ${{ inputs.operator_nightly_chart == true || (github.event_name == 'schedule' && true) }}
tests_to_run: ${{ inputs.tests_to_run || (github.event.schedule == '0 4 * * 1-6' && 'p0_provisioning/p0_import') || (github.event.schedule == '0 4 * * 0' && 'p1_provisioning/p1_import/sync_provisioning/sync_import') }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/gke.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This workflow calls the main workflow with custom variables
name: GKE-E2E
run-name: GKE ${{ inputs.downstream_k8s_minor_version }} on Rancher v${{ inputs.rancher_version || '2.10-head' }} deployed on ${{ inputs.k3s_version || 'v1.30.5+k3s1' }}
run-name: GKE ${{ inputs.downstream_k8s_minor_version }} on Rancher ${{ inputs.rancher_version || 'latest/devel/2.10' }} deployed on ${{ inputs.k3s_version || 'v1.30.5+k3s1' }}

on:
schedule:
Expand All @@ -9,10 +9,10 @@ on:
workflow_dispatch: # Allow running manually on demand
inputs:
rancher_version:
description: Rancher version to deploy
description: Rancher version channel/version/head_version latest/latest, latest/2.9.3[-rc2], prime/2.9.3, prime/devel/2.9, prime-optimus/2.9.3-rc2
required: true
type: string
default: 2.10-head
default: latest/devel/2.10
k3s_version:
description: k3s version of local cluster
required: true
Expand Down Expand Up @@ -57,7 +57,7 @@ jobs:
secrets: inherit
with:
hosted_provider: gke
rancher_version: ${{ inputs.rancher_version || '2.10-head' }}
rancher_version: ${{ inputs.rancher_version || 'latest/devel/2.10' }}
k3s_version: ${{ inputs.k3s_version || 'v1.30.5+k3s1' }}
operator_nightly_chart: ${{ inputs.operator_nightly_chart == true || (github.event_name == 'schedule' && true) }}
tests_to_run: ${{ inputs.tests_to_run || (github.event.schedule == '0 4 * * 1-6' && 'p0_provisioning/p0_import') || (github.event.schedule == '0 4 * * 0' && 'p1_provisioning/p1_import/sync_provisioning/sync_import') }}
Expand Down
59 changes: 27 additions & 32 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -150,32 +150,34 @@ jobs:
- name: Install Proxy
if: ${{ inputs.rancher_installed == 'hostname/password' && inputs.proxy == true }}
run: |
docker run -d --name squid_proxy -v $(pwd)/.github/scripts/squid.conf:/etc/squid/squid.conf -p 3128:3128 wernight/squid
echo "PROXY_HOST=$(gcloud compute instances describe ${{ needs.create-runner.outputs.runner }} \
--format='get(networkInterfaces[0].networkIP)' --zone ${{ env.GCP_RUNNER_ZONE }}):3128" >> ${GITHUB_ENV}
echo "RANCHER_BEHIND_PROXY=enabled" >> ${GITHUB_ENV}
- name: Install K3s / Helm / Rancher
- name: Install Go
uses: actions/setup-go@v5
env:
GOTOOLCHAIN: local
with:
go-version-file: go.mod

- name: Install k3s / Helm / CertManager / Rancher
id: prepare-rancher
if: ${{ inputs.rancher_installed == 'hostname/password' }}
env:
KUBECONFIG: /etc/rancher/k3s/k3s.yaml
HELM_VERSION: 3.13.1
K3S_VERSION: ${{ inputs.k3s_version }}
INSTALL_K3S_VERSION: ${{ inputs.k3s_version }}
RANCHER_VERSION: ${{ inputs.rancher_version }}
RANCHER_HOSTNAME: ${{ env.RANCHER_HOSTNAME }}
RANCHER_PASSWORD: ${{ env.RANCHER_PASSWORD }}
PROXY_HOST: ${{ env.PROXY_HOST }}
RANCHER_BEHIND_PROXY: ${{ env.RANCHER_BEHIND_PROXY }}
run: |
if [ ${{ inputs.operator_nightly_chart }} == true ]; then
if [ ${{ inputs.proxy }} == true ]; then
make prepare-e2e-ci-rancher-hosted-nightly-chart-behind-proxy
else
make prepare-e2e-ci-rancher-hosted-nightly-chart
fi
elif [ ${{ inputs.proxy }} == true ]; then
make prepare-e2e-ci-rancher-behind-proxy
else
make prepare-e2e-ci-rancher
export NIGHTLY_CHART="enabled"
fi
make prepare-rancher
- name: Login to Azure
uses: azure/login@v2.2.0
Expand All @@ -197,13 +199,6 @@ jobs:
aws-secret-access-key: ${{ env.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ env.EKS_REGION }}

- name: Install Go
uses: actions/setup-go@v5
env:
GOTOOLCHAIN: local
with:
go-version-file: go.mod

- name: Create/Export Qase Run
id: qase
run: |
Expand All @@ -221,7 +216,7 @@ jobs:
echo -e "Exported values:\nQASE_RUN_ID=${ID}\nQASE_RUN_DESCRIPTION=${QASE_RUN_DESCRIPTION}\nQASE_RUN_NAME=${QASE_RUN_NAME}"

- name: Provisioning cluster tests
if: ${{ contains(inputs.tests_to_run, 'p0_provisioning') }}
if: ${{ steps.prepare-rancher.outcome == 'success' && contains(inputs.tests_to_run, 'p0_provisioning') }}
env:
RANCHER_HOSTNAME: ${{ env.RANCHER_HOSTNAME }}
RANCHER_PASSWORD: ${{ env.RANCHER_PASSWORD }}
Expand All @@ -231,7 +226,7 @@ jobs:
make e2e-provisioning-tests
- name: Import cluster tests
if: ${{ !cancelled() && contains(inputs.tests_to_run, 'p0_import') }}
if: ${{ !cancelled() && steps.prepare-rancher.outcome == 'success' && contains(inputs.tests_to_run, 'p0_import') }}
env:
RANCHER_HOSTNAME: ${{ env.RANCHER_HOSTNAME }}
RANCHER_PASSWORD: ${{ env.RANCHER_PASSWORD }}
Expand All @@ -241,7 +236,7 @@ jobs:
make e2e-import-tests
- name: Provisioning cluster P1 tests
if: ${{ !cancelled() && contains(inputs.tests_to_run, 'p1_provisioning') }}
if: ${{ !cancelled() && steps.prepare-rancher.outcome == 'success' && contains(inputs.tests_to_run, 'p1_provisioning') }}
env:
RANCHER_HOSTNAME: ${{ env.RANCHER_HOSTNAME }}
RANCHER_PASSWORD: ${{ env.RANCHER_PASSWORD }}
Expand All @@ -251,7 +246,7 @@ jobs:
make e2e-p1-provisioning-tests
- name: Import cluster P1 tests
if: ${{ !cancelled() && contains(inputs.tests_to_run, 'p1_import') }}
if: ${{ !cancelled() && steps.prepare-rancher.outcome == 'success' && contains(inputs.tests_to_run, 'p1_import') }}
env:
RANCHER_HOSTNAME: ${{ env.RANCHER_HOSTNAME }}
RANCHER_PASSWORD: ${{ env.RANCHER_PASSWORD }}
Expand All @@ -261,7 +256,7 @@ jobs:
make e2e-p1-import-tests
- name: Support matrix provisioning tests
if: ${{ !cancelled() && contains(inputs.tests_to_run, 'support_matrix_provisioning') }}
if: ${{ !cancelled() && steps.prepare-rancher.outcome == 'success' && contains(inputs.tests_to_run, 'support_matrix_provisioning') }}
env:
RANCHER_HOSTNAME: ${{ env.RANCHER_HOSTNAME }}
RANCHER_PASSWORD: ${{ env.RANCHER_PASSWORD }}
Expand All @@ -271,7 +266,7 @@ jobs:
make e2e-support-matrix-provisioning-tests
- name: Support matrix import tests
if: ${{ !cancelled() && contains(inputs.tests_to_run, 'support_matrix_import') }}
if: ${{ !cancelled() && steps.prepare-rancher.outcome == 'success' && contains(inputs.tests_to_run, 'support_matrix_import') }}
env:
RANCHER_HOSTNAME: ${{ env.RANCHER_HOSTNAME }}
RANCHER_PASSWORD: ${{ env.RANCHER_PASSWORD }}
Expand All @@ -281,7 +276,7 @@ jobs:
make e2e-support-matrix-import-tests
- name: K8s Chart Support provisioning tests
if: ${{ !cancelled() && contains(inputs.tests_to_run, 'k8s_chart_support_provisioning') }}
if: ${{ !cancelled() && steps.prepare-rancher.outcome == 'success' && contains(inputs.tests_to_run, 'k8s_chart_support_provisioning') }}
env:
RANCHER_HOSTNAME: ${{ env.RANCHER_HOSTNAME }}
RANCHER_PASSWORD: ${{ env.RANCHER_PASSWORD }}
Expand All @@ -293,7 +288,7 @@ jobs:
make e2e-k8s-chart-support-provisioning-tests
- name: K8s Chart Support import tests
if: ${{ !cancelled() && contains(inputs.tests_to_run, 'k8s_chart_support_import') }}
if: ${{ !cancelled() && steps.prepare-rancher.outcome == 'success' && contains(inputs.tests_to_run, 'k8s_chart_support_import') }}
env:
RANCHER_HOSTNAME: ${{ env.RANCHER_HOSTNAME }}
RANCHER_PASSWORD: ${{ env.RANCHER_PASSWORD }}
Expand All @@ -305,7 +300,7 @@ jobs:
make e2e-k8s-chart-support-import-tests
- name: Sync provisioning tests
if: ${{ !cancelled() && contains(inputs.tests_to_run, 'sync_provisioning') }}
if: ${{ !cancelled() && steps.prepare-rancher.outcome == 'success' && contains(inputs.tests_to_run, 'sync_provisioning') }}
env:
RANCHER_HOSTNAME: ${{ env.RANCHER_HOSTNAME }}
RANCHER_PASSWORD: ${{ env.RANCHER_PASSWORD }}
Expand All @@ -316,7 +311,7 @@ jobs:
make e2e-sync-provisioning-tests
- name: Sync import tests
if: ${{ !cancelled() && contains(inputs.tests_to_run, 'sync_import') }}
if: ${{ !cancelled() && steps.prepare-rancher.outcome == 'success' && contains(inputs.tests_to_run, 'sync_import') }}
env:
RANCHER_HOSTNAME: ${{ env.RANCHER_HOSTNAME }}
RANCHER_PASSWORD: ${{ env.RANCHER_PASSWORD }}
Expand Down Expand Up @@ -344,13 +339,13 @@ jobs:
env:
KUBECONFIG: /etc/rancher/k3s/k3s.yaml
RANCHER_BEHIND_PROXY: ${{ inputs.proxy == true }}
if: ${{ !cancelled() }}
if: ${{ steps.prepare-rancher.outcome == 'success' }}
run: |
chmod +x ${{ env.RANCHER_LOG_COLLECTOR }}
bash ${{ env.RANCHER_LOG_COLLECTOR }}
- name: Upload cluster logs
if: ${{ !cancelled() }}
if: ${{ steps.prepare-rancher.outcome == 'success' }}
uses: actions/upload-artifact@v4
with:
name: support-logs
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
vendor
.idea
config
*.test
*.test
Loading

0 comments on commit fa65069

Please sign in to comment.