This should allow jenkins to build the docker images with podman

This commit is contained in:
NovaFox161
2021-06-23 15:46:02 -05:00
parent 49d19990fe
commit 518780c8af
18 changed files with 122 additions and 78 deletions
+2 -2
View File
@@ -1,4 +1,4 @@
FROM openjdk:8-jdk
FROM adoptopenjdk/openjdk16:alpine-jre
MAINTAINER DreamExposure
COPY target/DisCal-Server.jar DisCal-Server.jar
COPY server/target/DisCal-Server.jar DisCal-Server.jar
ENTRYPOINT ["java", "-jar", "/DisCal-Server.jar"]
+5
View File
@@ -0,0 +1,5 @@
version=$1
podman build -t rg.nl-ams.scw.cloud/dreamexposure/discal-server:"$version" --file ./Dockerfile .
podman push rg.nl-ams.scw.cloud/dreamexposure/discal-server:"$version" --creds="$SCW_USER:$SCW_SECRET"
+34 -1
View File
@@ -93,7 +93,7 @@
<directory>src/main/resources</directory>
<filtering>true</filtering>
<includes>
<include>server.properties</include>
<include>application.properties</include>
</includes>
</resource>
</resources>
@@ -147,4 +147,37 @@
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>buildDockerImage-JenkinsOnly</id>
<activation>
<property>
<name>env.BUILD_NUMBER</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>${maven.plugin.exec.version}</version>
<executions>
<execution>
<id>Build and Push Docker Image</id>
<phase>install</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>sh</executable>
<commandlineArgs>build-image.sh ${revision}</commandlineArgs>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
@@ -69,7 +69,6 @@ class DisCalServer(val networkInfo: NetworkInfo) : ApplicationRunner {
//Start up spring
try {
SpringApplicationBuilder(Application::class.java)
.properties("spring.config.name:server")
.profiles(BotSettings.PROFILE.get())
.build()
.run(*args)