File tree Expand file tree Collapse file tree 3 files changed +26
-4
lines changed
Expand file tree Collapse file tree 3 files changed +26
-4
lines changed Original file line number Diff line number Diff line change 3434 - ' odh-pr-{{revision}}'
3535 - name : pipeline-type
3636 value : pull-request
37+ - name : build-args
38+ value :
39+ - BUILD_MODE=RHOAI
3740 pipelineRef :
3841 resolver : git
3942 params :
4952 - name : git-auth
5053 secret :
5154 secretName : ' {{ git_auth_secret }}'
52- status : {}
55+ status : {}
Original file line number Diff line number Diff line change @@ -23,11 +23,14 @@ spec:
2323 - name : revision
2424 value : ' {{revision}}'
2525 - name : output-image
26- value : quay.io/opendatahub/odh-dashboard:odh-stable
26+ value : quay.io/opendatahub/odh-dashboard:odh-stable
2727 - name : dockerfile
2828 value : Dockerfile
2929 - name : path-context
3030 value : .
31+ - name : build-args
32+ value :
33+ - BUILD_MODE=RHOAI
3134 pipelineRef :
3235 resolver : git
3336 params :
4346 - name : git-auth
4447 secret :
4548 secretName : ' {{ git_auth_secret }}'
46- status : {}
49+ status : {}
Original file line number Diff line number Diff line change 11# Build arguments
22ARG SOURCE_CODE=.
3+ ARG BUILD_MODE=ODH
34
45# Use ubi9/nodejs-22 as default base image
56ARG BASE_IMAGE="registry.access.redhat.com/ubi9/nodejs-22:latest"
@@ -8,6 +9,7 @@ FROM ${BASE_IMAGE} as builder
89
910# # Build args to be used at this step
1011ARG SOURCE_CODE
12+ ARG BUILD_MODE
1113
1214WORKDIR /usr/src/app
1315
@@ -22,7 +24,21 @@ RUN npm cache clean --force
2224RUN npm ci --ignore-scripts
2325
2426ENV TURBO_TELEMETRY_DISABLED=1
25- RUN npm run build
27+ RUN if [ "$BUILD_MODE" = "RHOAI" ]; then \
28+ echo "Setting up RHOAI vars.." ; \
29+ echo '#!/bin/sh' > /tmp/env.sh; \
30+ echo 'export ODH_LOGO=../images/rhoai-logo.svg' >> /tmp/env.sh; \
31+ echo 'export ODH_LOGO_DARK=../images/rhoai-logo-dark-theme.svg' >> /tmp/env.sh; \
32+ echo 'export ODH_PRODUCT_NAME="Red Hat OpenShift AI"' >> /tmp/env.sh; \
33+ echo 'export ODH_FAVICON="rhoai-favicon.svg"' >> /tmp/env.sh; \
34+ echo 'export DOC_LINK="https://docs.redhat.com/en/documentation/red_hat_openshift_ai/"' >> /tmp/env.sh; \
35+ echo 'export SUPPORT_LINK="https://access.redhat.com/support/cases/#/case/new/open-case?caseCreate=true"' >> /tmp/env.sh; \
36+ echo 'export COMMUNITY_LINK=""' >> /tmp/env.sh; \
37+ else \
38+ echo "Sticking to ODH vars.." ; \
39+ echo '#!/bin/sh' > /tmp/env.sh; \
40+ fi
41+ RUN . /tmp/env.sh && npm run build
2642
2743# Install only production dependencies
2844# This is needed to remove the dev dependencies that were installed in the previous step
You can’t perform that action at this time.
0 commit comments