Skip to content

Commit

Permalink
Merge pull request #12439 from oatmealraisin/rymurphy/docker-args
Browse files Browse the repository at this point in the history
Merged by openshift-bot
  • Loading branch information
OpenShift Bot authored Mar 3, 2017
2 parents 79264a2 + ce319b2 commit e164e80
Show file tree
Hide file tree
Showing 38 changed files with 1,368 additions and 438 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 24 additions & 0 deletions api/swagger-spec/oapi-v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -23558,6 +23558,13 @@
"dockerfilePath": {
"type": "string",
"description": "dockerfilePath is the path of the Dockerfile that will be used to build the Docker image, relative to the root of the context (contextDir)."
},
"buildArgs": {
"type": "array",
"items": {
"$ref": "v1.EnvVar"
},
"description": "Args contains any build arguments that are to be passed to Docker. See https://docs.docker.com/engine/reference/builder/#/arg for more details"
}
}
},
Expand Down Expand Up @@ -24096,6 +24103,10 @@
"$ref": "v1.BuildTriggerCause"
},
"description": "triggeredBy describes which triggers started the most recent update to the build configuration and contains information about those triggers."
},
"dockerStrategyOptions": {
"$ref": "v1.DockerStrategyOptions",
"description": "DockerStrategyOptions contains additional docker-strategy specific options for the build"
}
}
},
Expand Down Expand Up @@ -24163,6 +24174,19 @@
}
}
},
"v1.DockerStrategyOptions": {
"id": "v1.DockerStrategyOptions",
"description": "DockerStrategyOptions contains extra strategy options for Docker builds",
"properties": {
"buildArgs": {
"type": "array",
"items": {
"$ref": "v1.EnvVar"
},
"description": "Args contains any build arguments that are to be passed to Docker. See https://docs.docker.com/engine/reference/builder/#/arg for more details"
}
}
},
"v1.BuildList": {
"id": "v1.BuildList",
"description": "BuildList is a collection of Builds.",
Expand Down
23 changes: 23 additions & 0 deletions api/swagger-spec/openshift-openapi-spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -48418,6 +48418,10 @@
"description": "binary indicates a request to build from a binary provided to the builder",
"$ref": "#/definitions/v1.BinaryBuildSource"
},
"dockerStrategyOptions": {
"description": "DockerStrategyOptions contains additional docker-strategy specific options for the build",
"$ref": "#/definitions/v1.DockerStrategyOptions"
},
"env": {
"description": "env contains additional environment variables you want to pass into a builder container. ValueFrom is not supported.",
"type": "array",
Expand Down Expand Up @@ -50283,6 +50287,13 @@
"v1.DockerBuildStrategy": {
"description": "DockerBuildStrategy defines input parameters specific to Docker build.",
"properties": {
"buildArgs": {
"description": "Args contains any build arguments that are to be passed to Docker. See https://docs.docker.com/engine/reference/builder/#/arg for more details",
"type": "array",
"items": {
"$ref": "#/definitions/v1.EnvVar"
}
},
"dockerfilePath": {
"description": "dockerfilePath is the path of the Dockerfile that will be used to build the Docker image, relative to the root of the context (contextDir).",
"type": "string"
Expand Down Expand Up @@ -50312,6 +50323,18 @@
}
}
},
"v1.DockerStrategyOptions": {
"description": "DockerStrategyOptions contains extra strategy options for Docker builds",
"properties": {
"buildArgs": {
"description": "Args contains any build arguments that are to be passed to Docker. See https://docs.docker.com/engine/reference/builder/#/arg for more details",
"type": "array",
"items": {
"$ref": "#/definitions/v1.EnvVar"
}
}
}
},
"v1.DownwardAPIVolumeFile": {
"description": "DownwardAPIVolumeFile represents information to create the file containing the pod field",
"required": [
Expand Down
4 changes: 4 additions & 0 deletions contrib/completions/bash/oc
Original file line number Diff line number Diff line change
Expand Up @@ -11513,6 +11513,8 @@ _oc_new-build()
local_nonpersistent_flags+=("--allow-missing-imagestream-tags")
flags+=("--binary")
local_nonpersistent_flags+=("--binary")
flags+=("--build-arg=")
local_nonpersistent_flags+=("--build-arg=")
flags+=("--build-secret=")
local_nonpersistent_flags+=("--build-secret=")
flags+=("--code=")
Expand Down Expand Up @@ -15735,6 +15737,8 @@ _oc_start-build()
flags_with_completion=()
flags_completion=()

flags+=("--build-arg=")
local_nonpersistent_flags+=("--build-arg=")
flags+=("--build-loglevel=")
local_nonpersistent_flags+=("--build-loglevel=")
flags+=("--commit=")
Expand Down
4 changes: 4 additions & 0 deletions contrib/completions/bash/openshift
Original file line number Diff line number Diff line change
Expand Up @@ -16761,6 +16761,8 @@ _openshift_cli_new-build()
local_nonpersistent_flags+=("--allow-missing-imagestream-tags")
flags+=("--binary")
local_nonpersistent_flags+=("--binary")
flags+=("--build-arg=")
local_nonpersistent_flags+=("--build-arg=")
flags+=("--build-secret=")
local_nonpersistent_flags+=("--build-secret=")
flags+=("--code=")
Expand Down Expand Up @@ -21101,6 +21103,8 @@ _openshift_cli_start-build()
flags_with_completion=()
flags_completion=()

flags+=("--build-arg=")
local_nonpersistent_flags+=("--build-arg=")
flags+=("--build-loglevel=")
local_nonpersistent_flags+=("--build-loglevel=")
flags+=("--commit=")
Expand Down
4 changes: 4 additions & 0 deletions contrib/completions/zsh/oc
Original file line number Diff line number Diff line change
Expand Up @@ -11661,6 +11661,8 @@ _oc_new-build()
local_nonpersistent_flags+=("--allow-missing-imagestream-tags")
flags+=("--binary")
local_nonpersistent_flags+=("--binary")
flags+=("--build-arg=")
local_nonpersistent_flags+=("--build-arg=")
flags+=("--build-secret=")
local_nonpersistent_flags+=("--build-secret=")
flags+=("--code=")
Expand Down Expand Up @@ -15883,6 +15885,8 @@ _oc_start-build()
flags_with_completion=()
flags_completion=()

flags+=("--build-arg=")
local_nonpersistent_flags+=("--build-arg=")
flags+=("--build-loglevel=")
local_nonpersistent_flags+=("--build-loglevel=")
flags+=("--commit=")
Expand Down
4 changes: 4 additions & 0 deletions contrib/completions/zsh/openshift
Original file line number Diff line number Diff line change
Expand Up @@ -16909,6 +16909,8 @@ _openshift_cli_new-build()
local_nonpersistent_flags+=("--allow-missing-imagestream-tags")
flags+=("--binary")
local_nonpersistent_flags+=("--binary")
flags+=("--build-arg=")
local_nonpersistent_flags+=("--build-arg=")
flags+=("--build-secret=")
local_nonpersistent_flags+=("--build-secret=")
flags+=("--code=")
Expand Down Expand Up @@ -21249,6 +21251,8 @@ _openshift_cli_start-build()
flags_with_completion=()
flags_completion=()

flags+=("--build-arg=")
local_nonpersistent_flags+=("--build-arg=")
flags+=("--build-loglevel=")
local_nonpersistent_flags+=("--build-loglevel=")
flags+=("--commit=")
Expand Down
17 changes: 17 additions & 0 deletions pkg/build/api/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,10 @@ type DockerBuildStrategy struct {
// ValueFrom is not supported.
Env []kapi.EnvVar

// Args contains any build arguments that are to be passed to Docker. See
// https://docs.docker.com/engine/reference/builder/#/arg for more details
BuildArgs []kapi.EnvVar

// ForcePull describes if the builder should pull the images from registry prior to building.
ForcePull bool

Expand Down Expand Up @@ -919,6 +923,9 @@ type GenericWebHookEvent struct {
// Env contains additional environment variables you want to pass into a builder container.
// ValueFrom is not supported.
Env []kapi.EnvVar

// DockerStrategyOptions contains additional docker-strategy specific options for the build
DockerStrategyOptions *DockerStrategyOptions
}

// GitInfo is the aggregated git information for a generic webhook post
Expand All @@ -944,6 +951,13 @@ type BuildLog struct {
unversioned.TypeMeta
}

// DockerStrategyOptions contains extra strategy options for Docker builds
type DockerStrategyOptions struct {
// Args contains any build arguments that are to be passed to Docker. See
// https://docs.docker.com/engine/reference/builder/#/arg for more details
BuildArgs []kapi.EnvVar
}

// BuildRequest is the resource used to pass parameters to build generator
type BuildRequest struct {
unversioned.TypeMeta
Expand Down Expand Up @@ -975,6 +989,9 @@ type BuildRequest struct {
// TriggeredBy describes which triggers started the most recent update to the
// buildconfig and contains information about those triggers.
TriggeredBy []BuildTriggerCause

// DockerStrategyOptions contains additional docker-strategy specific options for the build
DockerStrategyOptions *DockerStrategyOptions
}

type BinaryBuildRequestOptions struct {
Expand Down
Loading

0 comments on commit e164e80

Please sign in to comment.