Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

e2e ui: allow to choose elemental ui version #665

Merged
merged 1 commit into from
Feb 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/master-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ on:
description: URL of the elemental support binary
default: https://github.com/rancher/elemental-operator/releases/download/v1.0.0/elemental-support_1.0.0_linux_amd64
type: string
elemental_ui_version:
description: Version of the elemental ui which will be installed
default: latest
type: string
iso_to_test:
description: ISO to test (default built one is empty)
type: string
Expand Down Expand Up @@ -214,6 +218,7 @@ jobs:
UI_ACCOUNT: ${{ inputs.ui_account }}
BROWSER: chrome
CYPRESS_DOCKER: 'cypress/included:10.9.0'
ELEMENTAL_UI_VERSION: ${{ inputs.elemental_ui_version }}
RANCHER_PASSWORD: rancherpassword
RANCHER_URL: https://${{ steps.installation.outputs.MY_HOSTNAME }}/dashboard
RANCHER_USER: admin
Expand Down Expand Up @@ -394,6 +399,7 @@ jobs:
echo "Rancher Manager Version: ${RM_VERSION}" >> $GITHUB_STEP_SUMMARY
echo "Elemental Operator Upgrade: ${UPGRADE_OPERATOR_VALUE}" >> $GITHUB_STEP_SUMMARY
echo "Elemental Operator Version: ${OPERATOR_VERSION}" >> $GITHUB_STEP_SUMMARY
echo "Elemental UI Extension Version (if applicable): ${{ inputs.elemental_ui_version }}" >> $GITHUB_STEP_SUMMARY
echo "K3s on Rancher Manager: ${{ env.INSTALL_K3S_VERSION }}" >> $GITHUB_STEP_SUMMARY
echo "K3s/RKE2 version deployed on the cluster: ${{ inputs.k8s_version_to_provision }}" >> $GITHUB_STEP_SUMMARY
- name: Send failed status to slack
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/ui-e2e-k3s-latest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ on:
description: Destroy the auto-generated self-hosted runner
default: true
type: boolean
elemental_ui_version:
description: Version of the elemental ui which will be installed
default: latest
type: string
proxy:
description: Deploy a proxy (none/rancher/elemental)
default: elemental
Expand Down Expand Up @@ -40,6 +44,7 @@ jobs:
with:
cluster_name: cluster-k3s
destroy_runner: ${{ inputs.destroy_runner || true }}
elemental_ui_version: ${{ inputs.elemental_ui_version || 'latest' }}
k8s_version_to_provision: v1.24.8+k3s1
proxy: ${{ inputs.proxy || 'elemental' }}
rancher_channel: ${{ inputs.rancher_channel || 'latest' }}
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/ui-e2e-k3s-obs-Dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ on:
description: Destroy the auto-generated self-hosted runner
default: true
type: boolean
elemental_ui_version:
description: Version of the elemental ui which will be installed
default: latest
type: string
proxy:
description: Deploy a proxy (none/rancher/elemental)
default: elemental
Expand Down Expand Up @@ -38,6 +42,7 @@ jobs:
with:
cluster_name: cluster-k3s
destroy_runner: ${{ inputs.destroy_runner }}
elemental_ui_version: ${{ inputs.elemental_ui_version }}
iso_to_test: https://download.opensuse.org/repositories/isv:/Rancher:/Elemental:/Dev:/Teal53/media/iso/elemental-teal.x86_64.iso
k8s_version_to_provision: v1.24.8+k3s1
proxy: ${{ inputs.proxy }}
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/ui-e2e-k3s-obs-Stable.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ on:
description: Destroy the auto-generated self-hosted runner
default: true
type: boolean
elemental_ui_version:
description: Version of the elemental ui which will be installed
default: latest
type: string
proxy:
description: Deploy a proxy (none/rancher/elemental)
default: elemental
Expand Down Expand Up @@ -38,6 +42,7 @@ jobs:
with:
cluster_name: cluster-k3s
destroy_runner: ${{ inputs.destroy_runner }}
elemental_ui_version: ${{ inputs.elemental_ui_version }}
iso_to_test: https://download.opensuse.org/repositories/isv:/Rancher:/Elemental:/Stable:/Teal53/media/iso/elemental-teal.x86_64.iso
k8s_version_to_provision: v1.24.8+k3s1
proxy: ${{ inputs.proxy }}
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/ui-e2e-k3s-obs-Staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ on:
description: Destroy the auto-generated self-hosted runner
default: true
type: boolean
elemental_ui_version:
description: Version of the elemental ui which will be installed
default: latest
type: string
proxy:
description: Deploy a proxy (none/rancher/elemental)
default: elemental
Expand Down Expand Up @@ -38,6 +42,7 @@ jobs:
with:
cluster_name: cluster-k3s
destroy_runner: ${{ inputs.destroy_runner }}
elemental_ui_version: ${{ inputs.elemental_ui_version }}
iso_to_test: https://download.opensuse.org/repositories/isv:/Rancher:/Elemental:/Staging:/Teal53/media/iso/elemental-teal.x86_64.iso
k8s_version_to_provision: v1.24.8+k3s1
proxy: ${{ inputs.proxy }}
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/ui-e2e-k3s-stable.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ on:
description: Destroy the auto-generated self-hosted runner
default: true
type: boolean
elemental_ui_version:
description: Version of the elemental ui which will be installed
default: latest
type: string
proxy:
description: Deploy a proxy (none/rancher/elemental)
default: elemental
Expand Down Expand Up @@ -40,6 +44,7 @@ jobs:
with:
cluster_name: cluster-k3s
destroy_runner: ${{ inputs.destroy_runner || true }}
elemental_ui_version: ${{ inputs.elemental_ui_version || 'latest' }}
k8s_version_to_provision: v1.24.8+k3s1
proxy: ${{ inputs.proxy || 'elemental' }}
rancher_channel: ${{ inputs.rancher_channel || 'stable' }}
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/ui-e2e-rke2-latest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ on:
description: Destroy the auto-generated self-hosted runner
default: true
type: boolean
elemental_ui_version:
description: Version of the elemental ui which will be installed
default: latest
type: string
rancher_channel:
description: Rancher Manager channel to use for installation (alpha/latest/stable)
default: latest
Expand Down Expand Up @@ -40,6 +44,7 @@ jobs:
ca_type: private
cluster_name: cluster-rke2
destroy_runner: ${{ inputs.destroy_runner || true }}
elemental_ui_version: ${{ inputs.elemental_ui_version || 'latest'}}
k8s_version_to_provision: v1.24.8+rke2r1
rancher_channel: ${{ inputs.rancher_channel || 'latest' }}
rancher_version: ${{ inputs.rancher_version || 'devel' }}
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/ui-e2e-rke2-obs-Dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ on:
description: Destroy the auto-generated self-hosted runner
default: true
type: boolean
elemental_ui_version:
description: Version of the elemental ui which will be installed
default: latest
type: string
rancher_channel:
description: Rancher Manager channel to use for installation (alpha/latest/stable)
default: stable
Expand Down Expand Up @@ -39,6 +43,7 @@ jobs:
ca_type: private
cluster_name: cluster-rke2
destroy_runner: ${{ inputs.destroy_runner }}
elemental_ui_version: ${{ inputs.elemental_ui_version }}
iso_to_test: https://download.opensuse.org/repositories/isv:/Rancher:/Elemental:/Dev:/Teal53/media/iso/elemental-teal.x86_64.iso
k8s_version_to_provision: v1.24.8+rke2r1
rancher_channel: ${{ inputs.rancher_channel }}
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/ui-e2e-rke2-obs-Stable.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ on:
description: Destroy the auto-generated self-hosted runner
default: true
type: boolean
elemental_ui_version:
description: Version of the elemental ui which will be installed
default: latest
type: string
rancher_channel:
description: Rancher Manager channel to use for installation (alpha/latest/stable)
default: latest
Expand Down Expand Up @@ -39,6 +43,7 @@ jobs:
ca_type: private
cluster_name: cluster-rke2
destroy_runner: ${{ inputs.destroy_runner }}
elemental_ui_version: ${{ inputs.elemental_ui_version }}
iso_to_test: https://download.opensuse.org/repositories/isv:/Rancher:/Elemental:/Stable:/Teal53/media/iso/elemental-teal.x86_64.iso
k8s_version_to_provision: v1.24.8+rke2r1
rancher_channel: ${{ inputs.rancher_channel }}
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/ui-e2e-rke2-obs-Staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ on:
description: Destroy the auto-generated self-hosted runner
default: true
type: boolean
elemental_ui_version:
description: Version of the elemental ui which will be installed
default: latest
type: string
rancher_channel:
description: Rancher Manager channel to use for installation (alpha/latest/stable)
default: stable
Expand Down Expand Up @@ -39,6 +43,7 @@ jobs:
ca_type: private
cluster_name: cluster-rke2
destroy_runner: ${{ inputs.destroy_runner }}
elemental_ui_version: ${{ inputs.elemental_ui_version }}
iso_to_test: https://download.opensuse.org/repositories/isv:/Rancher:/Elemental:/Staging:/Teal53/media/iso/elemental-teal.x86_64.iso
k8s_version_to_provision: v1.24.8+rke2r1
rancher_channel: ${{ inputs.rancher_channel }}
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/ui-e2e-rke2-stable.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ on:
description: Destroy the auto-generated self-hosted runner
default: true
type: boolean
elemental_ui_version:
description: Version of the elemental ui which will be installed
default: latest
type: string
rancher_channel:
description: Rancher Manager channel to use for installation (alpha/latest/stable)
default: stable
Expand Down Expand Up @@ -40,6 +44,7 @@ jobs:
ca_type: private
cluster_name: cluster-rke2
destroy_runner: ${{ inputs.destroy_runner || true }}
elemental_ui_version: ${{ inputs.elemental_ui_version || 'latest' }}
k8s_version_to_provision: v1.24.8+rke2r1
rancher_channel: ${{ inputs.rancher_channel || 'stable' }}
rancher_version: ${{ inputs.rancher_version || 'latest' }}
Expand Down
5 changes: 5 additions & 0 deletions tests/cypress/e2e/unit_tests/elemental_plugin.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Cypress.config();
describe('Install Elemental plugin', () => {
const topLevelMenu = new TopLevelMenu();
const elemental = new Elemental();
const elemental_ui_version = Cypress.env('elemental_ui_version');

beforeEach(() => {
cy.login();
Expand Down Expand Up @@ -34,6 +35,10 @@ describe('Install Elemental plugin', () => {
cy.contains('elemental');
cy.get('.plugin').contains('Install').click();
cy.contains('Install Extension elemental');
if (elemental_ui_version != 'latest') {
cy.get('.labeled-select').click();
cy.contains(elemental_ui_version).click();
}
cy.clickButton('Install');
cy.contains('Installing');
cy.contains('Extensions changed - reload required', {timeout: 40000});
Expand Down
1 change: 1 addition & 0 deletions tests/cypress/plugins/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ module.exports = (on: Cypress.PluginEvents, config: Cypress.PluginConfigOptions)
config.env.operator_version = process.env.OPERATOR_VERSION;
config.env.proxy = process.env.PROXY;
config.env.proxy_ip = process.env.PROXY_IP;
config.env.elemental_ui_version = process.env.ELEMENTAL_UI_VERSION;

return config;
};
1 change: 1 addition & 0 deletions tests/scripts/start-cypress-tests
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ docker run -v $PWD:/e2e -w /e2e \
-e K8S_VERSION_TO_PROVISION=$K8S_VERSION_TO_PROVISION \
-e UI_ACCOUNT=$UI_ACCOUNT \
-e OPERATOR_VERSION=$OPERATOR_VERSION \
-e ELEMENTAL_UI_VERSION=$ELEMENTAL_UI_VERSION \
-e PROXY=$PROXY \
--add-host host.docker.internal:host-gateway \
--ipc=host \
Expand Down