-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(build): ephemeral envs onboarding (#928)
* integrate frontend container building script * node version-engine from package.json
- Loading branch information
1 parent
a8cdb00
commit 85b5a71
Showing
3 changed files
with
75 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/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="rhsm" | ||
export APP_NAME=`node -e 'console.log(require("./package.json").insights.appname)'` | ||
export APP_ROOT=$(pwd) | ||
export NODE_BUILD_VERSION=`node -e 'console.log(require("./package.json").engines.node.match(/(\d+)\.\d+\.\d+/)[1])'` | ||
COMMON_BUILDER=https://raw.githubusercontent.com/RedHatInsights/insights-frontend-builder-common/master | ||
|
||
# -------------------------------------------- | ||
# Options that must be configured by app owner | ||
# -------------------------------------------- | ||
IQE_PLUGINS="curiosity" | ||
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 | ||
<testsuite tests="1"> | ||
<testcase classname="dummy" name="dummytest"/> | ||
</testsuite> | ||
EOF | ||
|
||
# teardown_docker | ||
exit $BUILD_RESULTS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/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="rhsm" | ||
export WORKSPACE=${WORKSPACE:-$APP_ROOT} # if running in jenkins, use the build's workspace | ||
export APP_ROOT=$(pwd) | ||
export NODE_BUILD_VERSION=`node -e 'console.log(require("./package.json").engines.node.match(/(\d+)\.\d+\.\d+/)[1])'` | ||
COMMON_BUILDER=https://raw.githubusercontent.com/RedHatInsights/insights-frontend-builder-common/master | ||
|
||
# -------------------------------------------- | ||
# Options that must be configured by app owner | ||
# -------------------------------------------- | ||
IQE_PLUGINS="curiosity" | ||
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 | ||
<testsuite tests="1"> | ||
<testcase classname="dummy" name="dummytest"/> | ||
</testsuite> | ||
EOF | ||
|
||
# teardown_docker | ||
exit $BUILD_RESULTS |