Skip to content

Conversation

@mpeddada1
Copy link
Contributor

For #3034

@mpeddada1 mpeddada1 requested a review from chanseokoh March 4, 2021 21:05
@google-cla google-cla bot added the cla: yes label Mar 4, 2021
@codecov
Copy link

codecov bot commented Mar 4, 2021

Codecov Report

Merging #3111 (db26aef) into master (d5aa9bb) will decrease coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #3111      +/-   ##
============================================
- Coverage     71.14%   71.12%   -0.02%     
- Complexity     2314     2315       +1     
============================================
  Files           278      278              
  Lines          9782     9790       +8     
  Branches        991      991              
============================================
+ Hits           6959     6963       +4     
- Misses         2478     2482       +4     
  Partials        345      345              
Impacted Files Coverage Δ Complexity Δ
...com/google/cloud/tools/jib/maven/BuildTarMojo.java 0.00% <0.00%> (ø) 0.00% <0.00%> (ø%)
...m/google/cloud/tools/jib/maven/BuildImageMojo.java 0.00% <0.00%> (ø) 0.00% <0.00%> (ø%)
.../google/cloud/tools/jib/maven/BuildDockerMojo.java 0.00% <0.00%> (ø) 0.00% <0.00%> (ø%)
...le/cloud/tools/jib/maven/skaffold/SyncMapMojo.java 0.00% <0.00%> (ø) 0.00% <0.00%> (ø%)
.../cloud/tools/jib/maven/MavenProjectProperties.java 82.02% <0.00%> (+0.13%) 73.00% <0.00%> (ø%)
.../cloud/tools/jib/maven/JibPluginConfiguration.java 67.88% <0.00%> (+0.26%) 54.00% <0.00%> (+1.00%)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d5aa9bb...db26aef. Read the comment docs.

`skaffold` | [`skaffold`](#skaffold-integration) | See [`skaffold`](#skaffold-integration) | Configures the internal skaffold tasks. This configuration should only be used when integrating with [`skaffold`](#skaffold-integration). |
`containerizingMode` | `String` | `exploded` | If set to `packaged`, puts the JAR artifact built by the Gradle Java plugin into the final image. If set to `exploded` (default), containerizes individual `.class` files and resources files.
`allowInsecureRegistries` | `boolean` | `false` | If set to true, Jib ignores HTTPS certificate errors and may fall back to HTTP as a last resort. Leaving this parameter set to `false` is strongly recommended, since HTTP communication is unencrypted and visible to others on the network, and insecure HTTPS is no better than plain HTTP. [If accessing a registry with a self-signed certificate, adding the certificate to your Java runtime's trusted keys](https://github.com/GoogleContainerTools/jib/tree/master/docs/self_sign_cert.md) may be an alternative to enabling this option.
`configurationName` | `String` | `runtimeClasspath` | Configures the name of the [Gradle Configuration](https://docs.gradle.org/current/dsl/org.gradle.api.artifacts.Configuration.html) to use. It can be used to be selective about the dependencies and artifacts added to the container.
Copy link
Member

Choose a reason for hiding this comment

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

This change should be in a separate PR so that we can merge it after making the next release.

Suggested change
`configurationName` | `String` | `runtimeClasspath` | Configures the name of the [Gradle Configuration](https://docs.gradle.org/current/dsl/org.gradle.api.artifacts.Configuration.html) to use. It can be used to be selective about the dependencies and artifacts added to the container.
`configurationName` | `String` | `runtimeClasspath` | Configures the name of the [Gradle Configuration](https://docs.gradle.org/current/dsl/org.gradle.api.artifacts.ConfigurationContainer.html) to use. It can be used to be selective about the dependencies and artifacts added to the container.

The new link seems more user-friendly.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch. I will move this change out of this PR.

Comment on lines 8 to 13
- Added an option `configurationName` to specify the name of the [Gradle Configuration](https://docs.gradle.org/current/dsl/org.gradle.api.artifacts.Configuration.html) to use. This change introduces lazy evaluation by exposing the Gradle Property through a getter, which is different from the traditional route of using Gradle Provider and Property. ([#3034](https://github.com/GoogleContainerTools/jib/pull/3034))
```gradle
jib {
configurationName.set("myconfig")
}
```
Copy link
Member

Choose a reason for hiding this comment

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

I'm pretty sure you can do configurationName = 'myconfig', but you can double-check. How about this?

Suggested change
- Added an option `configurationName` to specify the name of the [Gradle Configuration](https://docs.gradle.org/current/dsl/org.gradle.api.artifacts.Configuration.html) to use. This change introduces lazy evaluation by exposing the Gradle Property through a getter, which is different from the traditional route of using Gradle Provider and Property. ([#3034](https://github.com/GoogleContainerTools/jib/pull/3034))
```gradle
jib {
configurationName.set("myconfig")
}
```
- Added an option `configurationName` to specify the name of the [Gradle Configuration](https://docs.gradle.org/current/dsl/org.gradle.api.artifacts.Configuration.html
) to use. The option can be lazily configured, for example, using Gradle `Provider` or `Property`. ([#3034](https://github.com/GoogleContainerTools/jib/pull/3034))
```gradle
jib {
configurationName.set = 'myconfig'
}

@mpeddada1 mpeddada1 changed the title Update CHANGELOG and usage doc for the new option: configurationName Update jib-gradle-plugin/CHANGELOG for the new option: configurationName Mar 4, 2021
- Added an option `configurationName` to specify the name of the [Gradle Configuration](https://docs.gradle.org/current/dsl/org.gradle.api.artifacts.ConfigurationContainer.html) to use. The option can be lazily configured, for example, using Gradle `Provider` or `Property`. ([#3034](https://github.com/GoogleContainerTools/jib/pull/3034))
```gradle
jib {
configurationName.set = 'myconfig'
Copy link
Member

Choose a reason for hiding this comment

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

Ah, my bad. I think it's just

Suggested change
configurationName.set = 'myconfig'
configurationName = 'myconfig'

Right? (I think it worked in this way.)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My bad, thank you. Just did a quick test and configurationName = 'myConfig' works.

Copy link
Member

@chanseokoh chanseokoh left a comment

Choose a reason for hiding this comment

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

I think the syntax is invalid, but other than that, LGTM.

@mpeddada1 mpeddada1 merged commit f884fa1 into master Mar 8, 2021
@mpeddada1 mpeddada1 deleted the update-docs-gradle-config branch March 8, 2021 20:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants