Skip to content

Commit

Permalink
build(HMS-3414): update ephemeral cluster
Browse files Browse the repository at this point in the history
Update the ephemeral cluster and provide more flexibility to specify the
cluster to use by using the CLUSTER variable.

Co-authored-by: Christian Heimes <[email protected]>
Signed-off-by: Alejandro Visiedo <[email protected]>
  • Loading branch information
avisiedo and tiran committed Feb 2, 2024
1 parent 211e7a9 commit 7cc3d63
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
15 changes: 5 additions & 10 deletions build/package/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM registry.redhat.io/rhel9/nodejs-16:1-110 AS builder
# https://github.com/cypress-io/cypress/issues/25236
# TODO Set env variable indicated into the URL
USER root
# The working dir is at /opt/app-root/src
WORKDIR /opt/app-root/src
COPY package*.json .
RUN npm install
COPY src src
Expand All @@ -24,20 +24,15 @@ RUN ./gen.app.info.sh


FROM quay.io/cloudservices/caddy-ubi:11145b1

WORKDIR /opt/app-root/src

COPY build/package/Caddyfile /opt/app-root/src/Caddyfile
COPY --from=builder /opt/app-root/src/dist /opt/app-root/src/dist/

COPY --from=builder /opt/app-root/src/app.info.json /opt/app-root/src/dist/app.info.json
COPY --from=builder /opt/app-root/src/app.info.deps.json /opt/app-root/src/dist/app.info.deps.json
COPY --from=builder /opt/app-root/src/app.info.json /opt/app-root/src/dist/
COPY --from=builder /opt/app-root/src/app.info.deps.json /opt/app-root/src/dist/
COPY --from=builder /opt/app-root/src/app.info.stable.json /opt/app-root/src/dist/stable/app.info.json
COPY --from=builder /opt/app-root/src/app.info.preview.json /opt/app-root/src/dist/preview/app.info.json

COPY ./package.json /opt/app-root/src


WORKDIR /opt/app-root/src
COPY ./package.json /opt/app-root/src/

RUN sed -i -e 's/\/beta\/apps/\/apps/g' /opt/app-root/src/dist/stable/fed-mods.json

Expand Down
4 changes: 3 additions & 1 deletion scripts/mk/ephemeral.mk
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ ifeq (,$(APP_NAME))
$(error APP_NAME is empty; did you miss to set APP_NAME=my-app at your scripts/mk/variables.mk)
endif

CLUSTER ?= crc-eph.r9lp.p1.openshiftapps.com

APP_COMPONENT ?= frontend

# Set the default duration for the namespace reservation and extension
Expand Down Expand Up @@ -51,7 +53,7 @@ ephemeral-login: .old-ephemeral-login ## Help in login to the ephemeral cluster

.PHONY: .old-ephemeral-login
.old-ephemeral-login:
xdg-open "https://oauth-openshift.apps.c-rh-c-eph.8p0c.p1.openshiftapps.com/oauth/token/request"
xdg-open "https://oauth-openshift.apps.$(CLUSTER)/oauth/token/request"
@echo "- Login with github"
@echo "- Do click on 'Display Token'"
@echo "- Copy 'Log in with this token' command"
Expand Down
2 changes: 2 additions & 0 deletions scripts/mk/private.example.mk
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,5 @@ POOL ?= default
# NOTE This could be necessary when too many deployments are made.
# export GITLAB_TOKEN :=

# Cluster to use for development purpose
CLUSTER ?= crc-eph.r9lp.p1.openshiftapps.com

0 comments on commit 7cc3d63

Please sign in to comment.