-
Notifications
You must be signed in to change notification settings - Fork 11
/
pr_check.sh
executable file
·56 lines (46 loc) · 2.31 KB
/
pr_check.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
51
52
53
54
55
56
#!/bin/bash
# --------------------------------------------
# Options that must be configured by app owner
# --------------------------------------------
APP_NAME="ccx-data-pipeline" # name of app-sre "application" folder this component lives in
COMPONENT_NAME="ccx-notification-service" # name of app-sre "resourceTemplate" in deploy.yaml for this component
IMAGE="quay.io/cloudservices/ccx-notification-service"
COMPONENTS="ccx-data-pipeline ccx-insights-results dvo-writer ccx-smart-proxy ccx-notification-writer ccx-notification-service ccx-notification-db-cleaner notifications-backend notifications-aggregator notifications-engine insights-content-service ccx-mock-ams ccx-upgrades-sso-mock insights-content-template-renderer ccx-redis" # space-separated list of components to load
COMPONENTS_W_RESOURCES="ccx-notification-service" # component to keep
CACHE_FROM_LATEST_IMAGE="true"
DEPLOY_FRONTENDS="false"
# Set the correct images for pull requests.
# pr_check in pull requests still uses the old cloudservices images
EXTRA_DEPLOY_ARGS="--set-parameter ccx-notification-service/IMAGE=quay.io/cloudservices/ccx-notification-service"
# notifications-engine needs to be run with the CPU/memory requested in its
# ClowdApp template and not the default values, so we need to add this extra
# argument. Otherwise, the test timesout.
EXTRA_DEPLOY_ARGS="${EXTRA_DEPLOY_ARGS} --no-remove-resources notifications-engine"
export IQE_PLUGINS="ccx"
export IQE_MARKER_EXPRESSION="notifications or servicelog"
export IQE_FILTER_EXPRESSION=""
export IQE_REQUIREMENTS_PRIORITY=""
export IQE_TEST_IMPORTANCE=""
export IQE_CJI_TIMEOUT="30m"
export IQE_SELENIUM="false"
export IQE_ENV="ephemeral"
export IQE_ENV_VARS="DYNACONF_USER_PROVIDER__rbac_enabled=false"
function build_image() {
source $CICD_ROOT/build.sh
}
function deploy_ephemeral() {
source $CICD_ROOT/deploy_ephemeral_env.sh
}
function run_smoke_tests() {
source $CICD_ROOT/cji_smoke_test.sh
source $CICD_ROOT/post_test_results.sh # publish results in Ibutsu
}
# Install bonfire repo/initialize
CICD_URL=https://raw.githubusercontent.com/RedHatInsights/bonfire/master/cicd
curl -s $CICD_URL/bootstrap.sh > .cicd_bootstrap.sh && source .cicd_bootstrap.sh
echo "creating PR image"
build_image
echo "deploying to ephemeral"
deploy_ephemeral
echo "running PR smoke tests"
run_smoke_tests