Skip to content

Commit 09fddd4

Browse files
Update pr_check.sh for handling new and old backend pipelines
1 parent 1af8597 commit 09fddd4

File tree

2 files changed

+35
-12
lines changed

2 files changed

+35
-12
lines changed

clowdapp.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,6 @@ objects:
170170
key: client-secret
171171
optional: true
172172

173-
174173
- name: engine-result-processor
175174
replicas: ${{ENGINE_PROCESSOR_REPLICA_COUNT}}
176175
podSpec:

pr_check.sh

Lines changed: 35 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,52 @@
11
#!/bin/bash
22

3-
# --------------------------------------------
4-
# Options that must be configured by app owner
5-
# --------------------------------------------
6-
export APP_NAME="ros" # name of app-sre "application" folder this component lives in
7-
export COMPONENT_NAME="ros-backend" # name of app-sre "resourceTemplate" in deploy.yaml for this component
3+
export APP_NAME="ros"
4+
export COMPONENT_NAME="ros-backend"
85
export COMPONENTS="ros-backend"
96
export IMAGE="quay.io/cloudservices/ros-backend"
107
export DOCKERFILE="Dockerfile"
118

9+
echo "JOB_NAME: $JOB_NAME"
10+
echo "GitHub Comment: $ghprbCommentBody"
11+
12+
if [[ "$ghprbCommentBody" == *"[test-backend-v1]"* ]]; then
13+
export ROS_BACKEND_V2_FLAG_ENABLED="false"
14+
export IQE_MARKER_EXPRESSION="ros_smoke and insights_ros_v1"
15+
export IBUTSU_SOURCE="ros-backend-v1-pr"
16+
echo "Configured for v1 backend testing"
17+
echo " - Unleash flag will be set to: FALSE"
18+
echo " - Test markers: ros_smoke and insights_ros_v1"
19+
elif [[ "$ghprbCommentBody" == *"[test-backend-v2]"* ]]; then
20+
export ROS_BACKEND_V2_FLAG_ENABLED="true"
21+
export IQE_MARKER_EXPRESSION="ros_smoke and insights_ros_v2"
22+
export IBUTSU_SOURCE="ros-backend-v2-pr"
23+
echo "Configured for v2 backend testing"
24+
echo " - Unleash flag will be set to: TRUE"
25+
echo " - Test markers: ros_smoke and insights_ros_v2"
26+
else
27+
export IQE_MARKER_EXPRESSION=""
28+
export IBUTSU_SOURCE="ros-backend-pr"
29+
echo "Normal PR check configuration"
30+
fi
31+
1232
export IQE_PLUGINS="ros"
13-
export IQE_MARKER_EXPRESSION="ros_smoke"
1433
export IQE_FILTER_EXPRESSION=""
1534
export IQE_CJI_TIMEOUT="30m"
35+
1636
export IQE_ENV_VARS="JOB_NAME=${JOB_NAME},BUILD_NUMBER=${BUILD_NUMBER},BUILD_URL=${BUILD_URL}"
1737

18-
# Install bonfire repo/initialize
38+
if [[ -n "$ROS_BACKEND_V2_FLAG_ENABLED" ]]; then
39+
export IQE_ENV_VARS="${IQE_ENV_VARS},ROS_BACKEND_V2_FLAG_ENABLED=${ROS_BACKEND_V2_FLAG_ENABLED}"
40+
fi
41+
42+
echo "Final Configuration:"
43+
echo " IQE_MARKER_EXPRESSION: $IQE_MARKER_EXPRESSION"
44+
echo " IBUTSU_SOURCE: $IBUTSU_SOURCE"
45+
echo " IQE_ENV_VARS: $IQE_ENV_VARS"
46+
1947
CICD_URL=https://raw.githubusercontent.com/RedHatInsights/bonfire/master/cicd
2048
curl -s $CICD_URL/bootstrap.sh > .cicd_bootstrap.sh && source .cicd_bootstrap.sh
2149

2250
source $CICD_ROOT/build.sh
23-
24-
# Deploy ros to an ephemeral namespace for testing
2551
source $CICD_ROOT/deploy_ephemeral_env.sh
26-
27-
# Run iqe-ros somke tests with ClowdJobInvocation
2852
source $CICD_ROOT/cji_smoke_test.sh

0 commit comments

Comments
 (0)