Skip to content
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
5 changes: 5 additions & 0 deletions .github/workflows/branch-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,9 @@ jobs:
name: Integration tests
runs-on: ubuntu-latest
needs: [ entry-tests, build-app, build-tests ]
strategy:
matrix:
cluster: [ kind, k3d ]
permissions:
contents: read
steps:
Expand All @@ -282,6 +285,8 @@ jobs:
ARTIFACTS: "output/"
DISABLE_MONITORING_INSTALLATION: "true"
CAPACT_BINARY: "./capact"
CLUSTER_TYPE: ${{ matrix.cluster }}
DISABLE_K3D_REGISTRY: "true"
run: |
make test-integration
- name: Upload artifacts
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/pr-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,9 @@ jobs:
runs-on: ubuntu-latest
if: github.event.pull_request.draft == false
needs: [ push-apps, push-tests, build-cli ]
strategy:
matrix:
cluster: [ kind, k3d ]
permissions:
contents: read
env:
Expand Down Expand Up @@ -497,6 +500,8 @@ jobs:
BUILD_IMAGES: "false"
ARTIFACTS: "output/"
DISABLE_MONITORING_INSTALLATION: "true"
CLUSTER_TYPE: ${{ matrix.cluster }}
DISABLE_K3D_REGISTRY: "true"
run: |
make test-integration
- name: Upload artifacts
Expand Down
1 change: 1 addition & 0 deletions hack/lib/const.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ readonly CAPACT_NAMESPACE="capact-system"
readonly CAPACT_RELEASE_NAME="capact"
readonly DEV_CLUSTER_NAME="dev-capact"
readonly KIND_CI_CLUSTER_NAME="kind-ci-capact"
readonly K3D_CI_CLUSTER_NAME="k3d-ci-capact"

#
# OCF
Expand Down
16 changes: 12 additions & 4 deletions hack/test-integration.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
#
# This script provisions testing environment using 'kind'(kubernetes-in-docker)
# This script provisions testing environment using 'kind'(kubernetes-in-docker) or 'k3d' (Rancher Lab's minimal Kubernetes distribution)
# and execute end-to-end Capact tests.
#
# It requires Docker to be installed.
Expand All @@ -23,6 +23,8 @@ source "${CURRENT_DIR}/lib/utilities.sh" || { echo 'Cannot load CI utilities.';
# shellcheck source=./hack/lib/const.sh
source "${CURRENT_DIR}/lib/const.sh" || { echo 'Cannot load constant values.'; exit 1; }

CLUSTER_TYPE=${CLUSTER_TYPE:-"kind"}

SKIP_DEPS_INSTALLATION=${SKIP_DEPS_INSTALLATION:-true}

DUMP_CLUSTER_INFO="${DUMP_CLUSTER_INFO:-false}"
Expand Down Expand Up @@ -58,15 +60,21 @@ main() {
export HELM_VERSION=${STABLE_HELM_VERSION}
host::install::helm
else
echo "Skipping kind and helm installation cause SKIP_DEPS_INSTALLATION is set to true."
echo "Skipping $CLUSTER_TYPE and helm installation cause SKIP_DEPS_INSTALLATION is set to true."
fi


export REPO_DIR=$REPO_ROOT_DIR
export CLUSTER_TYPE=${CLUSTER_TYPE:-"kind"}
export CLUSTER_TYPE

export KUBECONFIG="${TMP_DIR}/kubeconfig"
export CLUSTER_NAME=${CLUSTER_NAME:-${KIND_CI_CLUSTER_NAME}}

if [ "$CLUSTER_TYPE" == "kind" ]; then
export CLUSTER_NAME=${CLUSTER_NAME:-${KIND_CI_CLUSTER_NAME}}
else
export CLUSTER_NAME=${CLUSTER_NAME:-${K3D_CI_CLUSTER_NAME}}
fi

export HELM_VERSION=${STABLE_HELM_VERSION}
capact::create_cluster

Expand Down