-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add fe operator build/deploy configs
- Loading branch information
1 parent
face8a6
commit d4dfcdc
Showing
3 changed files
with
84 additions
and
0 deletions.
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,29 @@ | ||
#!/bin/bash | ||
|
||
# name of app-sre "application" folder this component lives in; needs to match for quay | ||
export COMPONENT="insights-dashboard-frontend" | ||
export IMAGE="quay.io/cloudservices/$COMPONENT" | ||
export WORKSPACE=${WORKSPACE:-$APP_ROOT} # if running in jenkins, use the build's workspace | ||
export APP_ROOT=$(pwd) | ||
cat /etc/redhat-release | ||
COMMON_BUILDER=https://raw.githubusercontent.com/RedHatInsights/insights-frontend-builder-common/master | ||
|
||
# --------------------------- | ||
# Build and Publish to Quay | ||
# --------------------------- | ||
|
||
set -ex | ||
# 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
apiVersion: v1 | ||
kind: Template | ||
metadata: | ||
name: insights-dashboard | ||
objects: | ||
- apiVersion: cloud.redhat.com/v1alpha1 | ||
kind: Frontend | ||
metadata: | ||
name: chrome | ||
spec: | ||
envName: ${ENV_NAME} | ||
deploymentRepo: https://github.com/RedHatInsights/insights-dashboard | ||
title: Dashboard | ||
image: ${IMAGE}:${IMAGE_TAG} | ||
API: | ||
versions: | ||
- v1 | ||
frontend: | ||
paths: | ||
- /insights/dashboard | ||
parameters: | ||
- name: ENV_NAME | ||
required: true | ||
- name: IMAGE_TAG | ||
required: true | ||
- name: IMAGE | ||
value: quay.io/cloudservices/insights-dashboard-frontend |
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,28 @@ | ||
#!/bin/bash | ||
|
||
export COMPONENT="insights-dashboard-frontend" | ||
export IMAGE="quay.io/cloudservices/$COMPONENT" | ||
export WORKSPACE=${WORKSPACE:-$APP_ROOT} # if running in jenkins, use the build's workspace | ||
export APP_ROOT=$(pwd) | ||
cat /etc/redhat-release | ||
COMMON_BUILDER=https://raw.githubusercontent.com/RedHatInsights/insights-frontend-builder-common/master | ||
|
||
# --------------------------- | ||
# Build and Publish to Quay | ||
# --------------------------- | ||
|
||
set -ex | ||
# 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 |