For a multimodule maven project build using com.spotify:dockerfile-maven-plugin on a CI runner, building the docker image with dockerfile:build dockerfile:tag
in a previous step, and running mvn clean deploy dockerfile:push
in deploy step results in an error:
Failed to execute goal com.spotify:dockerfile-maven-
plugin:VERSION:tag (default-cli) on project PROJECT_NAME: Execution
default-cli of goal com.spotify:dockerfile-maven-plugin:VERSION:tag
failed: path is 'null'.
Logs:
Tagging image null as REPO_NAME/IMAGE_NAME
Evidently, the built image isn't getting tagged properly.
pom.xml
:
<configuration>
<repository>${prefix}/${project.artifactId}</repository>
<tag>${tag}</tag>
<buildArgs>
<JAR_FILE>${project.build.finalName}.jar</JAR_FILE>
</buildArgs>
<skip>false</skip>
</configuration>
But I can't really find what I'm doing wrong.