Skip to content

Commit

Permalink
Add fe operator build/deploy configs
Browse files Browse the repository at this point in the history
  • Loading branch information
bsquizz authored and jiridostal committed May 2, 2022
1 parent face8a6 commit d4dfcdc
Show file tree
Hide file tree
Showing 3 changed files with 84 additions and 0 deletions.
29 changes: 29 additions & 0 deletions build_deploy.sh
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
27 changes: 27 additions & 0 deletions frontend.yml
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
28 changes: 28 additions & 0 deletions pr_check.sh
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

0 comments on commit d4dfcdc

Please sign in to comment.