Skip to content

Commit 494ee8f

Browse files
author
Saurabh Pimpalgaokar
committed
removed backend version param and set unleash flag value in pr check file
1 parent 2525515 commit 494ee8f

File tree

2 files changed

+24
-23
lines changed

2 files changed

+24
-23
lines changed

clowdapp.yaml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,6 @@ objects:
9696
name: service-account-for-kessel
9797
key: client-secret
9898
optional: true
99-
- name: BACKEND_VERSION
100-
value: ${BACKEND_VERSION}
10199

102100
- name: inventory-events-processor
103101
replicas: ${{INVENTORY_PROCESSOR_REPLICA_COUNT}}
@@ -171,8 +169,6 @@ objects:
171169
name: service-account-for-kessel
172170
key: client-secret
173171
optional: true
174-
- name: BACKEND_VERSION
175-
value: ${BACKEND_VERSION}
176172

177173
- name: engine-result-processor
178174
replicas: ${{ENGINE_PROCESSOR_REPLICA_COUNT}}
@@ -246,8 +242,6 @@ objects:
246242
name: service-account-for-kessel
247243
key: client-secret
248244
optional: true
249-
- name: BACKEND_VERSION
250-
value: ${BACKEND_VERSION}
251245

252246
- name: garbage-collector-processor
253247
replicas: ${{GARBAGE_COLLECTOR_REPLICA_COUNT}}
@@ -325,8 +319,6 @@ objects:
325319
name: service-account-for-kessel
326320
key: client-secret
327321
optional: true
328-
- name: BACKEND_VERSION
329-
value: ${BACKEND_VERSION}
330322

331323
database:
332324
name: ros
@@ -465,6 +457,3 @@ parameters:
465457
value: bypass
466458
- description: Unleash API url
467459
name: UNLEASH_URL
468-
- description: Controls old vs new backend
469-
name: BACKEND_VERSION
470-
value: 'old'

pr_check.sh

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,26 +9,39 @@ export COMPONENTS="ros-backend"
99
export IMAGE="quay.io/cloudservices/ros-backend"
1010
export DOCKERFILE="Dockerfile"
1111

12-
# NEW: Backend version selection logic
13-
BACKEND_VERSION=${BACKEND_VERSION:-"old"}
12+
# NEW: Dual backend testing logic based on job name
13+
echo "JOB_NAME: $JOB_NAME"
1414

15-
if [ "$BACKEND_VERSION" = "old" ]; then
15+
if [[ "$JOB_NAME" == *"old-backend"* ]]; then
16+
# Old backend testing configuration
17+
export ROS_NEW_BACKEND_FLAG_ENABLED="false"
1618
export IQE_MARKER_EXPRESSION="ros_smoke and (common or old_backend)"
1719
export IBUTSU_SOURCE="ros-old-backend-pr"
18-
elif [ "$BACKEND_VERSION" = "new" ]; then
20+
echo " Configured for OLD backend testing"
21+
echo " - Unleash flag will be set to: FALSE"
22+
echo " - Test markers: ros_smoke and (common or old_backend)"
23+
elif [[ "$JOB_NAME" == *"new-backend"* ]]; then
24+
# New backend testing configuration
25+
export ROS_NEW_BACKEND_FLAG_ENABLED="true"
1926
export IQE_MARKER_EXPRESSION="ros_smoke and (common or new_backend)"
2027
export IBUTSU_SOURCE="ros-new-backend-pr"
21-
else
22-
# Default fallback
23-
export IQE_MARKER_EXPRESSION="ros_smoke"
24-
export IBUTSU_SOURCE="ros-backend-pr"
28+
echo " Configured for NEW backend testing"
29+
echo " - Unleash flag will be set to: TRUE"
30+
echo " - Test markers: ros_smoke and (common or new_backend)"
2531
fi
2632

33+
# Standard IQE configuration
2734
export IQE_PLUGINS="ros"
2835
export IQE_FILTER_EXPRESSION=""
2936
export IQE_CJI_TIMEOUT="30m"
30-
export IQE_ENV_VARS="JOB_NAME=${JOB_NAME},BUILD_NUMBER=${BUILD_NUMBER},BUILD_URL=${BUILD_URL}"
31-
export EXTRA_DEPLOY_ARGS="--set-parameter ros-backend/BACKEND_VERSION=${BACKEND_VERSION}"
37+
38+
# CRITICAL: Pass ROS_NEW_BACKEND_FLAG_ENABLED to IQE via IQE_ENV_VARS
39+
export IQE_ENV_VARS="JOB_NAME=${JOB_NAME},BUILD_NUMBER=${BUILD_NUMBER},BUILD_URL=${BUILD_URL},ROS_NEW_BACKEND_FLAG_ENABLED=${ROS_NEW_BACKEND_FLAG_ENABLED}"
40+
41+
echo " Final Configuration:"
42+
echo " IQE_MARKER_EXPRESSION: $IQE_MARKER_EXPRESSION"
43+
echo " IBUTSU_SOURCE: $IBUTSU_SOURCE"
44+
echo " IQE_ENV_VARS: $IQE_ENV_VARS"
3245

3346
# Install bonfire repo/initialize
3447
CICD_URL=https://raw.githubusercontent.com/RedHatInsights/bonfire/master/cicd
@@ -39,6 +52,5 @@ source $CICD_ROOT/build.sh
3952
# Deploy ros to an ephemeral namespace for testing
4053
source $CICD_ROOT/deploy_ephemeral_env.sh
4154

42-
# Run iqe-ros somke tests with ClowdJobInvocation
55+
# Run iqe-ros smoke tests with ClowdJobInvocation
4356
source $CICD_ROOT/cji_smoke_test.sh
44-

0 commit comments

Comments
 (0)