Skip to content

Commit

Permalink
Uses fabricio docker maven plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
anurag.ag authored and anuragagarwal561994 committed Jul 30, 2022
1 parent b7c9dfb commit 78c1f9f
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 27 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
echo "app_ver=$(mvn -B help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV
-
name: Build with Maven
run: mvn -B clean integration-test package assembly:single docker:build
run: mvn -B clean integration-test package docker:build

# github_release:
-
Expand Down
46 changes: 22 additions & 24 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
<protobuf.version>3.19.1</protobuf.version>
<testcontainers.version>1.16.2</testcontainers.version>
<kafka-libs.version>6.1.4</kafka-libs.version>
<docker.base.image>eclipse-temurin:11</docker.base.image>
</properties>

<scm>
Expand Down Expand Up @@ -220,14 +221,6 @@
</compilerArgs>
</configuration>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptors>
<descriptor>src/main/assembly/bin.xml</descriptor>
</descriptors>
</configuration>
</plugin>
<plugin>
<!-- Build an executable JAR -->
<groupId>org.apache.maven.plugins</groupId>
Expand All @@ -243,24 +236,29 @@
</configuration>
</plugin>
<plugin>
<groupId>com.spotify</groupId>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>1.2.0</version>
<version>0.40.1</version>
<configuration>
<imageName>obsidiandynamics/kafdrop</imageName>
<forceTags>true</forceTags>
<dockerDirectory>${project.build.directory}/docker-ready</dockerDirectory>
<imageTags>
<imageTag>${project.version}</imageTag>
<imageTag>latest</imageTag>
</imageTags>
<resources>
<resource>
<targetPath>/</targetPath>
<directory>${project.build.directory}</directory>
<include>${project.build.finalName}-bin.tar.gz</include>
</resource>
</resources>
<verbose>true</verbose>
<sourceDirectory>src/main/assembly</sourceDirectory>
<images>
<image>
<name>obsidiandynamics/kafdrop</name>
<build>
<tags>
<tag>${project.version}</tag>
<tag>latest</tag>
</tags>
<contextDir>${project.build.directory}/docker-ready</contextDir>
<assembly>
<name>${project.build.finalName}</name>
<mode>tar</mode>
<descriptor>bin.xml</descriptor>
</assembly>
</build>
</image>
</images>
</configuration>
</plugin>
<plugin>
Expand Down
4 changes: 2 additions & 2 deletions src/main/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM eclipse-temurin:11
FROM ${docker.base.image}

ADD kafdrop.sh /
ADD kafdrop*tar.gz /
ADD ${project.build.finalName} /${project.build.finalName}

RUN chmod +x /kafdrop.sh

Expand Down

0 comments on commit 78c1f9f

Please sign in to comment.