Skip to content

Commit

Permalink
Merge branch 'master' into renovate/master-patch-digest-dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
khushboo-rancher authored May 8, 2024
2 parents 20bcecf + f7a2ea2 commit 4e5dc78
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
5 changes: 5 additions & 0 deletions pipelines/rancher/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,15 @@ def REGISTRY_PASSWORD
// parameter for hdd test
def USE_HDD = params.USE_HDD ? params.USE_HDD : false

def RANCHER_PRIME = params.RANCHER_PRIME ? params.RANCHER_PRIME : false

node {

withCredentials([
usernamePassword(credentialsId: CREDS_ID, passwordVariable: 'AWS_SECRET_KEY', usernameVariable: 'AWS_ACCESS_KEY'),
string(credentialsId: 'DO_CREDS', variable: 'DO_TOKEN'),
string(credentialsId: REGISTRATION_CODE_ID, variable: 'REGISTRATION_CODE'),
string(credentialsId: 'RANCHER_PRIME_CHART_URL', variable: 'RANCHER_PRIME_CHART_URL'),
]) {

if (params.SEND_SLACK_NOTIFICATION) {
Expand Down Expand Up @@ -109,6 +112,8 @@ node {
--env TF_VAR_selinux_mode=${SELINUX_MODE} \
--env TF_VAR_registration_code=${REGISTRATION_CODE} \
--env TF_VAR_cis_hardening=${CIS_HARDENING} \
--env RANCHER_PRIME=${RANCHER_PRIME} \
--env RANCHER_PRIME_CHART_URL=${RANCHER_PRIME_CHART_URL} \
${imageName}
"""
}
Expand Down
1 change: 0 additions & 1 deletion pipelines/rancher/scripts/longhorn-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ main(){
install_rancher
get_rancher_api_key


if [[ "${LONGHORN_UPGRADE_TEST}" == true ]]; then
install_longhorn_rancher_chart "${LONGHORN_STABLE_VERSION}"
LONGHORN_UPGRADE_TYPE="from_stable"
Expand Down
10 changes: 8 additions & 2 deletions pipelines/utilities/longhorn_rancher_chart.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,18 @@ install_rancher() {
kubectl get pods --namespace cert-manager

helm repo add rancher-latest https://releases.rancher.com/server-charts/latest
helm repo add rancher-prime "${RANCHER_PRIME_CHART_URL}"
helm repo update
kubectl create namespace cattle-system
if [[ "${RANCHER_PRIME}" == true ]]; then
RANCHER_TYPE="prime"
else
RANCHER_TYPE="latest"
fi
if [[ -z "${RANCHER_VERSION}" ]]; then
RANCHER_VERSION=$(helm search repo rancher-latest/rancher -o yaml | yq .[0].version)
RANCHER_VERSION=$(helm search repo "rancher-${RANCHER_TYPE}/rancher" -o yaml | yq .[0].version)
fi
helm install rancher rancher-latest/rancher --version "${RANCHER_VERSION}" --namespace cattle-system --set bootstrapPassword="${RANCHER_BOOTSTRAP_PASSWORD}" --set hostname="${RANCHER_HOSTNAME}" --set replicas=3 --set ingress.tls.source=letsEncrypt --set letsEncrypt.email=yang.chiu@suse.com
helm install rancher "rancher-${RANCHER_TYPE}/rancher" --version "${RANCHER_VERSION}" --namespace cattle-system --set bootstrapPassword="${RANCHER_BOOTSTRAP_PASSWORD}" --set hostname="${RANCHER_HOSTNAME}" --set replicas=3 --set ingress.tls.source=letsEncrypt --set letsEncrypt.email=yang.chiu@suse.com
kubectl -n cattle-system rollout status deploy/rancher
}

Expand Down

0 comments on commit 4e5dc78

Please sign in to comment.