Skip to content

Commit

Permalink
chore(ci): fix gke and aks value-file artifact (#1971)
Browse files Browse the repository at this point in the history
  • Loading branch information
zdrapela authored Nov 21, 2024
1 parent c0ea7d0 commit 16fbae2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions .ibm/pipelines/cluster/aks/deployment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ initiate_aks_deployment() {
cd "${DIR}"
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}"
cp -a "/tmp/${HELM_CHART_K8S_MERGED_VALUE_FILE_NAME}" "${ARTIFACT_DIR}/${NAME_SPACE_K8S}" # Save the final value-file into the artifacts directory.
mkdir -p "${ARTIFACT_DIR}/${NAME_SPACE_K8S}"
cp -a "/tmp/${HELM_CHART_K8S_MERGED_VALUE_FILE_NAME}" "${ARTIFACT_DIR}/${NAME_SPACE_K8S}/" # Save the final value-file into the artifacts directory.
echo "Deploying image from repository: ${QUAY_REPO}, TAG_NAME: ${TAG_NAME}, in NAME_SPACE: ${NAME_SPACE_K8S}"
helm upgrade -i "${RELEASE_NAME}" -n "${NAME_SPACE_K8S}" "${HELM_REPO_NAME}/${HELM_IMAGE_NAME}" --version "${CHART_VERSION}" \
-f "/tmp/${HELM_CHART_K8S_MERGED_VALUE_FILE_NAME}" \
Expand All @@ -29,7 +30,8 @@ initiate_rbac_aks_deployment() {
cd "${DIR}"
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}"
cp -a "/tmp/${HELM_CHART_RBAC_K8S_MERGED_VALUE_FILE_NAME}" "${ARTIFACT_DIR}/${NAME_SPACE_RBAC_K8S}" # Save the final value-file into the artifacts directory.
mkdir -p "${ARTIFACT_DIR}/${NAME_SPACE_RBAC_K8S}"
cp -a "/tmp/${HELM_CHART_RBAC_K8S_MERGED_VALUE_FILE_NAME}" "${ARTIFACT_DIR}/${NAME_SPACE_RBAC_K8S}/" # Save the final value-file into the artifacts directory.
echo "Deploying image from repository: ${QUAY_REPO}, TAG_NAME: ${TAG_NAME}, in NAME_SPACE: ${NAME_SPACE_RBAC_K8S}"
helm upgrade -i "${RELEASE_NAME_RBAC}" -n "${NAME_SPACE_RBAC_K8S}" "${HELM_REPO_NAME}/${HELM_IMAGE_NAME}" --version "${CHART_VERSION}" \
-f "/tmp/${HELM_CHART_RBAC_K8S_MERGED_VALUE_FILE_NAME}" \
Expand Down
6 changes: 4 additions & 2 deletions .ibm/pipelines/cluster/gke/deployment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ initiate_gke_deployment() {
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}"
cp -a "/tmp/${HELM_CHART_K8S_MERGED_VALUE_FILE_NAME}" "${ARTIFACT_DIR}/${NAME_SPACE_K8S}" # Save the final value-file into the artifacts directory.
mkdir -p "${ARTIFACT_DIR}/${NAME_SPACE_K8S}"
cp -a "/tmp/${HELM_CHART_K8S_MERGED_VALUE_FILE_NAME}" "${ARTIFACT_DIR}/${NAME_SPACE_K8S}/" # Save the final value-file into the artifacts directory.
echo "Deploying image from repository: ${QUAY_REPO}, TAG_NAME: ${TAG_NAME}, in NAME_SPACE: ${NAME_SPACE_K8S}"
helm upgrade -i "${RELEASE_NAME}" -n "${NAME_SPACE_K8S}" "${HELM_REPO_NAME}/${HELM_IMAGE_NAME}" --version "${CHART_VERSION}" \
-f "/tmp/${HELM_CHART_K8S_MERGED_VALUE_FILE_NAME}" \
Expand All @@ -33,7 +34,8 @@ initiate_rbac_gke_deployment() {
cd "${DIR}"
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}"
cp -a "/tmp/${HELM_CHART_RBAC_K8S_MERGED_VALUE_FILE_NAME}" "${ARTIFACT_DIR}/${NAME_SPACE_RBAC_K8S}" # Save the final value-file into the artifacts directory.
mkdir -p "${ARTIFACT_DIR}/${NAME_SPACE_RBAC_K8S}"
cp -a "/tmp/${HELM_CHART_RBAC_K8S_MERGED_VALUE_FILE_NAME}" "${ARTIFACT_DIR}/${NAME_SPACE_RBAC_K8S}/" # Save the final value-file into the artifacts directory.
echo "Deploying image from repository: ${QUAY_REPO}, TAG_NAME: ${TAG_NAME}, in NAME_SPACE: ${NAME_SPACE_RBAC_K8S}"
helm upgrade -i "${RELEASE_NAME_RBAC}" -n "${NAME_SPACE_RBAC_K8S}" "${HELM_REPO_NAME}/${HELM_IMAGE_NAME}" --version "${CHART_VERSION}" \
-f "/tmp/${HELM_CHART_RBAC_K8S_MERGED_VALUE_FILE_NAME}" \
Expand Down

0 comments on commit 16fbae2

Please sign in to comment.