diff --git a/build_deploy.sh b/build_deploy.sh new file mode 100755 index 00000000..792f0677 --- /dev/null +++ b/build_deploy.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +# -------------------------------------------- +# Export vars for helper scripts to use +# -------------------------------------------- +# name of app-sre "application" folder this component lives in; needs to match for quay +export COMPONENT="image-builder" +# IMAGE should match the quay repo set by app.yaml in app-interface +export IMAGE="quay.io/cloudservices/image-builder-frontend" +export APP_ROOT=$(pwd) +export WORKSPACE=${WORKSPACE:-$APP_ROOT} # if running in jenkins, use the build's workspace +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) +BUILD_RESULTS=$? + +# Stubbed out for now +mkdir -p $WORKSPACE/artifacts +cat << EOF > $WORKSPACE/artifacts/junit-dummy.xml + + + +EOF + +# teardown_docker +exit $BUILD_RESULTS diff --git a/deploy/frontend-clowder.yml b/deploy/frontend-clowder.yml new file mode 100644 index 00000000..7df9af3d --- /dev/null +++ b/deploy/frontend-clowder.yml @@ -0,0 +1,41 @@ +apiVersion: v1 +kind: Template +metadata: + name: image-builder-frontend +objects: + - apiVersion: cloud.redhat.com/v1alpha1 + kind: Frontend + metadata: + name: image-builder + spec: + envName: ${ENV_NAME} + title: Image-builder + deploymentRepo: https://github.com/RedHatInsights/image-builder-frontend + API: + versions: + - v1 + frontend: + paths: + - /apps/image-builder + image: ${IMAGE}:${IMAGE_TAG} + navItems: + - appId: "image_builder" + title: "Image builder" + href: "/insights/image-builder" + product: "Red Hat Insights" + module: + manifestLocation: "/apps/image-builder/fed-mods.json" + moduleID: image_builder + modules: + - id: "image-builder" + module: "./RootApp" + routes: + - pathname: /insights/image-builder + +parameters: + - name: ENV_NAME + required: true + - name: IMAGE_TAG + required: true + - name: IMAGE + value: quay.io/cloudservices/image-builder-frontend diff --git a/package.json b/package.json index 4fdeb73e..49d7cee3 100644 --- a/package.json +++ b/package.json @@ -91,7 +91,7 @@ "prod-beta": "BETA=true PROXY=true webpack serve --config config/dev.webpack.config.js", "prod-stable": "PROXY=true webpack serve --config config/dev.webpack.config.js", "stage-beta": "STAGE=true npm run prod-beta", - "test": "jest --verbose", + "test": "TZ=UTC jest --verbose --no-cache", "test:single": "jest --verbose -w 1", "build": "webpack --config config/prod.webpack.config.js", "verify": "npm-run-all build lint test" diff --git a/pr_check.sh b/pr_check.sh new file mode 100755 index 00000000..7b1713ad --- /dev/null +++ b/pr_check.sh @@ -0,0 +1,38 @@ +#!/bin/bash + +# -------------------------------------------- +# Export vars for helper scripts to use +# -------------------------------------------- +# name of app-sre "application" folder this component lives in; needs to match for quay +export COMPONENT="image-builder" +# IMAGE should match the quay repo set by app.yaml in app-interface +export IMAGE="quay.io/cloudservices/image-builder-frontend" +export WORKSPACE=${WORKSPACE:-$APP_ROOT} # if running in jenkins, use the build's workspace +export APP_ROOT=$(pwd) +#16 is the default Node version. Change this to override it. +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_PLUGINS="image-builder-frontend" +# not sure if this is necessary +IQE_MARKER_EXPRESSION="smoke" +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 + +# teardown_docker +exit $BUILD_RESULTS