diff --git a/build/package/Dockerfile b/build/package/Dockerfile index 31a0f42..70adfc6 100644 --- a/build/package/Dockerfile +++ b/build/package/Dockerfile @@ -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 @@ -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 diff --git a/scripts/mk/ephemeral.mk b/scripts/mk/ephemeral.mk index 84478d1..1ec1911 100644 --- a/scripts/mk/ephemeral.mk +++ b/scripts/mk/ephemeral.mk @@ -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 @@ -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" diff --git a/scripts/mk/private.example.mk b/scripts/mk/private.example.mk index 297f78c..6f3f377 100644 --- a/scripts/mk/private.example.mk +++ b/scripts/mk/private.example.mk @@ -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