question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

extraDirectories property should validate if the supplied path exists

See original GitHub issue

Environment:

  • Jib version: 3.1.4
  • Build tool: Maven 3.6.2

Description of the issue:

<configuration>
    <extraDirectories>
         <paths>
             <path>missing/folder</path>
          </paths>
     </extraDirectories>
</configuration>

Using the extraDirectories config above to copy additional files doesn’t fail the build even the path is invalid or not a folder. This behaviour is not good for catching bugs early if the additional files are crucial for the docker container.

Expected behaviour: Should be similar to the docker build command which would throw the following exception if a Dockerfile has a command to copy a non-existent folder:

 => ERROR [stage-1 2/2] COPY missing/folder /app                                                                                                                                     0.0s
------
 > [stage-1 2/2] COPY missing/folder /app:
------
failed to compute cache key: "/missing/folder" not found: not found

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
chanseokohcommented, Jan 4, 2022

The reason we don’t check the existence is due to the default implicit directory src/main/jib, which doesn’t exist often. Perhaps we should fail only for non-default directories. Contributions are welcome.

1reaction
meltsufincommented, Jan 4, 2022

Thank you for submitting this enhancement request.

Read more comments on GitHub >

github_iconTop Results From Across the Web

google/jib - Gitter
Yes, I'm trying to use the jib gradle plugin with one of our java 14 applications. I added jib.from.image="gcr.io/distroless/java:14". to my build.gradle, ...
Read more >
Configuration - Identity Provider 4 - Confluence
When you see a syntax like this: name 4.2. That signifies a feature, setting, property, etc. that is only available in the corresponding ......
Read more >
How do I create a directory inside container with JIB?
Jib allows adding arbitrary extra files and directories using the <extraDirectories> (Maven / Gradle) configuration. Files and (sub-)directories ...
Read more >
Compiler object methods - The Meson Build system
Defining include paths for headers not in the default include path via -Isome/path/to/header ... If set to true , Meson will halt if...
Read more >
Cross Platform Make - CMake
If run from the top of a binary tree for a CMake project it will dump additional information such as the ... True...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found