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.

Ability to add file to a specific directory

See original GitHub issue

Description of the issue: Some web apps require static files to be copied into resources’ staticdirectory. When adding arbitrary files to Jib, it can be more useful to be able to specify target directory.

Similar to the way that a JAR is constructed: https://github.com/oktadeveloper/okta-angular-deployment-example/blob/jar/notes-api/build.gradle.kts#L79

Current workaround is to copy the files into src/main/resources, but these are generated files and shouldn’t go into src. See https://github.com/oktadeveloper/okta-angular-deployment-example/blob/jar/notes-api/build.gradle.kts#L98

jib-gradle-plugin Configuration: See https://github.com/oktadeveloper/okta-angular-deployment-example/blob/jar/notes-api/build.gradle.kts#L98

Additional Information:

cc @mraible

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
TadCordlecommented, May 6, 2020

I think this covers what you’re asking for: https://github.com/GoogleContainerTools/jib/issues/1581

tl;dr - extraDirectories will allow something similar to the following:

maven:

<extraDirectories>
  <paths>
    <path>
      <from>src/main/custom-dir</from>
      <into>/target/on/container</into>
    </path>
    ...
  </paths>
</extraDirectories>

gradle:

jib {
  extraDirectories {
    paths {
      path {
        from = 'src/main/custom-dir'
        into = '/target/on/container'
      }
      ...
    }
  }
}
1reaction
chanseokohcommented, May 21, 2020

@saturnism @mraible Jib 2.3.0 is released with this very handy feature. Now you can designate target directories with jib.extraDirectories.paths.path.into. See https://github.com/GoogleContainerTools/jib/issues/1581#issuecomment-632393257 for an example.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Create a file in a specific directory - Stack Overflow
I would like to save this file in a specific folder, but I can not combine the two things together, and on the...
Read more >
Create a Copy of a File in a Different Directory - Visual Basic
The My.Computer.FileSystem.CopyFile method allows you to copy files. Its parameters provide the ability to overwrite existing files, rename the ...
Read more >
Establishing Windows File and Folder Level Permissions
When you set permissions, you specify what users are allowed to do within that folder, such as save and delete files or create...
Read more >
5 Simple Ways to Create a File in a Directory in Linux - wikiHow
1. Press Ctrl+Alt+T to open the Terminal. The Terminal is a command-line interface that is available on most Linux distributions. It typically has...
Read more >
Add files and folders to shared drives - Google Support
On the left, click a shared drive or existing folder. Click New "" and then Folder. Enter a folder name and click Create....
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