mirror of
https://github.com/DreamExposure/DisCal-Discord-Bot.git
synced 2026-05-03 07:39:51 -05:00
This should allow jenkins to build the docker images with podman
This commit is contained in:
+2
-2
@@ -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"]
|
||||
|
||||
@@ -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
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user