Skip to content

Commit 2525515

Browse files
author
Saurabh Pimpalgaokar
committed
Added backend version control and respective job for pr checks
1 parent d6f9146 commit 2525515

File tree

2 files changed

+28
-2
lines changed

2 files changed

+28
-2
lines changed

clowdapp.yaml

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

100102
- name: inventory-events-processor
101103
replicas: ${{INVENTORY_PROCESSOR_REPLICA_COUNT}}
@@ -169,7 +171,8 @@ objects:
169171
name: service-account-for-kessel
170172
key: client-secret
171173
optional: true
172-
174+
- name: BACKEND_VERSION
175+
value: ${BACKEND_VERSION}
173176

174177
- name: engine-result-processor
175178
replicas: ${{ENGINE_PROCESSOR_REPLICA_COUNT}}
@@ -243,6 +246,8 @@ objects:
243246
name: service-account-for-kessel
244247
key: client-secret
245248
optional: true
249+
- name: BACKEND_VERSION
250+
value: ${BACKEND_VERSION}
246251

247252
- name: garbage-collector-processor
248253
replicas: ${{GARBAGE_COLLECTOR_REPLICA_COUNT}}
@@ -320,6 +325,8 @@ objects:
320325
name: service-account-for-kessel
321326
key: client-secret
322327
optional: true
328+
- name: BACKEND_VERSION
329+
value: ${BACKEND_VERSION}
323330

324331
database:
325332
name: ros
@@ -458,3 +465,6 @@ parameters:
458465
value: bypass
459466
- description: Unleash API url
460467
name: UNLEASH_URL
468+
- description: Controls old vs new backend
469+
name: BACKEND_VERSION
470+
value: 'old'

pr_check.sh

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,26 @@ 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"}
14+
15+
if [ "$BACKEND_VERSION" = "old" ]; then
16+
export IQE_MARKER_EXPRESSION="ros_smoke and (common or old_backend)"
17+
export IBUTSU_SOURCE="ros-old-backend-pr"
18+
elif [ "$BACKEND_VERSION" = "new" ]; then
19+
export IQE_MARKER_EXPRESSION="ros_smoke and (common or new_backend)"
20+
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"
25+
fi
26+
1227
export IQE_PLUGINS="ros"
13-
export IQE_MARKER_EXPRESSION="ros_smoke"
1428
export IQE_FILTER_EXPRESSION=""
1529
export IQE_CJI_TIMEOUT="30m"
1630
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}"
1732

1833
# Install bonfire repo/initialize
1934
CICD_URL=https://raw.githubusercontent.com/RedHatInsights/bonfire/master/cicd
@@ -26,3 +41,4 @@ source $CICD_ROOT/deploy_ephemeral_env.sh
2641

2742
# Run iqe-ros somke tests with ClowdJobInvocation
2843
source $CICD_ROOT/cji_smoke_test.sh
44+

0 commit comments

Comments
 (0)