You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Directory .git is not excluded from the Docker build context.
Since the Dockerfile contains COPY . ., it also invalidates the build cache if you, for example, run git fetch (or your IDE does it for you in the background).
The .git dir cannot be simply added to .dockerignore because it is used in openidm-system/pom.xml for injecting branch name and commit id into org.forgerock.openidm.core.ServerConstants. When you try to do so anyway, the build fails on this error:
[ERROR] Failed to execute goal org.jboss.maven.plugins:maven-injection-plugin:1.0.2:bytecode (default) on project openidm-system: Execution default of goal org.jboss.maven.plugins:maven-injection-plugin:1.0.2:bytecode failed: Cannot invoke "String.length()" because "str" is null -> [Help 1]
See #116 in which the following change was introduced:
Perhaps we should take the other variables from build env as well (pass it from CI), or try to configure (if possible) a fallback for git-commit-id-plugin. Other alternatives may also be possible.
The text was updated successfully, but these errors were encountered:
Directory
.git
is not excluded from the Docker build context.Since the Dockerfile contains
COPY . .
, it also invalidates the build cache if you, for example, rungit fetch
(or your IDE does it for you in the background).The
.git
dir cannot be simply added to.dockerignore
because it is used inopenidm-system/pom.xml
for injecting branch name and commit id intoorg.forgerock.openidm.core.ServerConstants
. When you try to do so anyway, the build fails on this error:See #116 in which the following change was introduced:
Perhaps we should take the other variables from build env as well (pass it from CI), or try to configure (if possible) a fallback for
git-commit-id-plugin
. Other alternatives may also be possible.The text was updated successfully, but these errors were encountered: