Skip to content

Commit

Permalink
Adapt to upstream: download IDE on a workspace start
Browse files Browse the repository at this point in the history
Signed-off-by: Artem Zatsarynnyi <[email protected]>
  • Loading branch information
azatsarynnyy committed Sep 24, 2024
1 parent 8c215f7 commit 21b5aa4
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 21 deletions.
4 changes: 0 additions & 4 deletions devspaces-idea-remote-dev-server/fetch-artifacts-url.yaml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -11,46 +11,44 @@
# The Dockerfile works only in Brew, as it is customized for Cachito fetching
# project sources and npm dependencies, and performing an offline build with them

# https://registry.access.redhat.com/ubi8/nodejs-18
FROM registry.access.redhat.com/ubi8/nodejs-18:1-94
# https://registry.access.redhat.com/ubi8/nodejs-20
FROM registry.access.redhat.com/ubi8/nodejs-20:1-50.1720405266
USER 0

WORKDIR $REMOTE_SOURCES_DIR/devspaces-images-idea/app/devspaces-idea-remote-dev-server/
WORKDIR $REMOTE_SOURCES_DIR/devspaces-images-jb-remote-dev-server/app/devspaces-jb-remote-dev-server/

# cachito:yarn step 1: copy cachito sources where we can use them; source env vars; set working dir
COPY $REMOTE_SOURCES $REMOTE_SOURCES_DIR

# hadolint ignore=SC2086
RUN source $REMOTE_SOURCES_DIR/devspaces-images-idea/cachito.env

COPY artifacts/ideaIU-*.tar.gz /idea-dist/
RUN source $REMOTE_SOURCES_DIR/devspaces-images-jb-remote-dev-server/cachito.env

RUN cp -r build/dockerfiles/*.sh /
RUN cp -r status-app /idea-dist/status-app/
RUN cp -r status-app /status-app/

# Create a directory for mounting a volume.
RUN mkdir /idea-server
# Create a folders structure for mounting a shared volume and copy the editor binaries to.
RUN mkdir -p /idea-server/status-app

# Adjust permissions on some items so they're writable by group root.
# hadolint ignore=SC2086
RUN for f in "${HOME}" "/etc/passwd" "/etc/group" "/idea-dist/status-app" "/idea-server"; do\
RUN for f in "${HOME}" "/etc/passwd" "/etc/group" "/status-app" "/idea-server"; do\
chgrp -R 0 ${f} && \
chmod -R g+rwX ${f}; \
done

# Build the status app.
WORKDIR /idea-dist/status-app/
WORKDIR /status-app/
RUN npm install

# Switch to unprivileged user.
USER 1001

ENTRYPOINT /entrypoint.sh

ENV SUMMARY="Red Hat OpenShift Dev Spaces with IntelliJ IDEA Ultimate IDE container" \
DESCRIPTION="Red Hat OpenShift Dev Spaces with IntelliJ IDEA Ultimate IDE container" \
ENV SUMMARY="Red Hat OpenShift Dev Spaces with JetBrains IDE container" \
DESCRIPTION="Red Hat OpenShift Dev Spaces with JetBrains IDE container" \
PRODNAME="devspaces" \
COMPNAME="ideaIU-rhel8"
COMPNAME="jbIDE-rhel8"
LABEL summary="$SUMMARY" \
description="$DESCRIPTION" \
io.k8s.description="$DESCRIPTION" \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ CSV_VERSION=3.y.0 # csv 3.y.0
DS_VERSION=${CSV_VERSION%.*} # tag 3.y

UPSTM_NAME="che-idea-dev-server"
MIDSTM_NAME="idea-server"
MIDSTM_NAME="jb-remote-dev-server"

usage () {
echo "
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ compose:
image_build_method: imagebuilder

remote_sources:
- name: devspaces-idea-remote-dev-server
- name: devspaces-images-jb-remote-dev-server
remote_source:
repo: https://github.com/redhat-developer/devspaces-images.git
ref: b8d76a3091d9fbf553184bd0a3d8b797a76e38dd
pkg_managers: [npm]
packages:
npm:
- path: devspaces-idea-remote-dev-server/status-app/
- path: devspaces-jb-remote-dev-server/status-app/

0 comments on commit 21b5aa4

Please sign in to comment.