Skip to content

Commit

Permalink
Run IQE platform_ui smoke tests against PR image (#2639)
Browse files Browse the repository at this point in the history
* Run tests against most recent commit

* Turn off debug, turn on error trapping

* Add a small wait before running tests against ephemeral
  • Loading branch information
catastrophe-brandon authored Jan 24, 2024
1 parent b37061c commit 15922d4
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions pr_check.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

env

export COMPONENT="insights-chrome-frontend"
export IMAGE="quay.io/cloudservices/$COMPONENT"
export WORKSPACE=${WORKSPACE:-$APP_ROOT} # if running in jenkins, use the build's workspace
Expand All @@ -13,7 +15,7 @@ COMMON_BUILDER=https://raw.githubusercontent.com/RedHatInsights/insights-fronten
# Build and Publish to Quay
# ---------------------------

set -ex
set -e

docker run -t \
-v $PWD:/e2e:ro,Z \
Expand All @@ -25,8 +27,6 @@ docker run -t \
--entrypoint bash \
quay.io/cloudservices/cypress-e2e-image:06b70f3 /e2e/run-e2e.sh

echo "After docker run"

# source is preferred to | bash -s in this case to avoid a subshell
source <(curl -sSL $COMMON_BUILDER/src/frontend-build.sh)
BUILD_RESULTS=$?
Expand All @@ -47,22 +47,29 @@ source .cicd_bootstrap.sh
echo "Taking a short nap"
sleep 60

SHORT_SHA=$(git rev-parse --short HEAD)
IMAGE_TAG="pr-${ghprbPullId}-${SHORT_SHA}"
echo "Expecting image tag ${IMAGE_TAG}"

set -x
set -e
# Deploy to an ephemeral namespace for testing
export IMAGE="quay.io/cloudservices/rbac"
# We deploy rbac and override the image tag for insights-frontend-chrome
export IMAGE="quay.io/cloudservices/insights-chrome-frontend"
export GIT_COMMIT=master
export IMAGE_TAG=latest
export DEPLOY_FRONTENDS=true
source $CICD_ROOT/deploy_ephemeral_env.sh

echo "Taking a short nap to let the deployment stabilize"
sleep 60

echo "Running tests with CJI"
# Run some tests with ClowdJobInvocation
export IQE_IMAGE_TAG="platform-ui"
IQE_PLUGINS="platform_ui"
IQE_MARKER_EXPRESSION="smoke"
# Exclude progressive profile tests
# Exclude APIdocs tests
IQE_FILTER_EXPRESSION="not (test_progressive or test_apidocs)"
IQE_FILTER_EXPRESSION="not (test_progressive)"
IQE_ENV="ephemeral"
IQE_SELENIUM="true"
IQE_CJI_TIMEOUT="30m"
Expand Down

0 comments on commit 15922d4

Please sign in to comment.