Skip to content

Commit

Permalink
Use docker images instead of maven artifact to deliver che-dashboard …
Browse files Browse the repository at this point in the history
…&& che-workspace-loader (eclipse-che#16802)

Signed-off-by: Sergii Kabashniuk <skabashniuk@redhat.com>
  • Loading branch information
skabashnyuk committed May 12, 2020
1 parent 4f1dcc8 commit f390060
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 155 deletions.
6 changes: 0 additions & 6 deletions assembly/assembly-dashboard-war/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,6 @@
<groupId>org.eclipse.che.core</groupId>
<artifactId>che-core-commons-j2ee</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.che.dashboard</groupId>
<artifactId>che-dashboard-war</artifactId>
<type>war</type>
</dependency>
</dependencies>
<build>
<plugins>
Expand All @@ -46,7 +41,6 @@
<configuration>
<ignoredUnusedDeclaredDependencies>
<dep>org.eclipse.che.core:che-core-commons-j2ee</dep>
<dep>org.eclipse.che.dashboard:che-dashboard-war</dep>
</ignoredUnusedDeclaredDependencies>
</configuration>
</execution>
Expand Down
19 changes: 17 additions & 2 deletions assembly/assembly-main/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
Red Hat, Inc. - initial API and implementation
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>che-assembly-parent</artifactId>
Expand Down Expand Up @@ -99,7 +100,21 @@
<artifactId>assembly-che-tomcat8</artifactId>
<type>zip</type>
<overWrite>true</overWrite>
<outputDirectory>${project.build.directory}/dependency</outputDirectory>
<outputDirectory>${project.build.directory}/dependency/assembly-che-tomcat8</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>org.eclipse.che</groupId>
<artifactId>assembly-dashboard-war</artifactId>
<type>war</type>
<overWrite>true</overWrite>
<outputDirectory>${project.build.directory}/dependency/assembly-dashboard-war</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>org.eclipse.che</groupId>
<artifactId>assembly-workspace-loader-war</artifactId>
<type>war</type>
<overWrite>true</overWrite>
<outputDirectory>${project.build.directory}/dependency/assembly-workspace-loader-war</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
Expand Down
28 changes: 9 additions & 19 deletions assembly/assembly-main/src/assembly/assembly.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,24 +38,6 @@
<include>org.eclipse.che:assembly-wsmaster-war</include>
</includes>
</dependencySet>
<dependencySet>
<useProjectArtifact>false</useProjectArtifact>
<unpack>false</unpack>
<outputDirectory>tomcat/webapps</outputDirectory>
<outputFileNameMapping>dashboard.war</outputFileNameMapping>
<includes>
<include>org.eclipse.che:assembly-dashboard-war</include>
</includes>
</dependencySet>
<dependencySet>
<useProjectArtifact>false</useProjectArtifact>
<unpack>false</unpack>
<outputDirectory>tomcat/webapps</outputDirectory>
<outputFileNameMapping>workspace-loader.war</outputFileNameMapping>
<includes>
<include>org.eclipse.che:assembly-workspace-loader-war</include>
</includes>
</dependencySet>
<dependencySet>
<useProjectArtifact>false</useProjectArtifact>
<unpack>false</unpack>
Expand All @@ -76,12 +58,20 @@
</dependencySets>
<fileSets>
<fileSet>
<directory>${project.build.directory}/dependency/</directory>
<directory>${project.build.directory}/dependency/assembly-che-tomcat8</directory>
<outputDirectory>tomcat/</outputDirectory>
<excludes>
<exclude>bin/*.bat</exclude>
</excludes>
</fileSet>
<fileSet>
<directory>${project.build.directory}/dependency/assembly-dashboard-war</directory>
<outputDirectory>tomcat/webapps/dashboard</outputDirectory>
</fileSet>
<fileSet>
<directory>${project.build.directory}/dependency/assembly-workspace-loader-war</directory>
<outputDirectory>tomcat/webapps/workspace-loader</outputDirectory>
</fileSet>
<fileSet>
<directory>${project.basedir}/src/assembly</directory>
<outputDirectory></outputDirectory>
Expand Down
39 changes: 0 additions & 39 deletions assembly/assembly-workspace-loader-war/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,44 +30,5 @@
<artifactId>javax.servlet-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.eclipse.che.workspace.loader</groupId>
<artifactId>che-workspace-loader</artifactId>
<type>zip</type>
<scope>runtime</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<overlays>
<overlay>
<groupId>org.eclipse.che.workspace.loader</groupId>
<artifactId>che-workspace-loader</artifactId>
<type>zip</type>
</overlay>
</overlays>
<packagingExcludes>/webapp/</packagingExcludes>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>analyze</id>
<configuration>
<ignoredUnusedDeclaredDependencies>
<!-- dependency is required just to overlay it's content -->
<dep>org.eclipse.che.workspace.loader:che-workspace-loader</dep>
</ignoredUnusedDeclaredDependencies>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
13 changes: 12 additions & 1 deletion dockerfiles/che/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,24 @@
#
# SPDX-License-Identifier: EPL-2.0
#
FROM openjdk:8u242-jre-slim

# Variables in `COPY --from=` is not supported see https://github.com/moby/moby/issues/34482
# this is workaround to handle that.
ARG CHE_DASHBOARD_VERSION=next
ARG CHE_WORKSPACE_LOADER_VERSION=next

FROM quay.io/eclipse/che-dashboard:${CHE_DASHBOARD_VERSION} as che_dashboard_base
FROM quay.io/eclipse/che-workspace-loader:${CHE_WORKSPACE_LOADER_VERSION} as che_workspace_loader_base

FROM openjdk:8u252-jre-slim
ENV LANG=C.UTF-8
RUN echo "%root ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers && rm -rf /tmp/*
EXPOSE 8000 8080
COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
RUN mkdir /logs /data && \
chmod 0777 /logs /data
COPY --from=che_dashboard_base /usr/local/apache2/htdocs/dashboard /home/user/eclipse-che/tomcat/webapps/dashboard
COPY --from=che_workspace_loader_base /usr/local/apache2/htdocs/workspace-loader/ /home/user/eclipse-che/tomcat/webapps/workspace-loader
ADD eclipse-che /home/user/eclipse-che
RUN find /home/user -type d -exec chmod 777 {} \;
46 changes: 0 additions & 46 deletions dockerfiles/che/Dockerfile.centos

This file was deleted.

42 changes: 0 additions & 42 deletions dockerfiles/che/Dockerfile.openj9

This file was deleted.

0 comments on commit f390060

Please sign in to comment.