Adds thin repo property to stub runner docker
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
FROM ubuntu:20.04
|
||||
|
||||
ARG SDKMAN_JAVA_INSTALLATION=17.0.1-tem
|
||||
ARG THIN_REPO=https://repo.spring.io/snapshot
|
||||
|
||||
LABEL Author="Marcin Grzejszczak <mgrzejszczak@pivotal.io>"
|
||||
LABEL Author="Bastian Doetsch <bdoetsch@vmware.com>"
|
||||
@@ -32,8 +33,8 @@ VOLUME /tmp
|
||||
COPY --chown=scc:scc target/maven_dependencies /home/scc/.m2/repository/
|
||||
COPY --chown=scc:scc target/libs/stub-runner-boot.jar stub-runner-boot.jar
|
||||
RUN echo "Fetching dependencies, please wait..."
|
||||
RUN java -Dthin.dryrun=true -jar stub-runner-boot.jar
|
||||
RUN java -Dthin.dryrun=true -jar stub-runner-boot.jar --thin.profile=rabbit
|
||||
RUN java -Dthin.dryrun=true -jar stub-runner-boot.jar --thin.profile=kafka
|
||||
RUN java -Dthin.dryrun=true -Dthin.repo=${THIN_REPO} -jar stub-runner-boot.jar
|
||||
RUN java -Dthin.dryrun=true -Dthin.repo=${THIN_REPO} -jar stub-runner-boot.jar --thin.profile=rabbit
|
||||
RUN java -Dthin.dryrun=true -Dthin.repo=${THIN_REPO} -jar stub-runner-boot.jar --thin.profile=kafka
|
||||
COPY --chown=scc:scc run.sh run.sh
|
||||
ENTRYPOINT ["./run.sh"]
|
||||
|
||||
@@ -17,6 +17,10 @@
|
||||
<name>Spring Cloud Contract Stub Runner Docker</name>
|
||||
<description>Spring Cloud Contract Stub Runner Docker</description>
|
||||
|
||||
<properties>
|
||||
<thin.repo>https://repo.spring.io/snapshot</thin.repo>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<!-- Required, otherwise the docker image generation fails for GA -->
|
||||
<dependency>
|
||||
@@ -156,6 +160,13 @@
|
||||
<artifactId>spring-cloud-starter-contract-stub-runner-jetty</artifactId>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot.experimental</groupId>
|
||||
<artifactId>spring-boot-thin-launcher</artifactId>
|
||||
<version>${thin-jar.version}</version>
|
||||
<classifier>exec</classifier>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- Otherwise dependency is provided and class is missing -->
|
||||
<dependency>
|
||||
@@ -242,6 +253,9 @@
|
||||
<tag>${project.version}</tag>
|
||||
<username>${env.DOCKER_HUB_USERNAME}</username>
|
||||
<password>${env.DOCKER_HUB_PASSWORD}</password>
|
||||
<buildArgs>
|
||||
<THIN_REPO>${thin.repo}</THIN_REPO>
|
||||
</buildArgs>
|
||||
</configuration>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
@@ -253,4 +267,18 @@
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>milestone</id>
|
||||
<properties>
|
||||
<thin.repo>https://repo.spring.io/milestone</thin.repo>
|
||||
</properties>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>central</id>
|
||||
<properties>
|
||||
<thin.repo>https://repo.maven.apache.org/maven2</thin.repo>
|
||||
</properties>
|
||||
</profile>
|
||||
</profiles>
|
||||
</project>
|
||||
|
||||
1
pom.xml
1
pom.xml
@@ -43,6 +43,7 @@
|
||||
<json-unit-assertj.version>2.32.0</json-unit-assertj.version>
|
||||
<rest-assured.version>5.2.1</rest-assured.version>
|
||||
<slf4j.version>[2.0.0,)</slf4j.version>
|
||||
<thin-jar.version>1.0.28.RELEASE</thin-jar.version>
|
||||
|
||||
<junit-vintage.version>5.9.1</junit-vintage.version>
|
||||
<junit-jupiter.version>5.9.1</junit-jupiter.version>
|
||||
|
||||
@@ -13,9 +13,6 @@
|
||||
<packaging>jar</packaging>
|
||||
<name>Spring Cloud Contract Stub Runner Boot</name>
|
||||
<description>Spring Cloud Contract Stub Runner Boot</description>
|
||||
<properties>
|
||||
<thin-jar.version>1.0.28.RELEASE</thin-jar.version>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
|
||||
Reference in New Issue
Block a user