-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Feature/set environment variable for cred helper #3093
Feature/set environment variable for cred helper #3093
Conversation
…nd GradleRawConfiguration
…tialHelperFactory
…t options to processBuilder
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution!
I have some high-level comments. And be sure to run ./gradlew googleJavaFormat
(or simply, ./gradlew goJF
) to auto-format the code.
@@ -225,4 +221,22 @@ public Path getImageJsonOutputPath() { | |||
public List<? extends PlatformConfiguration> getPlatforms() { | |||
return jibExtension.getFrom().getPlatforms().get(); | |||
} | |||
|
|||
@Override | |||
public Map<String, String> getFromEnvironment() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getFromCredHelperEnvironment
@Input | ||
@Nullable | ||
@Optional | ||
public Map<String, String> getEnvironment() { | ||
return environment; | ||
} | ||
|
||
public void setEnvironment(Map<String, String> environment) { | ||
this.environment = environment; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The way we want is to set this through jib.from.credHelper.environment
as I showed in #2814 (comment), not through jib.from.environment
as you did here.
An important thing is to maintain backward compatibility. That is, all of these should work:
jib.from {
image = ...
credHelper = 'ecr-login`
}
jib.from {
image = ...
credHelper.helper = 'ecr-login'
}
jib.from {
image = ...
credHelper {
helper = 'ecr-login'
environment = ...
}
}
@Input | ||
@Nullable | ||
@Optional | ||
public Map<String, String> getEnvironment() { | ||
return environment; | ||
} | ||
|
||
public void setEnvironment(Map<String, String> environment) { | ||
this.environment = environment; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
@vinod-tahelyani just checking in, do you still plan to complete this PR? |
Closing (#2814 (comment)). |
Fixes #2814