Skip to content

Commit

Permalink
Merge pull request #16014 from coreydaley/trello_1011_incremental_and…
Browse files Browse the repository at this point in the history
…_nocache_cli

Automatic merge from submit-queue (batch tested with PRs 16074, 16069, 16077, 16079, 16014)

Adding --incremental and --no-cache to start-build

Allows the user to override Spec.Strategy.SourceStrategy.Incremental and Spec.Strategy.DockerStrategy.NoCache using command line flags.

Trello Card: [link](https://trello.com/c/QDZ4fSCo/1011-5-allow-incremental-and-nocache-to-be-specified-on-build-request-builds)
  • Loading branch information
openshift-merge-robot committed Sep 1, 2017
2 parents dd310cb + df1d1bc commit 9c514fe
Show file tree
Hide file tree
Showing 20 changed files with 1,079 additions and 460 deletions.

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

18 changes: 18 additions & 0 deletions api/swagger-spec/oapi-v1.json
Expand Up @@ -22367,6 +22367,10 @@
"dockerStrategyOptions": {
"$ref": "v1.DockerStrategyOptions",
"description": "DockerStrategyOptions contains additional docker-strategy specific options for the build"
},
"sourceStrategyOptions": {
"$ref": "v1.SourceStrategyOptions",
"description": "SourceStrategyOptions contains additional source-strategy specific options for the build"
}
}
},
Expand Down Expand Up @@ -22480,6 +22484,20 @@
"$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"
},
"noCache": {
"type": "boolean",
"description": "noCache overrides the docker-strategy noCache option in the build config"
}
}
},
"v1.SourceStrategyOptions": {
"id": "v1.SourceStrategyOptions",
"description": "SourceStrategyOptions contains extra strategy options for Source builds",
"properties": {
"incremental": {
"type": "boolean",
"description": "incremental overrides the source-strategy incremental option in the build config"
}
}
},
Expand Down
17 changes: 17 additions & 0 deletions api/swagger-spec/openshift-openapi-spec.json
Expand Up @@ -88376,6 +88376,10 @@
"description": "revision is the information from the source for a specific repo snapshot.",
"$ref": "#/definitions/com.github.openshift.origin.pkg.build.apis.build.v1.SourceRevision"
},
"sourceStrategyOptions": {
"description": "SourceStrategyOptions contains additional source-strategy specific options for the build",
"$ref": "#/definitions/com.github.openshift.origin.pkg.build.apis.build.v1.SourceStrategyOptions"
},
"triggeredBy": {
"description": "triggeredBy describes which triggers started the most recent update to the build configuration and contains information about those triggers.",
"type": "array",
Expand Down Expand Up @@ -88765,6 +88769,10 @@
"items": {
"$ref": "#/definitions/io.k8s.kubernetes.pkg.api.v1.EnvVar"
}
},
"noCache": {
"description": "noCache overrides the docker-strategy noCache option in the build config",
"type": "boolean"
}
}
},
Expand Down Expand Up @@ -89067,6 +89075,15 @@
}
}
},
"com.github.openshift.origin.pkg.build.apis.build.v1.SourceStrategyOptions": {
"description": "SourceStrategyOptions contains extra strategy options for Source builds",
"properties": {
"incremental": {
"description": "incremental overrides the source-strategy incremental option in the build config",
"type": "boolean"
}
}
},
"com.github.openshift.origin.pkg.build.apis.build.v1.StageInfo": {
"description": "StageInfo contains details about a build stage.",
"properties": {
Expand Down
4 changes: 4 additions & 0 deletions contrib/completions/bash/oc
Expand Up @@ -17296,8 +17296,12 @@ _oc_start-build()
local_nonpersistent_flags+=("--git-post-receive=")
flags+=("--git-repository=")
local_nonpersistent_flags+=("--git-repository=")
flags+=("--incremental")
local_nonpersistent_flags+=("--incremental")
flags+=("--list-webhooks=")
local_nonpersistent_flags+=("--list-webhooks=")
flags+=("--no-cache")
local_nonpersistent_flags+=("--no-cache")
flags+=("--output=")
two_word_flags+=("-o")
local_nonpersistent_flags+=("--output=")
Expand Down
4 changes: 4 additions & 0 deletions contrib/completions/bash/openshift
Expand Up @@ -23346,8 +23346,12 @@ _openshift_cli_start-build()
local_nonpersistent_flags+=("--git-post-receive=")
flags+=("--git-repository=")
local_nonpersistent_flags+=("--git-repository=")
flags+=("--incremental")
local_nonpersistent_flags+=("--incremental")
flags+=("--list-webhooks=")
local_nonpersistent_flags+=("--list-webhooks=")
flags+=("--no-cache")
local_nonpersistent_flags+=("--no-cache")
flags+=("--output=")
two_word_flags+=("-o")
local_nonpersistent_flags+=("--output=")
Expand Down
4 changes: 4 additions & 0 deletions contrib/completions/zsh/oc
Expand Up @@ -17445,8 +17445,12 @@ _oc_start-build()
local_nonpersistent_flags+=("--git-post-receive=")
flags+=("--git-repository=")
local_nonpersistent_flags+=("--git-repository=")
flags+=("--incremental")
local_nonpersistent_flags+=("--incremental")
flags+=("--list-webhooks=")
local_nonpersistent_flags+=("--list-webhooks=")
flags+=("--no-cache")
local_nonpersistent_flags+=("--no-cache")
flags+=("--output=")
two_word_flags+=("-o")
local_nonpersistent_flags+=("--output=")
Expand Down
4 changes: 4 additions & 0 deletions contrib/completions/zsh/openshift
Expand Up @@ -23495,8 +23495,12 @@ _openshift_cli_start-build()
local_nonpersistent_flags+=("--git-post-receive=")
flags+=("--git-repository=")
local_nonpersistent_flags+=("--git-repository=")
flags+=("--incremental")
local_nonpersistent_flags+=("--incremental")
flags+=("--list-webhooks=")
local_nonpersistent_flags+=("--list-webhooks=")
flags+=("--no-cache")
local_nonpersistent_flags+=("--no-cache")
flags+=("--output=")
two_word_flags+=("-o")
local_nonpersistent_flags+=("--output=")
Expand Down
12 changes: 12 additions & 0 deletions pkg/build/apis/build/types.go
Expand Up @@ -1208,6 +1208,15 @@ 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

// NoCache overrides the docker-strategy noCache option in the build config
NoCache *bool
}

// SourceStrategyOptions contains extra strategy options for Source builds
type SourceStrategyOptions struct {
// Incremental overrides the source-strategy incremental option in the build config
Incremental *bool
}

// BuildRequest is the resource used to pass parameters to build generator
Expand Down Expand Up @@ -1243,6 +1252,9 @@ type BuildRequest struct {

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

// SourceStrategyOptions contains additional source-strategy specific options for the build
SourceStrategyOptions *SourceStrategyOptions
}

type BinaryBuildRequestOptions struct {
Expand Down

0 comments on commit 9c514fe

Please sign in to comment.