Skip to content

Commit

Permalink
Merge pull request rancher#10087 from izaac/jenkins_dashboard_version…
Browse files Browse the repository at this point in the history
…_fix

[Automation] - Use the latest Rancher chart to use during the Rancher installation when the Jenkins job is recurring.
  • Loading branch information
izaac authored Nov 29, 2023
2 parents 80762b5 + 5450888 commit 08fcccc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
1 change: 0 additions & 1 deletion cypress/jenkins/Jenkinsfile_multi
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ node {
string(name: 'DASHBOARD_BRANCH', value: "${DASHBOARD_BRANCH}"),
string(name: 'CYPRESS_TAGS', value: ct),
string(name: 'RANCHER_HOST', value: ""),
string(name: 'RANCHER_VERSION', value: "${RANCHER_VERSION}"),
string(name: 'RANCHER_USERNAME', value: "${RANCHER_USERNAME}"),
string(name: 'RANCHER_PASSWORD', value: "${RANCHER_PASSWORD}"),
string(name: 'RKE2_KUBERNETES_VERSION', value: "${RKE2_KUBERNETES_VERSION}"),
Expand Down
11 changes: 8 additions & 3 deletions cypress/jenkins/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,14 @@ corral config vars set volume_iops ${AWS_VOLUME_IOPS}

if [[ "${JOB_TYPE}" == "recurring" ]]; then
RANCHER_TYPE="recurring"
if [[ -n "${RANCHER_IMAGE_TAG}" ]]; then
curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
helm repo add rancher-latest https://releases.rancher.com/server-charts/latest
helm repo update
version_string=$(echo "${RANCHER_IMAGE_TAG}" | cut -f1 -d"-")
RANCHER_VERSION=$(helm search repo rancher-latest --devel --versions | grep ${version_string} | head -n 1 | cut -f2 | tr -d '[:space:]')
corral config vars set rancher_image_tag ${RANCHER_IMAGE_TAG}
fi
cd "${WORKSPACE}/corral-packages"
yq -i e ".variables.rancher_version += [\"${RANCHER_VERSION}\"] | .variables.rancher_version style=\"literal\"" packages/aws/rancher.yaml
yq -i e ".variables.kubernetes_version += [\"${RKE2_KUBERNETES_VERSION}\"] | .variables.kubernetes_version style=\"literal\"" packages/aws/rancher.yaml
Expand All @@ -90,9 +98,6 @@ if [[ "${JOB_TYPE}" == "recurring" ]]; then

corral config vars set bootstrap_password ${BOOTSTRAP_PASSWORD:-password}
corral config vars set aws_route53_zone ${AWS_ROUTE53_ZONE}
if [[ -n "${RANCHER_IMAGE_TAG}" ]]; then
corral config vars set rancher_image_tag ${RANCHER_IMAGE_TAG}
fi
corral config vars set server_count ${SERVER_COUNT:-3}
corral config vars set agent_count ${AGENT_COUNT:-0}
corral config vars set instance_type ${AWS_INSTANCE_TYPE}
Expand Down

0 comments on commit 08fcccc

Please sign in to comment.