Skip to content

Commit

Permalink
GitHub workflows (#9)
Browse files Browse the repository at this point in the history
* updated pom to use exec-maven-plugin for docker

---------

Co-authored-by: Gheorghe Soimu <soimugeo@gmail.com>
  • Loading branch information
soimugeoWB and soimugeo authored Sep 25, 2024
1 parent f4383ee commit 083275c
Showing 1 changed file with 35 additions and 14 deletions.
49 changes: 35 additions & 14 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -147,26 +147,47 @@
</configuration>
</plugin>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>dockerfile-maven-plugin</artifactId>
<version>1.4.13</version>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.3.0</version>
<executions>
<execution>
<id>default</id>
<id>docker-build</id>
<phase>package</phase>
<goals>
<goal>build</goal>
<goal>exec</goal>
</goals>
<configuration>
<executable>docker</executable>
<workingDirectory>${project.basedir}</workingDirectory>
<arguments>
<argument>build</argument>
<argument>-f</argument>
<argument>Dockerfile</argument>
<argument>--build-arg</argument>
<argument>JAR_FILE=${project.artifactId}-${project.version}.jar</argument>
<argument>-t</argument>
<argument>protegeproject/${project.artifactId}:${project.version}</argument>
<argument>.</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>docker-push</id>
<phase>install</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>docker</executable>
<workingDirectory>${project.basedir}</workingDirectory>
<arguments>
<argument>push</argument>
<argument>protegeproject/${project.artifactId}:${project.version}</argument>
</arguments>
</configuration>
</execution>
</executions>
<configuration>
<repository>protegeproject/${project.artifactId}</repository>
<tag>${project.version}</tag>
<buildArgs>
<JAR_FILE>${project.build.finalName}.jar</JAR_FILE>
</buildArgs>
<!-- <username>${env.DOCKER_USERNAME}</username>-->
<!-- <password>${env.DOCKER_PASSWORD}</password>-->
</configuration>
</plugin>
</plugins>
</build>
Expand Down

0 comments on commit 083275c

Please sign in to comment.