From 078df87acb8e7d46cbfc5d82465de248f005de0c Mon Sep 17 00:00:00 2001 From: mclinton Date: Wed, 20 Sep 2023 19:16:06 -0400 Subject: [PATCH 1/2] Running frontend ephemeral testing --- pr_check.sh | 34 +++++++++++++++++++++++++--------- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/pr_check.sh b/pr_check.sh index 07c1957a4..3ac4b7e9e 100755 --- a/pr_check.sh +++ b/pr_check.sh @@ -12,13 +12,22 @@ export APP_ROOT=$(pwd) export NODE_BUILD_VERSION=16 COMMON_BUILDER=https://raw.githubusercontent.com/RedHatInsights/insights-frontend-builder-common/master -# -------------------------------------------- -# Options that must be configured by app owner -# -------------------------------------------- -# IQE tests for vulnerability ui is not set yet. We can comment out config for it for now -# IQE_PLUGINS="" -# IQE_MARKER_EXPRESSION="" -# IQE_FILTER_EXPRESSION="" +# Install bonfire repo/initialize +CICD_URL=https://raw.githubusercontent.com/RedHatInsights/bonfire/master/cicd +# shellcheck source=/dev/null +curl -s $CICD_URL/bootstrap.sh > .cicd_bootstrap.sh && source .cicd_bootstrap.sh + +export DEPLOY_FRONTENDS="true" +export IQE_ENV="ephemeral" +export IQE_SELENIUM="true" +export IQE_CJI_TIMEOUT="30m" +export REF_ENV="insights-stage" +export COMPONENTS_W_RESOURCES="vmaas" +export COMPONENT_NAME="vulnerability-ui" + +IQE_PLUGINS="vulnerability" +IQE_MARKER_EXPRESSION="smoke_ui" +IQE_FILTER_EXPRESSION="" set -exv # source is preferred to | bash -s in this case to avoid a subshell @@ -33,5 +42,12 @@ cat << EOF > $WORKSPACE/artifacts/junit-dummy.xml EOF -# teardown_docker -exit $BUILD_RESULTS \ No newline at end of file +# Run smoke tests +# shellcheck source=/dev/null +source "${CICD_ROOT}/deploy_ephemeral_env.sh" +# shellcheck source=/dev/null +export COMPONENT_NAME="vulnerability-engine" +source "${CICD_ROOT}/cji_smoke_test.sh" +# shellcheck source=/dev/null +source "${CICD_ROOT}/post_test_results.sh" + From 030af975b37c4561ead4e74e038afd42c31b790f Mon Sep 17 00:00:00 2001 From: mclinton Date: Tue, 3 Oct 2023 18:11:01 -0400 Subject: [PATCH 2/2] Fix pr check --- pr_check.sh | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/pr_check.sh b/pr_check.sh index 3ac4b7e9e..8b00e6c1f 100755 --- a/pr_check.sh +++ b/pr_check.sh @@ -12,6 +12,10 @@ export APP_ROOT=$(pwd) export NODE_BUILD_VERSION=16 COMMON_BUILDER=https://raw.githubusercontent.com/RedHatInsights/insights-frontend-builder-common/master +set -exv +# source is preferred to | bash -s in this case to avoid a subshell +source <(curl -sSL $COMMON_BUILDER/src/frontend-build.sh) + # Install bonfire repo/initialize CICD_URL=https://raw.githubusercontent.com/RedHatInsights/bonfire/master/cicd # shellcheck source=/dev/null @@ -20,6 +24,8 @@ curl -s $CICD_URL/bootstrap.sh > .cicd_bootstrap.sh && source .cicd_bootstrap.sh export DEPLOY_FRONTENDS="true" export IQE_ENV="ephemeral" export IQE_SELENIUM="true" +export APP_NAME="vulnerability" +export DEPLOY_TIMEOUT="900" # 15min export IQE_CJI_TIMEOUT="30m" export REF_ENV="insights-stage" export COMPONENTS_W_RESOURCES="vmaas" @@ -28,26 +34,12 @@ export COMPONENT_NAME="vulnerability-ui" IQE_PLUGINS="vulnerability" IQE_MARKER_EXPRESSION="smoke_ui" IQE_FILTER_EXPRESSION="" - -set -exv -# source is preferred to | bash -s in this case to avoid a subshell -source <(curl -sSL $COMMON_BUILDER/src/frontend-build.sh) -BUILD_RESULTS=$? - -# Stubbed out for now -mkdir -p $WORKSPACE/artifacts -cat << EOF > $WORKSPACE/artifacts/junit-dummy.xml - - - -EOF +IQE_IMAGE_TAG="vulnerability" # Run smoke tests -# shellcheck source=/dev/null source "${CICD_ROOT}/deploy_ephemeral_env.sh" -# shellcheck source=/dev/null + export COMPONENT_NAME="vulnerability-engine" source "${CICD_ROOT}/cji_smoke_test.sh" -# shellcheck source=/dev/null -source "${CICD_ROOT}/post_test_results.sh" +source "${CICD_ROOT}/post_test_results.sh"