Skip to content
Merged
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
12 changes: 6 additions & 6 deletions cypress/jenkins/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -235,16 +235,16 @@ create_test_clusters() {
clean_corral config vars set bastion_ip ""

clean_corral create --skip-cleanup --recreate customnode "dist/aws-t3a.xlarge"
export CUSTOM_NODE_IP="$(clean_corral vars customnode first_node_ip)"
export CUSTOM_NODE_KEY="$(clean_corral vars customnode corral_private_key | base64 -w 0)"
export CUSTOM_NODE_IP="$(corral vars customnode first_node_ip)"
export CUSTOM_NODE_KEY="$(corral vars customnode corral_private_key | base64 -w 0)"
clean_corral config vars set custom_node_ip "${CUSTOM_NODE_IP}"
clean_corral config vars set custom_node_key "${CUSTOM_NODE_KEY}"

clean_corral config vars set instance_type "${AWS_INSTANCE_TYPE}"
clean_corral config vars set aws_hostname_prefix "jenkins-${prefix_random}-i"
clean_corral config vars set server_count 1
clean_corral create --skip-cleanup --recreate importcluster "dist/aws-k3s-${K3S_KUBERNETES_VERSION}"
clean_corral config vars set imported_kubeconfig "$(clean_corral vars importcluster kubeconfig)"
clean_corral config vars set imported_kubeconfig "$(corral vars importcluster kubeconfig)"
}

# ============================================================================
Expand All @@ -264,7 +264,7 @@ wait_for_import_cluster() {
local max_attempts="${1:-12}"
echo "Waiting for import cluster API to be reachable (max ${max_attempts} attempts)..."
for i in $(seq 1 "${max_attempts}"); do
kubectl --kubeconfig <(clean_corral vars importcluster kubeconfig | base64 -d) get nodes &>/dev/null && return 0
kubectl --kubeconfig <(corral vars importcluster kubeconfig | base64 -d) get nodes &>/dev/null && return 0
echo " attempt $i/${max_attempts}..."
sleep 10
done
Expand Down Expand Up @@ -380,8 +380,8 @@ export CHROME_VERSION
export RANCHER_TYPE
export RANCHER_IMAGE_TAG="${RANCHER_IMAGE_TAG_FOR_CORRAL:-${RANCHER_IMAGE_TAG}}"

if clean_corral vars importcluster kubeconfig >/dev/null 2>&1; then
export IMPORTED_KUBECONFIG=$(clean_corral vars importcluster kubeconfig)
if corral vars importcluster kubeconfig >/dev/null 2>&1; then
export IMPORTED_KUBECONFIG=$(corral vars importcluster kubeconfig)
fi

bash "cypress/jenkins/run.sh"
Expand Down
Loading