Skip to content

Commit

Permalink
Fix bash
Browse files Browse the repository at this point in the history
  • Loading branch information
zdrapela committed Dec 9, 2024
1 parent a1bc12f commit 36ccc0e
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 6 deletions.
3 changes: 2 additions & 1 deletion .ibm/pipelines/cluster/aks/az.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ az_aks_approuting_enable() {
local name=$1
local resource_group=$2
set +xe
local output=$(az aks approuting enable --name $name --resource-group $resource_group 2>&1 | sed 's/^ERROR: //')
local output
output=$(az aks approuting enable --name $name --resource-group $resource_group 2>&1 | sed 's/^ERROR: //')
set -xe
exit_status=$?

Expand Down
4 changes: 2 additions & 2 deletions .ibm/pipelines/cluster/aks/deployment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ initiate_aks_deployment() {
# Renable when namespace termination issue is solved
# install_tekton_pipelines
uninstall_helmchart "${NAME_SPACE_K8S}" "${RELEASE_NAME}"
cd "${DIR}"
cd "${DIR}" || exit
apply_yaml_files "${DIR}" "${NAME_SPACE_K8S}"
yq_merge_value_files "${DIR}/value_files/${HELM_CHART_VALUE_FILE_NAME}" "${DIR}/value_files/${HELM_CHART_AKS_DIFF_VALUE_FILE_NAME}" "/tmp/${HELM_CHART_K8S_MERGED_VALUE_FILE_NAME}"
mkdir -p "${ARTIFACT_DIR}/${NAME_SPACE_K8S}"
Expand All @@ -27,7 +27,7 @@ initiate_rbac_aks_deployment() {
# Renable when namespace termination issue is solved
# install_tekton_pipelines
uninstall_helmchart "${NAME_SPACE_RBAC_K8S}" "${RELEASE_NAME_RBAC}"
cd "${DIR}"
cd "${DIR}" || exit
apply_yaml_files "${DIR}" "${NAME_SPACE_RBAC_K8S}"
yq_merge_value_files "${DIR}/value_files/${HELM_CHART_RBAC_VALUE_FILE_NAME}" "${DIR}/value_files/${HELM_CHART_RBAC_AKS_DIFF_VALUE_FILE_NAME}" "/tmp/${HELM_CHART_RBAC_K8S_MERGED_VALUE_FILE_NAME}"
mkdir -p "${ARTIFACT_DIR}/${NAME_SPACE_RBAC_K8S}"
Expand Down
4 changes: 2 additions & 2 deletions .ibm/pipelines/cluster/gke/deployment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ initiate_gke_deployment() {
# Renable when namespace termination issue is solved
# install_tekton_pipelines
uninstall_helmchart "${NAME_SPACE_K8S}" "${RELEASE_NAME}"
cd "${DIR}"
cd "${DIR}" || exit
apply_yaml_files "${DIR}" "${NAME_SPACE_K8S}"
oc apply -f "${DIR}/cluster/gke/frontend-config.yaml" --namespace="${project}"
yq_merge_value_files "${DIR}/value_files/${HELM_CHART_VALUE_FILE_NAME}" "${DIR}/value_files/${HELM_CHART_GKE_DIFF_VALUE_FILE_NAME}" "/tmp/${HELM_CHART_K8S_MERGED_VALUE_FILE_NAME}"
Expand All @@ -31,7 +31,7 @@ initiate_rbac_gke_deployment() {
# Renable when namespace termination issue is solved
# install_tekton_pipelines
uninstall_helmchart "${NAME_SPACE_RBAC_K8S}" "${RELEASE_NAME_RBAC}"
cd "${DIR}"
cd "${DIR}" || exit
apply_yaml_files "${DIR}" "${NAME_SPACE_RBAC_K8S}"
yq_merge_value_files "${DIR}/value_files/${HELM_CHART_RBAC_VALUE_FILE_NAME}" "${DIR}/value_files/${HELM_CHART_RBAC_GKE_DIFF_VALUE_FILE_NAME}" "/tmp/${HELM_CHART_RBAC_K8S_MERGED_VALUE_FILE_NAME}"
mkdir -p "${ARTIFACT_DIR}/${NAME_SPACE_RBAC_K8S}"
Expand Down
3 changes: 2 additions & 1 deletion .ibm/pipelines/cluster/gke/gcloud.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ gcloud_ssl_cert_create() {

# Capture both stdout and stderr
set +xe
local output=$(gcloud compute ssl-certificates create "${cert_name}" --domains="${domain}" --project="${project}" --global 2>&1)
local output
output=$(gcloud compute ssl-certificates create "${cert_name}" --domains="${domain}" --project="${project}" --global 2>&1)
set -xe

# Check the return status
Expand Down
1 change: 1 addition & 0 deletions .ibm/pipelines/jobs/aks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ handle_aks() {
API_SERVER_URL=$(oc whoami --show-server)
ENCODED_API_SERVER_URL=$(echo "${API_SERVER_URL}" | base64)
ENCODED_CLUSTER_NAME=$(echo "my-cluster" | base64)
export API_SERVER_URL ENCODED_API_SERVER_URL ENCODED_CLUSTER_NAME

set_github_app_3_credentials

Expand Down
1 change: 1 addition & 0 deletions .ibm/pipelines/jobs/gke.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ handle_gke() {
API_SERVER_URL=$(oc whoami --show-server)
ENCODED_API_SERVER_URL=$(echo "${API_SERVER_URL}" | base64)
ENCODED_CLUSTER_NAME=$(echo "my-cluster" | base64)
export API_SERVER_URL ENCODED_API_SERVER_URL ENCODED_CLUSTER_NAME

set_github_app_3_credentials

Expand Down

0 comments on commit 36ccc0e

Please sign in to comment.