-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
executable file
·44 lines (35 loc) · 1.56 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
FROM adoptopenjdk/maven-openjdk11
ARG CUSTOMER_NAME
ARG CORE_REVISION
ARG CUSTOMER_REVISION
ARG JDBC_USERNAME
ARG FACTOR_BUILD_FILTER
COPY settings_hflabs.xml /opt/.m2/
RUN apt-get update && apt-get install -y git
# CDI в коде хранится в двух репозиториях — core (общая часть) + сборка заказчика
# clone core
WORKDIR /opt
RUN git clone -n http://automation:[email protected]/test/test.git
# build core
WORKDIR /opt/test
RUN git checkout ${CORE_REVISION} && \
mvn install -s /opt/.m2/settings_hflabs.xml -Dmaven.test.skip=true
# clone customer
WORKDIR /opt
RUN git clone -n http://automation:[email protected]/test/test-${CUSTOMER_NAME}.git
# build and run customer
WORKDIR /opt/test-${CUSTOMER_NAME}
RUN git checkout ${CUSTOMER_REVISION}
ENV JDBC_USERNAME=${JDBC_USERNAME}
ENV FACTOR_BUILD_FILTER=${FACTOR_BUILD_FILTER}
CMD mvn clean install --no-snapshot-updates -s /opt/.m2/settings_hflabs.xml \
-Dmaven.test.skip=true \
-Dmaven.test.mats.skip=false \
-Dteamcity.factor.build.filter=tag:${FACTOR_BUILD_FILTER} \
-Dteamcity.username=automation \
-Dteamcity.password=pass666 \
-Djdbc.username=${JDBC_USERNAME} \
-Dmats.sleepBeforeTestsAfterServersStartedInSec=1000000 \
-Dmats.sleepBeforeTestsAfterServersStartedInHours=240 \
-Djboss.JAVA_OPTS_JVM="-server -Xms1g -Xmx22g -XX:-UseCodeCacheFlushing -XX:ReservedCodeCacheSize=256m -XX:MaxMetaspaceSize=512m -XX:-OmitStackTraceInFastThrow -XX:+UseCompressedOops"
EXPOSE 8080 18080 9990 19990 5005