|
@@ -1,5 +1,6 @@
|
|
|
FROM registry.sdsys.ru/iru/iru-base:7.6 as build
|
|
|
ENV JAVA_HOME=/usr/java/jdk1.8.0_191-amd64
|
|
|
+ARG branch=newPromoSpring
|
|
|
RUN mkdir /root/.ssh
|
|
|
COPY id_rsa /root/.ssh
|
|
|
#WORKDIR /web-registration-cloud/promo/build/libs/
|
|
@@ -12,7 +13,8 @@ RUN yum install -y https://centos7.iuscommunity.org/ius-release.rpm \
|
|
|
&& gradle -v \
|
|
|
&& printf "Host git.alfatell.ru \n\tStrictHostKeyChecking no" > /root/.ssh/config \
|
|
|
&& git clone ssh://gitolite@git.alfatell.ru:2223/web-registration-cloud.git \
|
|
|
- && cd web-registration-cloud && git checkout newPromoSpring && cd customer-api \
|
|
|
+ && cd web-registration-cloud && git checkout ${branch} \
|
|
|
+ && echo $(git log -p -1 --pretty=format:"%h"|head -n1) > /tmp/version && cd customer-api \
|
|
|
&& mvn clean install && cd ../promo/ \
|
|
|
&& figlet -c Building Promo \
|
|
|
&& gradle tasks bootWar \
|
|
@@ -21,4 +23,5 @@ RUN yum install -y https://centos7.iuscommunity.org/ius-release.rpm \
|
|
|
FROM registry.sdsys.ru/iru/iru-base:7.6
|
|
|
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-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"]
|