Skip to content

Commit 7df6ef7

Browse files
authored
Merge pull request #17059 from izaac/imported_cluster_kubeconfig_fix
Automation: Jenkins fix when handling complex variable values with corral
2 parents ed4c18e + 18c9635 commit 7df6ef7

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

cypress/jenkins/init.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -235,16 +235,16 @@ create_test_clusters() {
235235
clean_corral config vars set bastion_ip ""
236236

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

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

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

383-
if clean_corral vars importcluster kubeconfig >/dev/null 2>&1; then
384-
export IMPORTED_KUBECONFIG=$(clean_corral vars importcluster kubeconfig)
383+
if corral vars importcluster kubeconfig >/dev/null 2>&1; then
384+
export IMPORTED_KUBECONFIG=$(corral vars importcluster kubeconfig)
385385
fi
386386

387387
bash "cypress/jenkins/run.sh"

0 commit comments

Comments
 (0)