-
Notifications
You must be signed in to change notification settings - Fork 94
/
Copy pathsmoke_test.sh
executable file
·50 lines (42 loc) · 1.83 KB
/
smoke_test.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/bin/bash
set -ex
IMAGE="quay.io/redhat-services-prod/cost-mgmt-dev-tenant/koku"
APP_NAME="hccm" # name of app-sre "application" folder this component lives in
COMPONENT_NAME="koku" # name of app-sre "resourceTemplate" in deploy.yaml for this component
COMPONENTS="hive-metastore koku trino" # specific components to deploy (optional, default: all)
IQE_PLUGINS="cost_management"
IQE_MARKER_EXPRESSION="cost_smoke"
IQE_FILTER_EXPRESSION=""
IQE_CJI_TIMEOUT="5h"
IQE_PARALLEL_ENABLED="false"
IQE_ENV_VARS="JOB_NAME=${JOB_NAME},BUILD_NUMBER=${BUILD_NUMBER}"
# Get bonfire helper scripts
CICD_URL="https://raw.githubusercontent.com/RedHatInsights/cicd-tools/main"
rm -f .cicd_bootstrap.sh
curl -s $CICD_URL/bootstrap.sh > .cicd_bootstrap.sh && source .cicd_bootstrap.sh
# Smoke tests
source ${CICD_ROOT}/_common_deploy_logic.sh
set -x
export BONFIRE_NS_REQUESTER="${JOB_NAME}-${BUILD_NUMBER}"
export NAMESPACE=$(bonfire namespace reserve --duration 6h)
SMOKE_NAMESPACE=$NAMESPACE
oc get secret koku-aws -o yaml -n ephemeral-base | grep -v '^\s*namespace:\s' | oc apply --namespace=${NAMESPACE} -f -
oc get secret koku-gcp -o yaml -n ephemeral-base | grep -v '^\s*namespace:\s' | oc apply --namespace=${NAMESPACE} -f -
oc get secret koku-oci -o yaml -n ephemeral-base | grep -v '^\s*namespace:\s' | oc apply --namespace=${NAMESPACE} -f -
IQE_IBUTSU_SOURCE="cost-ephemeral-${IMAGE_TAG}"
bonfire deploy \
${APP_NAME} \
--source=appsre \
--ref-env ${REF_ENV} \
--set-template-ref ${COMPONENT_NAME}=${GIT_COMMIT} \
--set-image-tag ${IMAGE}=${IMAGE_TAG} \
--namespace ${NAMESPACE} \
--timeout ${DEPLOY_TIMEOUT} \
--optional-deps-method hybrid \
--no-single-replicas \
--set-parameter rbac/MIN_REPLICAS=1 \
${COMPONENTS_ARG} \
${COMPONENTS_RESOURCES_ARG} \
${EXTRA_DEPLOY_ARGS}
set +x
source $CICD_ROOT/cji_smoke_test.sh