-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Support valueFrom syntax for build env vars #14143
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -483,31 +483,36 @@ const ( | |
// one container with a non-zero exit status. | ||
StatusReasonFailedContainer StatusReason = "FailedContainer" | ||
|
||
// StatusReasonUnresolvableEnvironmentVariable indicates that an error occurred processing | ||
// the supplied options for environment variables in the build strategy environment | ||
StatusReasonUnresolvableEnvironmentVariable StatusReason = "UnresolvableEnvironmentVariable" | ||
|
||
// StatusReasonGenericBuildFailed is the reason associated with a broad | ||
// range of build failures. | ||
StatusReasonGenericBuildFailed StatusReason = "GenericBuildFailed" | ||
) | ||
|
||
// NOTE: These messages might change. | ||
const ( | ||
StatusMessageCannotCreateBuildPodSpec = "Failed to create pod spec." | ||
StatusMessageCannotCreateBuildPod = "Failed creating build pod." | ||
StatusMessageInvalidOutputRef = "Output image could not be resolved." | ||
StatusMessageCancelBuildFailed = "Failed to cancel build." | ||
StatusMessageBuildPodDeleted = "The pod for this build was deleted before the build completed." | ||
StatusMessageExceededRetryTimeout = "Build did not complete and retrying timed out." | ||
StatusMessageMissingPushSecret = "Missing push secret." | ||
StatusMessagePostCommitHookFailed = "Build failed because of post commit hook." | ||
StatusMessagePushImageToRegistryFailed = "Failed to push the image to the registry." | ||
StatusMessagePullBuilderImageFailed = "Failed pulling builder image." | ||
StatusMessageFetchSourceFailed = "Failed to fetch the input source." | ||
StatusMessageInvalidContextDirectory = "The supplied context directory does not exist." | ||
StatusMessageCancelledBuild = "The build was cancelled by the user." | ||
StatusMessageDockerBuildFailed = "Docker build strategy has failed." | ||
StatusMessageBuildPodExists = "The pod for this build already exists and is older than the build." | ||
StatusMessageNoBuildContainerStatus = "The pod for this build has no container statuses indicating success or failure." | ||
StatusMessageFailedContainer = "The pod for this build has at least one container with a non-zero exit status." | ||
StatusMessageGenericBuildFailed = "Generic Build failure - check logs for details." | ||
StatusMessageCannotCreateBuildPodSpec = "Failed to create pod spec." | ||
StatusMessageCannotCreateBuildPod = "Failed creating build pod." | ||
StatusMessageInvalidOutputRef = "Output image could not be resolved." | ||
StatusMessageCancelBuildFailed = "Failed to cancel build." | ||
StatusMessageBuildPodDeleted = "The pod for this build was deleted before the build completed." | ||
StatusMessageExceededRetryTimeout = "Build did not complete and retrying timed out." | ||
StatusMessageMissingPushSecret = "Missing push secret." | ||
StatusMessagePostCommitHookFailed = "Build failed because of post commit hook." | ||
StatusMessagePushImageToRegistryFailed = "Failed to push the image to the registry." | ||
StatusMessagePullBuilderImageFailed = "Failed pulling builder image." | ||
StatusMessageFetchSourceFailed = "Failed to fetch the input source." | ||
StatusMessageInvalidContextDirectory = "The supplied context directory does not exist." | ||
StatusMessageCancelledBuild = "The build was cancelled by the user." | ||
StatusMessageDockerBuildFailed = "Docker build strategy has failed." | ||
StatusMessageBuildPodExists = "The pod for this build already exists and is older than the build." | ||
StatusMessageNoBuildContainerStatus = "The pod for this build has no container statuses indicating success or failure." | ||
StatusMessageFailedContainer = "The pod for this build has at least one container with a non-zero exit status." | ||
StatusMessageGenericBuildFailed = "Generic Build failure - check logs for details." | ||
StatusMessageUnresolvableEnvironmentVariable = "Unable to resolve build environment variable reference." | ||
) | ||
|
||
// BuildStatusOutput contains the status of the built image. | ||
|
@@ -720,7 +725,6 @@ type CustomBuildStrategy struct { | |
PullSecret *kapi.LocalObjectReference | ||
|
||
// Env contains additional environment variables you want to pass into a builder container. | ||
// ValueFrom is not supported. | ||
Env []kapi.EnvVar | ||
|
||
// ExposeDockerSocket will allow running Docker commands (and build Docker images) from | ||
|
@@ -777,7 +781,6 @@ type DockerBuildStrategy struct { | |
NoCache bool | ||
|
||
// Env contains additional environment variables you want to pass into a builder container. | ||
// ValueFrom is not supported. | ||
Env []kapi.EnvVar | ||
|
||
// Args contains any build arguments that are to be passed to Docker. See | ||
|
@@ -813,7 +816,6 @@ type SourceBuildStrategy struct { | |
PullSecret *kapi.LocalObjectReference | ||
|
||
// Env contains additional environment variables you want to pass into a builder container. | ||
// ValueFrom is not supported. | ||
Env []kapi.EnvVar | ||
|
||
// Scripts is the location of Source scripts | ||
|
@@ -852,7 +854,6 @@ type JenkinsPipelineBuildStrategy struct { | |
Jenkinsfile string | ||
|
||
// Env contains additional environment variables you want to pass into a build pipeline. | ||
// ValueFrom is not supported. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. since based on other discussion i think we're supporting ValueFrom in BuildRequest.Env now too, please update the doc there too (And make sure our validation allows it). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. updated in next push |
||
Env []kapi.EnvVar | ||
} | ||
|
||
|
@@ -1209,7 +1210,6 @@ type BuildRequest struct { | |
LastVersion *int64 | ||
|
||
// Env contains additional environment variables you want to pass into a builder container. | ||
// ValueFrom is not supported. | ||
Env []kapi.EnvVar | ||
|
||
// TriggeredBy describes which triggers started the most recent update to the | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
Please also update docs in v1/types.go
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.
fixed in next push