Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix documentation of configuring extraDirectories for Gradle plugin #3682

Merged

Conversation

KENNYSOFT
Copy link
Contributor

@KENNYSOFT KENNYSOFT commented Jun 2, 2022

Current documentation:

https://github.com/GoogleContainerTools/jib/blob/c419354aa42c4c8a2a32f93c1524d0b31b598979/docs/faq.md#i-need-to-add-files-generated-during-the-build-process-to-a-custom-directory-on-the-image

The same can be accomplished in Gradle by using a Copy task. In your build.gradle:

jib.extraDirectories = file('build/extra-directory')

does not meet the syntax:

https://github.com/GoogleContainerTools/jib/blob/b7bdec593cc4b8614c9a66e2487b2a2ad80f6aed/jib-gradle-plugin#adding-arbitrary-files-to-the-image

You can configure different directories by using the jib.extraDirectories.paths parameter in your build.gradle:

jib {
  // Copies files from 'src/main/custom-extra-dir' and '/home/user/jib-extras' instead of 'src/main/jib'
  extraDirectories.paths = ['src/main/custom-extra-dir', '/home/user/jib-extras']
}

@sonarcloud
Copy link

sonarcloud bot commented Jun 6, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@KENNYSOFT
Copy link
Contributor Author

+ docker kill
"docker kill" requires at least 1 argument.
See 'docker kill --help'.

Usage: docker kill [OPTIONS] CONTAINER [CONTAINER...]

Kill one or more running containers
+ true
+ '[' MACOS_EXTERNAL = MACOS_EXTERNAL ']'
+ osascript -e 'quit app "Docker"'
+ open -a Docker
Unable to find application named 'Docker'

[ID: 7921967] Build finished after 45 secs, exit value: 1

Have no idea why 'kokoro-macos' check fails 🤔

@zhumin8
Copy link
Contributor

zhumin8 commented Jun 13, 2022

Thanks for catching this.
'kokoro-macos' check fail is related to an internal infra error. We'll fix and rerun this check.

Copy link
Contributor

@zhumin8 zhumin8 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching this and making our FAQ more consistent!
jib.extraDirectories = file('build/extra-directory') is one of the older syntax shown here, that is later deprecated in #1671 and removed in #2108.

@zhumin8 zhumin8 merged commit e505a95 into GoogleContainerTools:master Jul 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants