diff --git a/.github/workflows/flow-examples-test.yaml b/.github/workflows/flow-examples-test.yaml index 298911d617..10eb6c65f2 100644 --- a/.github/workflows/flow-examples-test.yaml +++ b/.github/workflows/flow-examples-test.yaml @@ -110,23 +110,23 @@ jobs: - name: Install Kubectl uses: step-security/setup-kubectl@fa3574e17195eaed56b1e9d9095c58d0aee24f03 # pinned to v4.0.1 with: - version: 'v1.27.3' + version: 'v1.34.0' id: install - name: Setup Kind uses: helm/kind-action@92086f6be054225fa813e0a4b13787fc9088faab # v1.13.0 with: install_only: true - node_image: kindest/node:v1.31.4@sha256:2cb39f7295fe7eafee0842b1052a599a4fb0f8bcf3f83d96c7f4864c357c6c30 - version: v0.26.0 - kubectl_version: v1.31.4 + node_image: kindest/node:v1.33.7@sha256:d26ef333bdb2cbe9862a0f7c3803ecc7b4303d8cea8e814b481b09949d353040 + version: v0.31.0 + kubectl_version: v1.34.0 verbosity: 3 wait: 120s - name: Setup Helm uses: azure/setup-helm@1a275c3b69536ee54be43f2070a358922e12c8d4 # v4.3.1 with: - version: "v3.17.1" # helm version + version: "v4.0.4" # helm version - name: Install Dependencies id: npm-deps diff --git a/.github/workflows/flow-gcs-test.yaml b/.github/workflows/flow-gcs-test.yaml index 391cd7f3ac..44033485d3 100644 --- a/.github/workflows/flow-gcs-test.yaml +++ b/.github/workflows/flow-gcs-test.yaml @@ -114,16 +114,16 @@ jobs: if: steps.check.outputs.run == 'true' uses: azure/setup-helm@1a275c3b69536ee54be43f2070a358922e12c8d4 # v4.3.1 with: - version: "v3.12.3" # helm version + version: "v4.0.4" # helm version - name: Setup Kind if: steps.check.outputs.run == 'true' uses: helm/kind-action@92086f6be054225fa813e0a4b13787fc9088faab # v1.13.0 with: install_only: true - node_image: kindest/node:v1.31.4@sha256:2cb39f7295fe7eafee0842b1052a599a4fb0f8bcf3f83d96c7f4864c357c6c30 - version: v0.26.0 - kubectl_version: v1.31.4 + node_image: kindest/node:v1.33.7@sha256:d26ef333bdb2cbe9862a0f7c3803ecc7b4303d8cea8e814b481b09949d353040 + version: v0.31.0 + kubectl_version: v1.34.0 verbosity: 3 wait: 120s @@ -138,7 +138,7 @@ jobs: uses: step-security/setup-kubectl@fa3574e17195eaed56b1e9d9095c58d0aee24f03 # pinned to v4.0.1 if: steps.check.outputs.run == 'true' with: - version: 'v1.27.3' + version: 'v1.34.0' id: install - name: Compile Project diff --git a/.github/workflows/flow-migration-test.yaml b/.github/workflows/flow-migration-test.yaml index 55af263aa6..b833a8d01a 100644 --- a/.github/workflows/flow-migration-test.yaml +++ b/.github/workflows/flow-migration-test.yaml @@ -58,22 +58,22 @@ jobs: - name: Setup Helm uses: azure/setup-helm@1a275c3b69536ee54be43f2070a358922e12c8d4 # v4.3.1 with: - version: "v3.12.3" # helm version + version: "v4.0.4" # helm version - name: Setup Kind uses: helm/kind-action@92086f6be054225fa813e0a4b13787fc9088faab # v1.13.0 with: install_only: true - node_image: kindest/node:v1.31.4@sha256:2cb39f7295fe7eafee0842b1052a599a4fb0f8bcf3f83d96c7f4864c357c6c30 - version: v0.26.0 - kubectl_version: v1.31.4 + node_image: kindest/node:v1.33.7@sha256:d26ef333bdb2cbe9862a0f7c3803ecc7b4303d8cea8e814b481b09949d353040 + version: v0.31.0 + kubectl_version: v1.34.0 verbosity: 3 wait: 120s - name: Install Kubectl uses: step-security/setup-kubectl@fa3574e17195eaed56b1e9d9095c58d0aee24f03 # pinned to v4.0.1 with: - version: 'v1.27.3' + version: 'v1.34.0' id: install - name: Get Latest Version diff --git a/.github/workflows/flow-performance-test.yaml b/.github/workflows/flow-performance-test.yaml index 8f76e76d78..bf14f73dc6 100644 --- a/.github/workflows/flow-performance-test.yaml +++ b/.github/workflows/flow-performance-test.yaml @@ -74,23 +74,23 @@ jobs: - name: Install Kubectl uses: step-security/setup-kubectl@fa3574e17195eaed56b1e9d9095c58d0aee24f03 # pinned to v4.0.1 with: - version: 'v1.27.3' + version: 'v1.34.0' id: install - name: Setup Kind uses: helm/kind-action@92086f6be054225fa813e0a4b13787fc9088faab # v1.13.0 with: install_only: true - node_image: kindest/node:v1.31.4@sha256:2cb39f7295fe7eafee0842b1052a599a4fb0f8bcf3f83d96c7f4864c357c6c30 - version: v0.26.0 - kubectl_version: v1.31.4 + node_image: kindest/node:v1.33.7@sha256:d26ef333bdb2cbe9862a0f7c3803ecc7b4303d8cea8e814b481b09949d353040 + version: v0.31.0 + kubectl_version: v1.34.0 verbosity: 3 wait: 120s - name: Setup Helm uses: azure/setup-helm@1a275c3b69536ee54be43f2070a358922e12c8d4 # v4.3.1 with: - version: "v3.17.1" # helm version + version: "v4.0.4" # helm version - name: Install Dependencies id: npm-deps diff --git a/.github/workflows/zxc-e2e-test.yaml b/.github/workflows/zxc-e2e-test.yaml index 8598a538c7..f6c863654c 100644 --- a/.github/workflows/zxc-e2e-test.yaml +++ b/.github/workflows/zxc-e2e-test.yaml @@ -221,7 +221,7 @@ jobs: if: ${{ inputs.install-dependencies == true }} uses: step-security/setup-kubectl@fa3574e17195eaed56b1e9d9095c58d0aee24f03 # pinned to v4.0.1 with: - version: 'v1.27.3' + version: 'v1.34.0' id: install - name: Setup Kind @@ -229,9 +229,9 @@ jobs: uses: helm/kind-action@92086f6be054225fa813e0a4b13787fc9088faab # v1.13.0 with: install_only: true - node_image: kindest/node:v1.31.4@sha256:2cb39f7295fe7eafee0842b1052a599a4fb0f8bcf3f83d96c7f4864c357c6c30 - version: v0.26.0 - kubectl_version: v1.31.4 + node_image: kindest/node:v1.33.7@sha256:d26ef333bdb2cbe9862a0f7c3803ecc7b4303d8cea8e814b481b09949d353040 + version: v0.31.0 + kubectl_version: v1.34.0 verbosity: 3 wait: 120s @@ -239,7 +239,7 @@ jobs: if: ${{ inputs.install-dependencies == true }} uses: azure/setup-helm@1a275c3b69536ee54be43f2070a358922e12c8d4 # v4.3.1 with: - version: "v3.17.1" # helm version + version: "v4.0.4" # helm version - name: Install Dependencies id: npm-deps diff --git a/.github/workflows/zxc-hugo-build.yaml b/.github/workflows/zxc-hugo-build.yaml index b3056957ac..8baa70fbb1 100644 --- a/.github/workflows/zxc-hugo-build.yaml +++ b/.github/workflows/zxc-hugo-build.yaml @@ -109,21 +109,21 @@ jobs: - name: Install Kubectl uses: step-security/setup-kubectl@fa3574e17195eaed56b1e9d9095c58d0aee24f03 # pinned to v4.0.1 with: - version: 'v1.27.3' + version: 'v1.34.0' id: install - name: Setup Helm uses: azure/setup-helm@1a275c3b69536ee54be43f2070a358922e12c8d4 # v4.3.1 with: - version: "v3.12.3" # helm version + version: "v4.0.4" # helm version - name: Setup Kind uses: helm/kind-action@92086f6be054225fa813e0a4b13787fc9088faab # v1.13.0 with: install_only: true - node_image: kindest/node:v1.31.4@sha256:2cb39f7295fe7eafee0842b1052a599a4fb0f8bcf3f83d96c7f4864c357c6c30 - version: v0.26.0 - kubectl_version: v1.31.4 + node_image: kindest/node:v1.33.7@sha256:d26ef333bdb2cbe9862a0f7c3803ecc7b4303d8cea8e814b481b09949d353040 + version: v0.31.0 + kubectl_version: v1.34.0 verbosity: 3 wait: 120s diff --git a/.github/workflows/zxc-unit-test.yaml b/.github/workflows/zxc-unit-test.yaml index 76a3d8ba32..42a4901843 100644 --- a/.github/workflows/zxc-unit-test.yaml +++ b/.github/workflows/zxc-unit-test.yaml @@ -88,16 +88,16 @@ jobs: uses: azure/setup-helm@1a275c3b69536ee54be43f2070a358922e12c8d4 # v4.3.1 if: ${{ runner.os == 'linux' }} with: - version: "v3.12.3" # helm version + version: "v4.0.4" # helm version - name: Setup Kind uses: helm/kind-action@92086f6be054225fa813e0a4b13787fc9088faab # v1.13.0 if: ${{ runner.os == 'linux' }} with: install_only: true - node_image: kindest/node:v1.31.4@sha256:2cb39f7295fe7eafee0842b1052a599a4fb0f8bcf3f83d96c7f4864c357c6c30 - version: v0.26.0 - kubectl_version: v1.31.4 + node_image: kindest/node:v1.33.7@sha256:d26ef333bdb2cbe9862a0f7c3803ecc7b4303d8cea8e814b481b09949d353040 + version: v0.31.0 + kubectl_version: v1.34.0 verbosity: 3 wait: 120s diff --git a/docs/site/content/en/docs/solo-ci-workflow.md b/docs/site/content/en/docs/solo-ci-workflow.md index 3a14ca6f80..b08ccb08f2 100644 --- a/docs/site/content/en/docs/solo-ci-workflow.md +++ b/docs/site/content/en/docs/solo-ci-workflow.md @@ -46,9 +46,9 @@ Next, install Kind to create and manage a local Kubernetes cluster in your workf uses: helm/kind-action@a1b0e391336a6ee6713a0583f8c6240d70863de3 with: install_only: true - node_image: kindest/node:v1.31.4@sha256:2cb39f7295fe7eafee0842b1052a599a4fb0f8bcf3f83d96c7f4864c357c6c30 - version: v0.26.0 - kubectl_version: v1.31.4 + node_image: kindest/node:v1.33.7@sha256:d26ef333bdb2cbe9862a0f7c3803ecc7b4303d8cea8e814b481b09949d353040 + version: v0.31.0 + kubectl_version: v1.34.0 verbosity: 3 wait: 120s ``` @@ -109,9 +109,9 @@ Here’s the full workflow combining all the steps above: uses: helm/kind-action@a1b0e391336a6ee6713a0583f8c6240d70863de3 with: install_only: true - node_image: kindest/node:v1.31.4@sha256:2cb39f7295fe7eafee0842b1052a599a4fb0f8bcf3f83d96c7f4864c357c6c30 - version: v0.26.0 - kubectl_version: v1.31.4 + node_image: kindest/node:v1.33.7@sha256:d26ef333bdb2cbe9862a0f7c3803ecc7b4303d8cea8e814b481b09949d353040 + version: v0.31.0 + kubectl_version: v1.34.0 verbosity: 3 wait: 120s @@ -138,5 +138,3 @@ Here’s the full workflow combining all the steps above: kind create cluster -n "${SOLO_CLUSTER_NAME}" solo one-shot single deploy | tee solo-deploy.log ``` - - diff --git a/test/e2e/commands/tests/base-command-test.ts b/test/e2e/commands/tests/base-command-test.ts index ef7ad5429f..5bfcf63e16 100644 --- a/test/e2e/commands/tests/base-command-test.ts +++ b/test/e2e/commands/tests/base-command-test.ts @@ -11,6 +11,7 @@ import {DeploymentCommandDefinition} from '../../../../src/commands/command-defi import {Argv} from '../../../helpers/argv-wrapper.js'; import {NamespaceName} from '../../../../src/types/namespace/namespace-name.js'; import {type SoloLogger} from '../../../../src/core/logging/solo-logger.js'; +import {getEnvironmentVariable} from '../../../../src/core/constants.js'; export class BaseCommandTest { public static newArgv(): string[] { @@ -29,7 +30,8 @@ export class BaseCommandTest { ): string[] { argv.push(BaseCommandTest.optionFromFlag(Flags.devMode), BaseCommandTest.optionFromFlag(Flags.quiet)); - if (shouldSetChartDirectory && process.env.SOLO_CHARTS_DIR && process.env.SOLO_CHARTS_DIR !== '') { + const soloChartsDirectory: string = getEnvironmentVariable('SOLO_CHARTS_DIR'); + if (shouldSetChartDirectory && soloChartsDirectory && soloChartsDirectory !== '') { argv.push(BaseCommandTest.optionFromFlag(Flags.chartDirectory), process.env.SOLO_CHARTS_DIR); } diff --git a/test/e2e/dual-cluster/setup-dual-e2e.sh b/test/e2e/dual-cluster/setup-dual-e2e.sh index c057919f93..05f23546bd 100755 --- a/test/e2e/dual-cluster/setup-dual-e2e.sh +++ b/test/e2e/dual-cluster/setup-dual-e2e.sh @@ -6,7 +6,7 @@ SCRIPT_PATH=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd) readonly SCRIPT_PATH readonly CLUSTER_DIAGNOSTICS_PATH="${SCRIPT_PATH}/diagnostics/cluster" -readonly KIND_IMAGE="kindest/node:v1.31.4@sha256:2cb39f7295fe7eafee0842b1052a599a4fb0f8bcf3f83d96c7f4864c357c6c30" +readonly KIND_IMAGE="kindest/node:v1.33.7@sha256:d26ef333bdb2cbe9862a0f7c3803ecc7b4303d8cea8e814b481b09949d353040" echo "SOLO_CHARTS_DIR: ${SOLO_CHARTS_DIR}" export PATH=${PATH}:~/.solo/bin @@ -25,12 +25,28 @@ elif [[ "${SOLO_CLUSTER_DUALITY}" -gt 2 ]]; then SOLO_CLUSTER_DUALITY=2 fi +KIND_VERSION=$(kind --version | awk '{print $3}') +echo "Using Kind version: ${KIND_VERSION}" +DOCKER_VERSION=$(docker --version | awk '{print $3}' | sed 's/,//') +echo "Using Docker version: ${DOCKER_VERSION}" +HELM_VERSION=$(helm version --short | sed 's/v//') +echo "Using Helm version: ${HELM_VERSION}" +KUBECTL_VERSION=$(kubectl version --client=true | grep Client | awk '{print $3}' | sed 's/v//') +echo "Using Kubectl version: ${KUBECTL_VERSION}" +TASK_VERSION=$(task --version | awk '{print $3}') +echo "Using Task version: ${TASK_VERSION}" +NODE_VERSION=$(node --version | sed 's/v//') +echo "Using Node version: ${NODE_VERSION}" +NPM_VERSION=$(npm --version) +echo "Using NPM version: ${NPM_VERSION}" + for i in $(seq 1 "${SOLO_CLUSTER_DUALITY}"); do kind delete cluster -n "${SOLO_CLUSTER_NAME}-c${i}" || true done docker network rm -f kind || true docker network create kind --scope local --subnet 172.19.0.0/16 --driver bridge +docker info | grep -i cgroup # Setup Helm Repos helm repo add metrics-server https://kubernetes-sigs.github.io/metrics-server/ diff --git a/test/unit/core/helm/software/helm-software-loader.test.ts b/test/unit/core/helm/software/helm-software-loader.test.ts index 4d0498d2d8..4fff57cfa1 100644 --- a/test/unit/core/helm/software/helm-software-loader.test.ts +++ b/test/unit/core/helm/software/helm-software-loader.test.ts @@ -5,21 +5,22 @@ import {describe, it} from 'mocha'; import {platform, arch} from 'node:os'; import {existsSync} from 'node:fs'; import {execSync} from 'node:child_process'; +import {gte} from 'semver'; import {SemanticVersion} from '../../../../../src/integration/helm/base/api/version/semantic-version.js'; import {HelmSoftwareLoader} from '../../../../../src/integration/helm/resource/helm-software-loader.js'; -describe('Helm Software Loader Test', () => { - const currentPlatform = platform(); - const currentArch = arch(); +describe('Helm Software Loader Test', (): void => { + const currentPlatform: NodeJS.Platform = platform(); + const currentArch: string = arch(); - const supportedPlatforms = { + const supportedPlatforms: {linux: string[]; darwin: string[]; win32: string[]} = { linux: ['x64', 'arm64'], darwin: ['x64', 'arm64'], win32: ['x64'], }; - const installHelmAndVerify = async () => { - const helmPath = await HelmSoftwareLoader.getHelmExecutablePath(); + const installHelmAndVerify: () => Promise = async (): Promise => { + const helmPath: string = await HelmSoftwareLoader.getHelmExecutablePath(); expect(helmPath).to.not.be.null; expect(existsSync(helmPath)).to.be.true; @@ -31,7 +32,7 @@ describe('Helm Software Loader Test', () => { } // Check filename - const expectedFilename = currentPlatform === 'win32' ? 'helm.exe' : 'helm'; + const expectedFilename: string = currentPlatform === 'win32' ? 'helm.exe' : 'helm'; expect(helmPath.endsWith(expectedFilename)).to.be.true; // Check version @@ -47,11 +48,10 @@ describe('Helm Software Loader Test', () => { helmVersion = helmVersion.slice(1); } - const actualVersion = SemanticVersion.parse(helmVersion); + const actualVersion: SemanticVersion = SemanticVersion.parse(helmVersion); + const minimumVersion: SemanticVersion = SemanticVersion.parse('3.12.0'); expect(actualVersion).to.not.be.null; - expect(actualVersion.major).to.be.greaterThanOrEqual(3); - expect(actualVersion.minor).to.be.greaterThanOrEqual(12); - expect(actualVersion.patch).to.be.greaterThanOrEqual(0); + expect(gte(actualVersion.toString(), minimumVersion.toString())).to.be.true; }; // Run tests only if current platform/arch is supported @@ -59,7 +59,7 @@ describe('Helm Software Loader Test', () => { currentPlatform in supportedPlatforms && supportedPlatforms[currentPlatform as keyof typeof supportedPlatforms].includes(currentArch) ) { - it(`${currentPlatform}: Install Supported Helm Version`, async () => { + it(`${currentPlatform}: Install Supported Helm Version`, async (): Promise => { await installHelmAndVerify(); }); }