Index: Dockerfile =================================================================== diff -u -r1e2dca878c2ac24a36058f32e78638f381c08928 -rdc8021462c50fe975907056bcf85d442b311cb3b --- Dockerfile (.../Dockerfile) (revision 1e2dca878c2ac24a36058f32e78638f381c08928) +++ Dockerfile (.../Dockerfile) (revision dc8021462c50fe975907056bcf85d442b311cb3b) @@ -1,23 +1,47 @@ -# syntax=docker/dockerfile:1.0.0-experimental -FROM node:8-jessie -RUN apt-get update && apt-get install git openssh-client -WORKDIR /usr/app -# This is necessary to prevent the "git clone" operation from failing -# with an "unknown host key" error. -# NOTE: if the gitlab hostname at GPC ever changes, you need to update this -RUN mkdir -m 700 /root/.ssh; \ - touch -m 600 /root/.ssh/known_hosts; \ - ssh-keyscan auapgpdgitapp01.genpt.net > /root/.ssh/known_hosts +#NOTES: To build this image you need to actually log into the Oracle Java site with a proper account to download the Java 8 JRE binaries and +# place the gz archive in the same directory as this Dockerfile. This is because Oracle decided to become licensing jerks. NONE of +# the old PPA repsitories work anymore (8-11-2019) like WebUpd8, etc. +# Oracle installation adapted from https://github.com/oracle/docker-images/tree/master/OracleJava +# Maven and Node installation adapted from https://hub.docker.com/r/jimador/docker-jdk-8-maven-node/dockerfile -#the following RUN line is simply a hack to get around GPCs terrible network security implementation on non-server network, these can be disabled for image execution in prod server subnet -RUN git config --global url.https://github.com/.insteadOf git://github.com/ && git config --global http.sslVerify false && npm config set strict-ssl false +FROM ubuntu:18.04 +ENV JAVA_PKG=server-jre-8u*-linux-x64.tar.gz \ + JAVA_HOME=/usr/java/default +ADD $JAVA_PKG /usr/java/ +ENV MAVEN_VERSION 3.6.1 +ENV NODE_VERSION 11.9.0 +ENV NPM_VERSION 6.9.0 -RUN --mount=type=ssh,id=gpcGitlabPulseKey git clone git@auapgpdgitapp01.genpt.net:Pulse/PulseUI.git -RUN cd PulseUI && git checkout build-conversion +RUN apt-get update && apt-get install -y wget git curl gpg openssh-server -WORKDIR /usr/app/PulseUI/src/main/webapp/app -RUN rm package-lock.json -RUN npm install -RUN npm run build-all +#Add Node's public RSA key: +RUN mkdir ~/.gnupg && echo "disable-ipv6" >> ~/.gnupg/dirmngr.conf +RUN gpg --keyserver ha.pool.sks-keyservers.net --recv-keys A9C5DF4D22E99998D9875A5110C01C5A2F6059E7 +RUN gpg --keyserver ha.pool.sks-keyservers.net --recv-keys 8FCCA13FEF1D0C2E91008E09770F7A9A5AE15600 - +RUN export JAVA_DIR=$(ls -1 -d /usr/java/*) && \ + ln -s $JAVA_DIR /usr/java/latest && \ + ln -s $JAVA_DIR /usr/java/default && \ + update-alternatives --install /usr/bin/java java $JAVA_DIR/bin/java 20000 && \ + update-alternatives --install /usr/bin/javac javac $JAVA_DIR/bin/javac 20000 && \ + update-alternatives --install /usr/bin/jar jar $JAVA_DIR/bin/jar 20000 + +ENV MAVEN_ROOT /var/lib/maven +ENV MAVEN_HOME $MAVEN_ROOT/apache-maven-$MAVEN_VERSION +ENV MAVEN_OPTS -Xms256m -Xmx512m + +RUN wget --no-verbose -O /tmp/apache-maven-$MAVEN_VERSION.tar.gz \ + http://archive.apache.org/dist/maven/maven-3/$MAVEN_VERSION/binaries/apache-maven-$MAVEN_VERSION-bin.tar.gz && \ + mkdir -p $MAVEN_ROOT && \ + tar xzf /tmp/apache-maven-$MAVEN_VERSION.tar.gz -C $MAVEN_ROOT && \ + ln -s $MAVEN_HOME/bin/mvn /usr/local/bin && \ + rm -f /tmp/apache-maven-$MAVEN_VERSION.tar.gz + +RUN curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-x64.tar.gz" \ + && curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" \ + && gpg --verify SHASUMS256.txt.asc \ + && grep " node-v$NODE_VERSION-linux-x64.tar.gz\$" SHASUMS256.txt.asc | sha256sum -c - \ + && tar -xzf "node-v$NODE_VERSION-linux-x64.tar.gz" -C /usr/local --strip-components=1 \ + && rm "node-v$NODE_VERSION-linux-x64.tar.gz" SHASUMS256.txt.asc \ + && npm install -g npm@"$NPM_VERSION" + \ No newline at end of file FishEye: Tag dc8021462c50fe975907056bcf85d442b311cb3b refers to a dead (removed) revision in file `Dockerfile.backend'. FishEye: No comparison available. Pass `N' to diff? Index: docker-resources/Dockerfile.backend =================================================================== diff -u --- docker-resources/Dockerfile.backend (revision 0) +++ docker-resources/Dockerfile.backend (revision dc8021462c50fe975907056bcf85d442b311cb3b) @@ -0,0 +1,16 @@ +FROM maven-gpc:0.0.1 as build_task +ARG ENVIRONMENT +WORKDIR /usr/src/pulseui +COPY ./src/ ./src/ +COPY ./pulsedb/ ./pulsedb/ +COPY ./pom.xml ./ +RUN mvn clean package -P $ENVIRONMENT,US-$ENVIRONMENT -f pom.xml -Dmaven.test.skip + +FROM rettwalker/jboss_eap:1.0.0 +ARG ENVIRONMENT + +ADD configuration/$ENVIRONMENT/standalone/configuration/* $JBOSS_HOME/standalone/configuration/ + +COPY --from=build_task /usr/src/pulseui/target/pulseui.war $JBOSS_HOME/standalone/deployments/ + +CMD ["/opt/jboss/EAP-6.4.0/bin/standalone.sh", "-bmanagement", "0.0.0.0"] Index: docker-resources/Dockerfile.isolated-frontend-build =================================================================== diff -u --- docker-resources/Dockerfile.isolated-frontend-build (revision 0) +++ docker-resources/Dockerfile.isolated-frontend-build (revision dc8021462c50fe975907056bcf85d442b311cb3b) @@ -0,0 +1,23 @@ +# syntax=docker/dockerfile:1.0.0-experimental +FROM node:8-jessie +RUN apt-get update && apt-get install git openssh-client +WORKDIR /usr/app +# This is necessary to prevent the "git clone" operation from failing +# with an "unknown host key" error. +# NOTE: if the gitlab hostname at GPC ever changes, you need to update this +RUN mkdir -m 700 /root/.ssh; \ + touch -m 600 /root/.ssh/known_hosts; \ + ssh-keyscan auapgpdgitapp01.genpt.net > /root/.ssh/known_hosts + +#the following RUN line is simply a hack to get around GPCs terrible network security implementation on non-server network, these can be disabled for image execution in prod server subnet +RUN git config --global url.https://github.com/.insteadOf git://github.com/ && git config --global http.sslVerify false && npm config set strict-ssl false + +RUN --mount=type=ssh,id=gpcGitlabPulseKey git clone git@auapgpdgitapp01.genpt.net:Pulse/PulseUI.git +RUN cd PulseUI && git checkout build-conversion + +WORKDIR /usr/app/PulseUI/src/main/webapp/app +RUN rm package-lock.json +RUN npm install +RUN npm run build-all + + Index: pom.xml =================================================================== diff -u -r9acb91555ea4ed89f40ccc537e4b76df8162fecd -rdc8021462c50fe975907056bcf85d442b311cb3b --- pom.xml (.../pom.xml) (revision 9acb91555ea4ed89f40ccc537e4b76df8162fecd) +++ pom.xml (.../pom.xml) (revision dc8021462c50fe975907056bcf85d442b311cb3b) @@ -473,14 +473,12 @@ ${pulseui.artifactId} - org.openclover clover-maven-plugin 4.3.1 - ${basedir}/src/main/webapp/app/src resources/js @@ -600,6 +598,15 @@ + + + com.github.eirslett + frontend-maven-plugin + + 1.8.0 + + @@ -647,7 +654,6 @@ C:/log/pulse-web.log - UAP-DEV @@ -690,8 +696,6 @@ C:/log/pulse-web-uap.log - - DEV @@ -702,6 +706,51 @@ + TESTME + + + frontend.build + true + + + + + + org.codehaus.mojo + exec-maven-plugin + 1.3.2 + + ${project.basedir}\src\main\webapp\app + + + + + + + npm run build (compile) + + exec + + compile + + npm + + run + build-all + + + + + + + + + + QA + + + + HOTDEPLOY