Pārlūkot izejas kodu

добавил сборку npm, перевел на репозиторий github

Tomishinets Vladimir 3 gadi atpakaļ
vecāks
revīzija
1ea39ed818
1 mainītis faili ar 10 papildinājumiem un 8 dzēšanām
  1. 10 8
      Dockerfile

+ 10 - 8
Dockerfile

@@ -1,24 +1,26 @@
-FROM registry.sdsys.ru/build-image:alpine-3.10-1 as build
+FROM registry.sdsys.ru/build-image:alpine-3.10-2 as build
 ARG branch=release
 ARG gradle_version=5.2.1
 COPY id_rsa /root/.ssh
 RUN export GRADLE_HOME=/opt/gradle/gradle-${gradle_version} \
     && export PATH=${GRADLE_HOME}/bin:${PATH} \
     && gradle -v \
-    && printf "Host github.com \n\tStrictHostKeyChecking no" > /root/.ssh/config \
+    && printf "Host git.alfatell.ru \n\tStrictHostKeyChecking no" > /root/.ssh/config \
     && git clone git@github.com:icruportal/web-registration.git \
     && cd web-registration && git checkout ${branch} \
-    && echo $(git log -p -1 --pretty=format:"%h"|head -n1) > /tmp/version && cd customer-api \
-    && mvn clean install && cd ../promo/ \
+    && echo $(git log -p -1 --pretty=format:"%h"|head -n1) > /tmp/version  \
+    && cd customer-api && mvn clean install \
+    && figlet -c Building Public \
+    && cd ../promo/src/public && npm install \
     && figlet -c Building Promo \
-    && gradle tasks bootWar \
+    && cd ../../ gradle tasks bootWar \
     && rm -rf /root/.ssh/id_rsa
 
 FROM registry.sdsys.ru/iru/iru-base:7.6
 ARG DB_CLUSTER=mongodb1:27017,mongodb2:27018,mongodb3:27019
 ARG SERVER_PORT=9000
-    
+
 HEALTHCHECK --start-period=30s --interval=15s --timeout=5s --retries=2 CMD curl -f 127.0.0.1:${SERVER_PORT} || exit 1
-COPY --from=build /web-registration/promo/build/libs/promo-0.0.1-SNAPSHOT.war /opt/
+COPY --from=build /web-registration-cloud/promo/build/libs/promo-0.0.1-SNAPSHOT.war /opt/
 COPY --from=build /tmp/version /tmp/
-CMD ["java", "-jar", "/opt/promo-0.0.1-SNAPSHOT.war"]
+CMD ["java", "-jar", "/opt/promo-0.0.1-SNAPSHOT.war"]