From 3436676258216125c296013025d76ffdf7a4e999 Mon Sep 17 00:00:00 2001 From: Anatolii Bazko Date: Wed, 30 Aug 2023 15:08:15 +0200 Subject: [PATCH] chore: devfile registry should return index file by /index path Signed-off-by: Anatolii Bazko --- build/dev/build-devfile-registry.sh | 2 +- build/dockerfiles/Dockerfile | 2 ++ build/dockerfiles/rhel.Dockerfile | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/build/dev/build-devfile-registry.sh b/build/dev/build-devfile-registry.sh index 37cfdd307..a7230753f 100755 --- a/build/dev/build-devfile-registry.sh +++ b/build/dev/build-devfile-registry.sh @@ -23,7 +23,7 @@ cp -rf "$REPO_DIR"/build/scripts "$BUILD_DIR" cp -rf "$DEVFILES_SRC" "$BUILD_DIR"/devfiles cd "$BUILD_DIR" ./check_mandatory_fields.sh devfiles -./index.sh > devfiles/index.json +./index.sh > devfiles/index.json && cp devfiles/index.json index # ./generate_devworkspace_templates.sh ROUTE_OR_INGRESS="routes" diff --git a/build/dockerfiles/Dockerfile b/build/dockerfiles/Dockerfile index 695d28a57..65d898ad2 100644 --- a/build/dockerfiles/Dockerfile +++ b/build/dockerfiles/Dockerfile @@ -38,6 +38,7 @@ RUN apk add --no-cache bash && \ apk add --no-cache coreutils COPY .htaccess README.md /usr/local/apache2/htdocs/ COPY --from=builder /build/devfiles /usr/local/apache2/htdocs/devfiles +COPY --from=builder /build/devfiles/index.json /usr/local/apache2/htdocs/index COPY --from=builder /build/resources /usr/local/apache2/htdocs/resources COPY ./images /usr/local/apache2/htdocs/images COPY ./build/dockerfiles/entrypoint.sh /usr/bin/ @@ -53,4 +54,5 @@ RUN ./cache_projects.sh devfiles resources && \ # Offline registry: copy updated devfile.yamls and cached projects FROM registry AS offline-registry COPY --from=offline-builder /build/devfiles /usr/local/apache2/htdocs/devfiles +COPY --from=offline-builder /build/devfiles/index.json /usr/local/apache2/htdocs/index COPY --from=offline-builder /build/resources /usr/local/apache2/htdocs/resources diff --git a/build/dockerfiles/rhel.Dockerfile b/build/dockerfiles/rhel.Dockerfile index 060551e33..a147db3b2 100644 --- a/build/dockerfiles/rhel.Dockerfile +++ b/build/dockerfiles/rhel.Dockerfile @@ -85,6 +85,7 @@ WORKDIR /var/www/html RUN mkdir -m 777 /var/www/html/devfiles COPY .htaccess README.md /var/www/html/ COPY --from=builder /build/devfiles /var/www/html/devfiles +COPY --from=builder /build/devfiles/index.json /var/www/html/index COPY ./images /var/www/html/images COPY ./build/dockerfiles/rhel.entrypoint.sh ./build/dockerfiles/entrypoint.sh /usr/local/bin/ RUN chmod g+rwX /usr/local/bin/entrypoint.sh /usr/local/bin/rhel.entrypoint.sh @@ -99,6 +100,7 @@ RUN ./cache_projects.sh devfiles resources && \ FROM registry AS offline-registry COPY --from=offline-builder /build/devfiles /var/www/html/devfiles +COPY --from=offline-builder /build/devfiles/index.json /var/www/html/index COPY --from=offline-builder /build/resources /var/www/html/resources # append Brew metadata here