Skip to content

Commit

Permalink
Refactor periodic pipeline to include sanity plugins check
Browse files Browse the repository at this point in the history
Reintegrates the "add_sanity_plugins_check" step into the periodic pipeline.

Signed-off-by: Gustavo Lira <guga.java@gmail.com>
  • Loading branch information
gustavolira committed Jan 25, 2025
1 parent 3793f81 commit 25f11d4
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
1 change: 1 addition & 0 deletions .ibm/pipelines/env_variables.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ NAME_SPACE_RBAC="${NAME_SPACE_RBAC:-showcase-rbac}"
NAME_SPACE_RUNTIME="${NAME_SPACE_RUNTIME:-showcase-runtime}"
NAME_SPACE_POSTGRES_DB="${NAME_SPACE_POSTGRES_DB:-postgress-external-db}"
NAME_SPACE_RDS="showcase-rds-nightly"
NAME_SPACE_SANITY_PLUGINS_CHECK="showcase-sanity-plugins"
OPERATOR_MANAGER='rhdh-operator'
CHART_VERSION="2.15.2"
GITHUB_APP_APP_ID=$(cat /tmp/secrets/GITHUB_APP_3_APP_ID)
Expand Down
14 changes: 11 additions & 3 deletions .ibm/pipelines/jobs/periodic.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ handle_nightly() {

cluster_setup
initiate_deployments
add_sanity_plugins_check
deploy_test_backstage_provider "${NAME_SPACE}"

run_standard_deployment_tests
run_rds_deployment_tests
# run_runtime_config_change_tests
add_sanity_plugins_check
run_runtime_config_change_tests

}

Expand Down Expand Up @@ -50,12 +50,20 @@ run_runtime_config_change_tests() {
}

add_sanity_plugins_check() {
configure_namespace "${NAME_SPACE_SANITY_PLUGINS_CHECK}"
uninstall_helmchart "${NAME_SPACE_SANITY_PLUGINS_CHECK}" "${RELEASE_NAME}"
oc apply -f "$DIR/resources/redis-cache/redis-deployment.yaml" --namespace="${NAME_SPACE_SANITY_PLUGINS_CHECK}"
local sanity_plugins_url="https://${RELEASE_NAME}-backstage-${NAME_SPACE_SANITY_PLUGINS_CHECK}.${K8S_CLUSTER_ROUTER_BASE}"
apply_yaml_files "${DIR}" "${NAME_SPACE_SANITY_PLUGINS_CHECK}" "${sanity_plugins_url}"

helm upgrade -i "${RELEASE_NAME}" \
-n "${NAME_SPACE}" "${HELM_REPO_NAME}/${HELM_IMAGE_NAME}" \
-n "${NAME_SPACE_SANITY_PLUGINS_CHECK}" "${HELM_REPO_NAME}/${HELM_IMAGE_NAME}" \
--version "${CHART_VERSION}" \
-f "${DIR}/value_files/${HELM_CHART_VALUE_FILE_NAME}" \
-f "${DIR}/value_files/sanity-check-plugins.yaml" \
--set global.clusterRouterBase="${K8S_CLUSTER_ROUTER_BASE}" \
--set upstream.backstage.image.repository="${QUAY_REPO}" \
--set upstream.backstage.image.tag="${TAG_NAME}"

check_and_test "${RELEASE_NAME}" "${NAME_SPACE_SANITY_PLUGINS_CHECK}" "${sanity_plugins_url}"
}
2 changes: 2 additions & 0 deletions .ibm/pipelines/openshift-ci-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ for SCRIPT in "${SCRIPTS[@]}"; do
echo "Loaded ${SCRIPT}"
done

export JOB_NAME=periodic

main() {
echo "Log file: ${LOGFILE}"
echo "JOB_NAME : $JOB_NAME"
Expand Down

0 comments on commit 25f11d4

Please sign in to comment.