Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion clowdapp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,6 @@ objects:
key: client-secret
optional: true


- name: engine-result-processor
replicas: ${{ENGINE_PROCESSOR_REPLICA_COUNT}}
podSpec:
Expand Down
46 changes: 35 additions & 11 deletions pr_check.sh
Original file line number Diff line number Diff line change
@@ -1,28 +1,52 @@
#!/bin/bash

# --------------------------------------------
# Options that must be configured by app owner
# --------------------------------------------
export APP_NAME="ros" # name of app-sre "application" folder this component lives in
export COMPONENT_NAME="ros-backend" # name of app-sre "resourceTemplate" in deploy.yaml for this component
export APP_NAME="ros"
export COMPONENT_NAME="ros-backend"
export COMPONENTS="ros-backend"
export IMAGE="quay.io/cloudservices/ros-backend"
export DOCKERFILE="Dockerfile"

echo "JOB_NAME: $JOB_NAME"
echo "GitHub Comment: $ghprbCommentBody"

if [[ "$ghprbCommentBody" == *"[test-backend-v1]"* ]]; then
export ROS_BACKEND_V2_FLAG_ENABLED="false"
export IQE_MARKER_EXPRESSION="ros_smoke and insights_ros_v1"
export IBUTSU_SOURCE="ros-backend-v1-pr"
echo "Configured for v1 backend testing"
echo " - Unleash flag will be set to: FALSE"
echo " - Test markers: ros_smoke and insights_ros_v1"
elif [[ "$ghprbCommentBody" == *"[test-backend-v2]"* ]]; then
export ROS_BACKEND_V2_FLAG_ENABLED="true"
export IQE_MARKER_EXPRESSION="ros_smoke and insights_ros_v2"
export IBUTSU_SOURCE="ros-backend-v2-pr"
echo "Configured for v2 backend testing"
echo " - Unleash flag will be set to: TRUE"
echo " - Test markers: ros_smoke and insights_ros_v2"
else
export IQE_MARKER_EXPRESSION=""
export IBUTSU_SOURCE="ros-backend-pr"
echo "Normal PR check configuration"
fi

export IQE_PLUGINS="ros"
export IQE_MARKER_EXPRESSION="ros_smoke"
export IQE_FILTER_EXPRESSION=""
export IQE_CJI_TIMEOUT="30m"

export IQE_ENV_VARS="JOB_NAME=${JOB_NAME},BUILD_NUMBER=${BUILD_NUMBER},BUILD_URL=${BUILD_URL}"

# Install bonfire repo/initialize
if [[ -n "$ROS_BACKEND_V2_FLAG_ENABLED" ]]; then
export IQE_ENV_VARS="${IQE_ENV_VARS},ROS_BACKEND_V2_FLAG_ENABLED=${ROS_BACKEND_V2_FLAG_ENABLED}"
fi

echo "Final Configuration:"
echo " IQE_MARKER_EXPRESSION: $IQE_MARKER_EXPRESSION"
echo " IBUTSU_SOURCE: $IBUTSU_SOURCE"
echo " IQE_ENV_VARS: $IQE_ENV_VARS"

CICD_URL=https://raw.githubusercontent.com/RedHatInsights/bonfire/master/cicd
curl -s $CICD_URL/bootstrap.sh > .cicd_bootstrap.sh && source .cicd_bootstrap.sh

source $CICD_ROOT/build.sh

# Deploy ros to an ephemeral namespace for testing
source $CICD_ROOT/deploy_ephemeral_env.sh

# Run iqe-ros somke tests with ClowdJobInvocation
source $CICD_ROOT/cji_smoke_test.sh
Loading