... | ... |
@@ -885,7 +885,7 @@ |
885 | 885 |
"type": "string", |
886 | 886 |
"paramType": "query", |
887 | 887 |
"name": "asFile", |
888 |
- "description": "AsFile determines if the binary should be created as a file within the source rather than extracted as an archive", |
|
888 |
+ "description": "asFile determines if the binary should be created as a file within the source rather than extracted as an archive", |
|
889 | 889 |
"required": false, |
890 | 890 |
"allowMultiple": false |
891 | 891 |
}, |
... | ... |
@@ -893,7 +893,7 @@ |
893 | 893 |
"type": "string", |
894 | 894 |
"paramType": "query", |
895 | 895 |
"name": "revision.commit", |
896 |
- "description": "Commit is the value identifying a specific commit", |
|
896 |
+ "description": "revision.commit is the value identifying a specific commit", |
|
897 | 897 |
"required": false, |
898 | 898 |
"allowMultiple": false |
899 | 899 |
}, |
... | ... |
@@ -901,7 +901,7 @@ |
901 | 901 |
"type": "string", |
902 | 902 |
"paramType": "query", |
903 | 903 |
"name": "revision.message", |
904 |
- "description": "Message is the description of a specific commit", |
|
904 |
+ "description": "revision.message is the description of a specific commit", |
|
905 | 905 |
"required": false, |
906 | 906 |
"allowMultiple": false |
907 | 907 |
}, |
... | ... |
@@ -909,7 +909,7 @@ |
909 | 909 |
"type": "string", |
910 | 910 |
"paramType": "query", |
911 | 911 |
"name": "revision.authorName", |
912 |
- "description": "AuthorName of the source control user", |
|
912 |
+ "description": "revision.authorName of the source control user", |
|
913 | 913 |
"required": false, |
914 | 914 |
"allowMultiple": false |
915 | 915 |
}, |
... | ... |
@@ -917,7 +917,7 @@ |
917 | 917 |
"type": "string", |
918 | 918 |
"paramType": "query", |
919 | 919 |
"name": "revision.authorEmail", |
920 |
- "description": "AuthorEmail of the source control user", |
|
920 |
+ "description": "revision.authorEmail of the source control user", |
|
921 | 921 |
"required": false, |
922 | 922 |
"allowMultiple": false |
923 | 923 |
}, |
... | ... |
@@ -925,7 +925,7 @@ |
925 | 925 |
"type": "string", |
926 | 926 |
"paramType": "query", |
927 | 927 |
"name": "revision.committerName", |
928 |
- "description": "CommitterName of the source control user", |
|
928 |
+ "description": "revision.committerName of the source control user", |
|
929 | 929 |
"required": false, |
930 | 930 |
"allowMultiple": false |
931 | 931 |
}, |
... | ... |
@@ -933,7 +933,7 @@ |
933 | 933 |
"type": "string", |
934 | 934 |
"paramType": "query", |
935 | 935 |
"name": "revision.committerEmail", |
936 |
- "description": "CommitterEmail of the source control user", |
|
936 |
+ "description": "revision.committerEmail of the source control user", |
|
937 | 937 |
"required": false, |
938 | 938 |
"allowMultiple": false |
939 | 939 |
}, |
... | ... |
@@ -2004,7 +2004,7 @@ |
2004 | 2004 |
"type": "string", |
2005 | 2005 |
"paramType": "query", |
2006 | 2006 |
"name": "container", |
2007 |
- "description": "The container for which to stream logs. Defaults to only container if there is one container in the pod.", |
|
2007 |
+ "description": "cointainer for which to stream logs. Defaults to only container if there is one container in the pod.", |
|
2008 | 2008 |
"required": false, |
2009 | 2009 |
"allowMultiple": false |
2010 | 2010 |
}, |
... | ... |
@@ -2012,7 +2012,7 @@ |
2012 | 2012 |
"type": "boolean", |
2013 | 2013 |
"paramType": "query", |
2014 | 2014 |
"name": "follow", |
2015 |
- "description": "Follow if true indicates that the build log should be streamed until the build terminates.", |
|
2015 |
+ "description": "follow if true indicates that the build log should be streamed until the build terminates.", |
|
2016 | 2016 |
"required": false, |
2017 | 2017 |
"allowMultiple": false |
2018 | 2018 |
}, |
... | ... |
@@ -2020,7 +2020,7 @@ |
2020 | 2020 |
"type": "boolean", |
2021 | 2021 |
"paramType": "query", |
2022 | 2022 |
"name": "previous", |
2023 |
- "description": "Return previous build logs. Defaults to false.", |
|
2023 |
+ "description": "previous returns previous build logs. Defaults to false.", |
|
2024 | 2024 |
"required": false, |
2025 | 2025 |
"allowMultiple": false |
2026 | 2026 |
}, |
... | ... |
@@ -2028,7 +2028,7 @@ |
2028 | 2028 |
"type": "integer", |
2029 | 2029 |
"paramType": "query", |
2030 | 2030 |
"name": "sinceSeconds", |
2031 |
- "description": "A relative time in seconds before the current time from which to show logs. If this value precedes the time a pod was started, only logs since the pod start will be returned. If this value is in the future, no logs will be returned. Only one of sinceSeconds or sinceTime may be specified.", |
|
2031 |
+ "description": "sinceSeconds is a relative time in seconds before the current time from which to show logs. If this value precedes the time a pod was started, only logs since the pod start will be returned. If this value is in the future, no logs will be returned. Only one of sinceSeconds or sinceTime may be specified.", |
|
2032 | 2032 |
"required": false, |
2033 | 2033 |
"allowMultiple": false |
2034 | 2034 |
}, |
... | ... |
@@ -2036,7 +2036,7 @@ |
2036 | 2036 |
"type": "string", |
2037 | 2037 |
"paramType": "query", |
2038 | 2038 |
"name": "sinceTime", |
2039 |
- "description": "An RFC3339 timestamp from which to show logs. If this value preceeds the time a pod was started, only logs since the pod start will be returned. If this value is in the future, no logs will be returned. Only one of sinceSeconds or sinceTime may be specified.", |
|
2039 |
+ "description": "sinceTime is an RFC3339 timestamp from which to show logs. If this value preceeds the time a pod was started, only logs since the pod start will be returned. If this value is in the future, no logs will be returned. Only one of sinceSeconds or sinceTime may be specified.", |
|
2040 | 2040 |
"required": false, |
2041 | 2041 |
"allowMultiple": false |
2042 | 2042 |
}, |
... | ... |
@@ -2044,7 +2044,7 @@ |
2044 | 2044 |
"type": "boolean", |
2045 | 2045 |
"paramType": "query", |
2046 | 2046 |
"name": "timestamps", |
2047 |
- "description": "If true, add an RFC3339 or RFC3339Nano timestamp at the beginning of every line of log output. Defaults to false.", |
|
2047 |
+ "description": "timestamps, If true, add an RFC3339 or RFC3339Nano timestamp at the beginning of every line of log output. Defaults to false.", |
|
2048 | 2048 |
"required": false, |
2049 | 2049 |
"allowMultiple": false |
2050 | 2050 |
}, |
... | ... |
@@ -2052,7 +2052,7 @@ |
2052 | 2052 |
"type": "integer", |
2053 | 2053 |
"paramType": "query", |
2054 | 2054 |
"name": "tailLines", |
2055 |
- "description": "If set, the number of lines from the end of the logs to show. If not specified, logs are shown from the creation of the container or sinceSeconds or sinceTime", |
|
2055 |
+ "description": "tailLines, If set, is the number of lines from the end of the logs to show. If not specified, logs are shown from the creation of the container or sinceSeconds or sinceTime", |
|
2056 | 2056 |
"required": false, |
2057 | 2057 |
"allowMultiple": false |
2058 | 2058 |
}, |
... | ... |
@@ -2060,7 +2060,7 @@ |
2060 | 2060 |
"type": "integer", |
2061 | 2061 |
"paramType": "query", |
2062 | 2062 |
"name": "limitBytes", |
2063 |
- "description": "If set, the number of bytes to read from the server before terminating the log output. This may not display a complete final line of logging, and may return slightly more or slightly less than the specified limit.", |
|
2063 |
+ "description": "limitBytes, If set, is the number of bytes to read from the server before terminating the log output. This may not display a complete final line of logging, and may return slightly more or slightly less than the specified limit.", |
|
2064 | 2064 |
"required": false, |
2065 | 2065 |
"allowMultiple": false |
2066 | 2066 |
}, |
... | ... |
@@ -2068,7 +2068,7 @@ |
2068 | 2068 |
"type": "boolean", |
2069 | 2069 |
"paramType": "query", |
2070 | 2070 |
"name": "nowait", |
2071 |
- "description": "NoWait if true causes the call to return immediately even if the build is not available yet. Otherwise the server will wait until the build has started.", |
|
2071 |
+ "description": "noWait if true causes the call to return immediately even if the build is not available yet. Otherwise the server will wait until the build has started.", |
|
2072 | 2072 |
"required": false, |
2073 | 2073 |
"allowMultiple": false |
2074 | 2074 |
}, |
... | ... |
@@ -2076,7 +2076,7 @@ |
2076 | 2076 |
"type": "integer", |
2077 | 2077 |
"paramType": "query", |
2078 | 2078 |
"name": "version", |
2079 |
- "description": "Version of the build for which to view logs.", |
|
2079 |
+ "description": "version of the build for which to view logs.", |
|
2080 | 2080 |
"required": false, |
2081 | 2081 |
"allowMultiple": false |
2082 | 2082 |
}, |
... | ... |
@@ -17228,14 +17228,14 @@ |
17228 | 17228 |
}, |
17229 | 17229 |
"metadata": { |
17230 | 17230 |
"$ref": "unversioned.ListMeta", |
17231 |
- "description": "Standard object's metadata." |
|
17231 |
+ "description": "metadata for BuildConfigList." |
|
17232 | 17232 |
}, |
17233 | 17233 |
"items": { |
17234 | 17234 |
"type": "array", |
17235 | 17235 |
"items": { |
17236 | 17236 |
"$ref": "v1.BuildConfig" |
17237 | 17237 |
}, |
17238 |
- "description": "Items is a list of build configs" |
|
17238 |
+ "description": "items is a list of build configs" |
|
17239 | 17239 |
} |
17240 | 17240 |
} |
17241 | 17241 |
}, |
... | ... |
@@ -17271,15 +17271,15 @@ |
17271 | 17271 |
}, |
17272 | 17272 |
"metadata": { |
17273 | 17273 |
"$ref": "v1.ObjectMeta", |
17274 |
- "description": "Standard object's metadata." |
|
17274 |
+ "description": "metadata for BuildConfig." |
|
17275 | 17275 |
}, |
17276 | 17276 |
"spec": { |
17277 | 17277 |
"$ref": "v1.BuildConfigSpec", |
17278 |
- "description": "Spec holds all the input necessary to produce a new build, and the conditions when to trigger them." |
|
17278 |
+ "description": "spec holds all the input necessary to produce a new build, and the conditions when to trigger them." |
|
17279 | 17279 |
}, |
17280 | 17280 |
"status": { |
17281 | 17281 |
"$ref": "v1.BuildConfigStatus", |
17282 |
- "description": "Status holds any relevant information about a build config" |
|
17282 |
+ "description": "status holds any relevant information about a build config" |
|
17283 | 17283 |
} |
17284 | 17284 |
} |
17285 | 17285 |
}, |
... | ... |
@@ -17352,40 +17352,40 @@ |
17352 | 17352 |
"items": { |
17353 | 17353 |
"$ref": "v1.BuildTriggerPolicy" |
17354 | 17354 |
}, |
17355 |
- "description": "Triggers determine how new Builds can be launched from a BuildConfig. If no triggers are defined, a new build can only occur as a result of an explicit client build creation." |
|
17355 |
+ "description": "triggers determine how new Builds can be launched from a BuildConfig. If no triggers are defined, a new build can only occur as a result of an explicit client build creation." |
|
17356 | 17356 |
}, |
17357 | 17357 |
"serviceAccount": { |
17358 | 17358 |
"type": "string", |
17359 |
- "description": "ServiceAccount is the name of the ServiceAccount to use to run the pod created by this build. The pod will be allowed to use secrets referenced by the ServiceAccount" |
|
17359 |
+ "description": "serviceAccount is the name of the ServiceAccount to use to run the pod created by this build. The pod will be allowed to use secrets referenced by the ServiceAccount" |
|
17360 | 17360 |
}, |
17361 | 17361 |
"source": { |
17362 | 17362 |
"$ref": "v1.BuildSource", |
17363 |
- "description": "Source describes the SCM in use." |
|
17363 |
+ "description": "source describes the SCM in use." |
|
17364 | 17364 |
}, |
17365 | 17365 |
"revision": { |
17366 | 17366 |
"$ref": "v1.SourceRevision", |
17367 |
- "description": "Revision is the information from the source for a specific repo snapshot. This is optional." |
|
17367 |
+ "description": "revision is the information from the source for a specific repo snapshot. This is optional." |
|
17368 | 17368 |
}, |
17369 | 17369 |
"strategy": { |
17370 | 17370 |
"$ref": "v1.BuildStrategy", |
17371 |
- "description": "Strategy defines how to perform a build." |
|
17371 |
+ "description": "strategy defines how to perform a build." |
|
17372 | 17372 |
}, |
17373 | 17373 |
"output": { |
17374 | 17374 |
"$ref": "v1.BuildOutput", |
17375 |
- "description": "Output describes the Docker image the Strategy should produce." |
|
17375 |
+ "description": "output describes the Docker image the Strategy should produce." |
|
17376 | 17376 |
}, |
17377 | 17377 |
"resources": { |
17378 | 17378 |
"$ref": "v1.ResourceRequirements", |
17379 |
- "description": "Compute resource requirements to execute the build" |
|
17379 |
+ "description": "resource requirements to execute the build" |
|
17380 | 17380 |
}, |
17381 | 17381 |
"postCommit": { |
17382 | 17382 |
"$ref": "v1.BuildPostCommitSpec", |
17383 |
- "description": "PostCommit is a build hook executed after the build output image is committed, before it is pushed to a registry." |
|
17383 |
+ "description": "postCommit is a build hook executed after the build output image is committed, before it is pushed to a registry." |
|
17384 | 17384 |
}, |
17385 | 17385 |
"completionDeadlineSeconds": { |
17386 | 17386 |
"type": "integer", |
17387 | 17387 |
"format": "int64", |
17388 |
- "description": "Optional duration in seconds, counted from the time when a build pod gets scheduled in the system, that the build may be active on a node before the system actively tries to terminate the build; value must be positive integer" |
|
17388 |
+ "description": "completionDeadlineSeconds is an optional duration in seconds, counted from the time when a build pod gets scheduled in the system, that the build may be active on a node before the system actively tries to terminate the build; value must be positive integer" |
|
17389 | 17389 |
} |
17390 | 17390 |
} |
17391 | 17391 |
}, |
... | ... |
@@ -17398,19 +17398,19 @@ |
17398 | 17398 |
"properties": { |
17399 | 17399 |
"type": { |
17400 | 17400 |
"type": "string", |
17401 |
- "description": "Type is the type of build trigger" |
|
17401 |
+ "description": "type is the type of build trigger" |
|
17402 | 17402 |
}, |
17403 | 17403 |
"github": { |
17404 | 17404 |
"$ref": "v1.WebHookTrigger", |
17405 |
- "description": "GitHubWebHook contains the parameters for a GitHub webhook type of trigger" |
|
17405 |
+ "description": "github contains the parameters for a GitHub webhook type of trigger" |
|
17406 | 17406 |
}, |
17407 | 17407 |
"generic": { |
17408 | 17408 |
"$ref": "v1.WebHookTrigger", |
17409 |
- "description": "GenericWebHook contains the parameters for a Generic webhook type of trigger" |
|
17409 |
+ "description": "generic contains the parameters for a Generic webhook type of trigger" |
|
17410 | 17410 |
}, |
17411 | 17411 |
"imageChange": { |
17412 | 17412 |
"$ref": "v1.ImageChangeTrigger", |
17413 |
- "description": "ImageChange contains parameters for an ImageChange type of trigger" |
|
17413 |
+ "description": "imageChange contains parameters for an ImageChange type of trigger" |
|
17414 | 17414 |
} |
17415 | 17415 |
} |
17416 | 17416 |
}, |
... | ... |
@@ -17420,7 +17420,11 @@ |
17420 | 17420 |
"properties": { |
17421 | 17421 |
"secret": { |
17422 | 17422 |
"type": "string", |
17423 |
- "description": "Secret used to validate requests." |
|
17423 |
+ "description": "secret used to validate requests." |
|
17424 |
+ }, |
|
17425 |
+ "allowEnv": { |
|
17426 |
+ "type": "boolean", |
|
17427 |
+ "description": "allowEnv determines whether the webhook can set environment variables; can only be set to true for GenericWebHook." |
|
17424 | 17428 |
} |
17425 | 17429 |
} |
17426 | 17430 |
}, |
... | ... |
@@ -17430,11 +17434,11 @@ |
17430 | 17430 |
"properties": { |
17431 | 17431 |
"lastTriggeredImageID": { |
17432 | 17432 |
"type": "string", |
17433 |
- "description": "LastTriggeredImageID is used internally by the ImageChangeController to save last used image ID for build" |
|
17433 |
+ "description": "lastTriggeredImageID is used internally by the ImageChangeController to save last used image ID for build" |
|
17434 | 17434 |
}, |
17435 | 17435 |
"from": { |
17436 | 17436 |
"$ref": "v1.ObjectReference", |
17437 |
- "description": "From is a reference to an ImageStreamTag that will trigger a build when updated It is optional. If no From is specified, the From image from the build strategy will be used. Only one ImageChangeTrigger with an empty From reference is allowed in a build configuration." |
|
17437 |
+ "description": "from is a reference to an ImageStreamTag that will trigger a build when updated It is optional. If no From is specified, the From image from the build strategy will be used. Only one ImageChangeTrigger with an empty From reference is allowed in a build configuration." |
|
17438 | 17438 |
} |
17439 | 17439 |
} |
17440 | 17440 |
}, |
... | ... |
@@ -17482,41 +17486,41 @@ |
17482 | 17482 |
"properties": { |
17483 | 17483 |
"type": { |
17484 | 17484 |
"type": "string", |
17485 |
- "description": "Type of build input to accept" |
|
17485 |
+ "description": "type of build input to accept" |
|
17486 | 17486 |
}, |
17487 | 17487 |
"binary": { |
17488 | 17488 |
"$ref": "v1.BinaryBuildSource", |
17489 |
- "description": "Binary builds accept a binary as their input. The binary is generally assumed to be a tar, gzipped tar, or zip file depending on the strategy. For Docker builds, this is the build context and an optional Dockerfile may be specified to override any Dockerfile in the build context. For Source builds, this is assumed to be an archive as described above. For Source and Docker builds, if binary.asFile is set the build will receive a directory with a single file. contextDir may be used when an archive is provided. Custom builds will receive this binary as input on STDIN." |
|
17489 |
+ "description": "binary builds accept a binary as their input. The binary is generally assumed to be a tar, gzipped tar, or zip file depending on the strategy. For Docker builds, this is the build context and an optional Dockerfile may be specified to override any Dockerfile in the build context. For Source builds, this is assumed to be an archive as described above. For Source and Docker builds, if binary.asFile is set the build will receive a directory with a single file. contextDir may be used when an archive is provided. Custom builds will receive this binary as input on STDIN." |
|
17490 | 17490 |
}, |
17491 | 17491 |
"dockerfile": { |
17492 | 17492 |
"type": "string", |
17493 |
- "description": "Dockerfile is the raw contents of a Dockerfile which should be built. When this option is specified, the FROM may be modified based on your strategy base image and additional ENV stanzas from your strategy environment will be added after the FROM, but before the rest of your Dockerfile stanzas. The Dockerfile source type may be used with other options like git - in those cases the Git repo will have any innate Dockerfile replaced in the context dir." |
|
17493 |
+ "description": "dockerfile is the raw contents of a Dockerfile which should be built. When this option is specified, the FROM may be modified based on your strategy base image and additional ENV stanzas from your strategy environment will be added after the FROM, but before the rest of your Dockerfile stanzas. The Dockerfile source type may be used with other options like git - in those cases the Git repo will have any innate Dockerfile replaced in the context dir." |
|
17494 | 17494 |
}, |
17495 | 17495 |
"git": { |
17496 | 17496 |
"$ref": "v1.GitBuildSource", |
17497 |
- "description": "Git contains optional information about git build source" |
|
17497 |
+ "description": "git contains optional information about git build source" |
|
17498 | 17498 |
}, |
17499 | 17499 |
"images": { |
17500 | 17500 |
"type": "array", |
17501 | 17501 |
"items": { |
17502 | 17502 |
"$ref": "v1.ImageSource" |
17503 | 17503 |
}, |
17504 |
- "description": "Images describes a set of images to be used to provide source for the build" |
|
17504 |
+ "description": "images describes a set of images to be used to provide source for the build" |
|
17505 | 17505 |
}, |
17506 | 17506 |
"contextDir": { |
17507 | 17507 |
"type": "string", |
17508 |
- "description": "ContextDir specifies the sub-directory where the source code for the application exists. This allows to have buildable sources in directory other than root of repository." |
|
17508 |
+ "description": "contextDir specifies the sub-directory where the source code for the application exists. This allows to have buildable sources in directory other than root of repository." |
|
17509 | 17509 |
}, |
17510 | 17510 |
"sourceSecret": { |
17511 | 17511 |
"$ref": "v1.LocalObjectReference", |
17512 |
- "description": "SourceSecret is the name of a Secret that would be used for setting up the authentication for cloning private repository. The secret contains valid credentials for remote repository, where the data's key represent the authentication method to be used and value is the base64 encoded credentials. Supported auth methods are: ssh-privatekey." |
|
17512 |
+ "description": "sourceSecret is the name of a Secret that would be used for setting up the authentication for cloning private repository. The secret contains valid credentials for remote repository, where the data's key represent the authentication method to be used and value is the base64 encoded credentials. Supported auth methods are: ssh-privatekey." |
|
17513 | 17513 |
}, |
17514 | 17514 |
"secrets": { |
17515 | 17515 |
"type": "array", |
17516 | 17516 |
"items": { |
17517 | 17517 |
"$ref": "v1.SecretBuildSource" |
17518 | 17518 |
}, |
17519 |
- "description": "Secrets represents a list of secrets and their destinations that will be used only for the build." |
|
17519 |
+ "description": "secrets represents a list of secrets and their destinations that will be used only for the build." |
|
17520 | 17520 |
} |
17521 | 17521 |
} |
17522 | 17522 |
}, |
... | ... |
@@ -17526,7 +17530,7 @@ |
17526 | 17526 |
"properties": { |
17527 | 17527 |
"asFile": { |
17528 | 17528 |
"type": "string", |
17529 |
- "description": "AsFile indicates that the provided binary input should be considered a single file within the build input. For example, specifying \"webapp.war\" would place the provided binary as `/webapp.war` for the builder. If left empty, the Docker and Source build strategies assume this file is a zip, tar, or tar.gz file and extract it as the source. The custom strategy receives this binary as standard input. This filename may not contain slashes or be '..' or '.'." |
|
17529 |
+ "description": "asFile indicates that the provided binary input should be considered a single file within the build input. For example, specifying \"webapp.war\" would place the provided binary as `/webapp.war` for the builder. If left empty, the Docker and Source build strategies assume this file is a zip, tar, or tar.gz file and extract it as the source. The custom strategy receives this binary as standard input. This filename may not contain slashes or be '..' or '.'." |
|
17530 | 17530 |
} |
17531 | 17531 |
} |
17532 | 17532 |
}, |
... | ... |
@@ -17539,19 +17543,19 @@ |
17539 | 17539 |
"properties": { |
17540 | 17540 |
"uri": { |
17541 | 17541 |
"type": "string", |
17542 |
- "description": "URI points to the source that will be built. The structure of the source will depend on the type of build to run" |
|
17542 |
+ "description": "uri points to the source that will be built. The structure of the source will depend on the type of build to run" |
|
17543 | 17543 |
}, |
17544 | 17544 |
"ref": { |
17545 | 17545 |
"type": "string", |
17546 |
- "description": "Ref is the branch/tag/ref to build." |
|
17546 |
+ "description": "ref is the branch/tag/ref to build." |
|
17547 | 17547 |
}, |
17548 | 17548 |
"httpProxy": { |
17549 | 17549 |
"type": "string", |
17550 |
- "description": "HTTPProxy is a proxy used to reach the git repository over http" |
|
17550 |
+ "description": "httpProxy is a proxy used to reach the git repository over http" |
|
17551 | 17551 |
}, |
17552 | 17552 |
"httpsProxy": { |
17553 | 17553 |
"type": "string", |
17554 |
- "description": "HTTPSProxy is a proxy used to reach the git repository over https" |
|
17554 |
+ "description": "httpsProxy is a proxy used to reach the git repository over https" |
|
17555 | 17555 |
} |
17556 | 17556 |
} |
17557 | 17557 |
}, |
... | ... |
@@ -17565,18 +17569,18 @@ |
17565 | 17565 |
"properties": { |
17566 | 17566 |
"from": { |
17567 | 17567 |
"$ref": "v1.ObjectReference", |
17568 |
- "description": "From is a reference to an ImageStreamTag, ImageStreamImage, or DockerImage to copy source from." |
|
17568 |
+ "description": "from is a reference to an ImageStreamTag, ImageStreamImage, or DockerImage to copy source from." |
|
17569 | 17569 |
}, |
17570 | 17570 |
"paths": { |
17571 | 17571 |
"type": "array", |
17572 | 17572 |
"items": { |
17573 | 17573 |
"$ref": "v1.ImageSourcePath" |
17574 | 17574 |
}, |
17575 |
- "description": "Paths is a list of source and destination paths to copy from the image." |
|
17575 |
+ "description": "paths is a list of source and destination paths to copy from the image." |
|
17576 | 17576 |
}, |
17577 | 17577 |
"pullSecret": { |
17578 | 17578 |
"$ref": "v1.LocalObjectReference", |
17579 |
- "description": "PullSecret is a reference to a secret to be used to pull the image from a registry If the image is pulled from the OpenShift registry, this field does not need to be set." |
|
17579 |
+ "description": "pullSecret is a reference to a secret to be used to pull the image from a registry If the image is pulled from the OpenShift registry, this field does not need to be set." |
|
17580 | 17580 |
} |
17581 | 17581 |
} |
17582 | 17582 |
}, |
... | ... |
@@ -17590,11 +17594,11 @@ |
17590 | 17590 |
"properties": { |
17591 | 17591 |
"sourcePath": { |
17592 | 17592 |
"type": "string", |
17593 |
- "description": "SourcePath is the absolute path of the file or directory inside the image to copy to the build directory." |
|
17593 |
+ "description": "sourcePath is the absolute path of the file or directory inside the image to copy to the build directory." |
|
17594 | 17594 |
}, |
17595 | 17595 |
"destinationDir": { |
17596 | 17596 |
"type": "string", |
17597 |
- "description": "DestinationDir is the relative directory within the build directory where files copied from the image are placed." |
|
17597 |
+ "description": "destinationDir is the relative directory within the build directory where files copied from the image are placed." |
|
17598 | 17598 |
} |
17599 | 17599 |
} |
17600 | 17600 |
}, |
... | ... |
@@ -17617,11 +17621,11 @@ |
17617 | 17617 |
"properties": { |
17618 | 17618 |
"secret": { |
17619 | 17619 |
"$ref": "v1.LocalObjectReference", |
17620 |
- "description": "Secret is a reference to an existing secret that you want to use in your build." |
|
17620 |
+ "description": "secret is a reference to an existing secret that you want to use in your build." |
|
17621 | 17621 |
}, |
17622 | 17622 |
"destinationDir": { |
17623 | 17623 |
"type": "string", |
17624 |
- "description": "DestinationDir is the directory where the files from the secret should be available for the build time. For the Source build strategy, these will be injected into a container where the assemble script runs. Later, when the script finishes, all files injected will be truncated to zero length. For the Docker build strategy, these will be copied into the build directory, where the Dockerfile is located, so users can ADD or COPY them during docker build." |
|
17624 |
+ "description": "destinationDir is the directory where the files from the secret should be available for the build time. For the Source build strategy, these will be injected into a container where the assemble script runs. Later, when the script finishes, all files injected will be truncated to zero length. For the Docker build strategy, these will be copied into the build directory, where the Dockerfile is located, so users can ADD or COPY them during docker build." |
|
17625 | 17625 |
} |
17626 | 17626 |
} |
17627 | 17627 |
}, |
... | ... |
@@ -17634,7 +17638,7 @@ |
17634 | 17634 |
"properties": { |
17635 | 17635 |
"type": { |
17636 | 17636 |
"type": "string", |
17637 |
- "description": "Type of the build source" |
|
17637 |
+ "description": "type of the build source" |
|
17638 | 17638 |
}, |
17639 | 17639 |
"git": { |
17640 | 17640 |
"$ref": "v1.GitSourceRevision", |
... | ... |
@@ -17648,19 +17652,19 @@ |
17648 | 17648 |
"properties": { |
17649 | 17649 |
"commit": { |
17650 | 17650 |
"type": "string", |
17651 |
- "description": "Commit is the commit hash identifying a specific commit" |
|
17651 |
+ "description": "commit is the commit hash identifying a specific commit" |
|
17652 | 17652 |
}, |
17653 | 17653 |
"author": { |
17654 | 17654 |
"$ref": "v1.SourceControlUser", |
17655 |
- "description": "Author is the author of a specific commit" |
|
17655 |
+ "description": "author is the author of a specific commit" |
|
17656 | 17656 |
}, |
17657 | 17657 |
"committer": { |
17658 | 17658 |
"$ref": "v1.SourceControlUser", |
17659 |
- "description": "Committer is the committer of a specific commit" |
|
17659 |
+ "description": "committer is the committer of a specific commit" |
|
17660 | 17660 |
}, |
17661 | 17661 |
"message": { |
17662 | 17662 |
"type": "string", |
17663 |
- "description": "Message is the description of a specific commit" |
|
17663 |
+ "description": "message is the description of a specific commit" |
|
17664 | 17664 |
} |
17665 | 17665 |
} |
17666 | 17666 |
}, |
... | ... |
@@ -17670,11 +17674,11 @@ |
17670 | 17670 |
"properties": { |
17671 | 17671 |
"name": { |
17672 | 17672 |
"type": "string", |
17673 |
- "description": "Name of the source control user" |
|
17673 |
+ "description": "name of the source control user" |
|
17674 | 17674 |
}, |
17675 | 17675 |
"email": { |
17676 | 17676 |
"type": "string", |
17677 |
- "description": "Email of the source control user" |
|
17677 |
+ "description": "email of the source control user" |
|
17678 | 17678 |
} |
17679 | 17679 |
} |
17680 | 17680 |
}, |
... | ... |
@@ -17687,19 +17691,19 @@ |
17687 | 17687 |
"properties": { |
17688 | 17688 |
"type": { |
17689 | 17689 |
"type": "string", |
17690 |
- "description": "Type is the kind of build strategy." |
|
17690 |
+ "description": "type is the kind of build strategy." |
|
17691 | 17691 |
}, |
17692 | 17692 |
"dockerStrategy": { |
17693 | 17693 |
"$ref": "v1.DockerBuildStrategy", |
17694 |
- "description": "DockerStrategy holds the parameters to the Docker build strategy." |
|
17694 |
+ "description": "dockerStrategy holds the parameters to the Docker build strategy." |
|
17695 | 17695 |
}, |
17696 | 17696 |
"sourceStrategy": { |
17697 | 17697 |
"$ref": "v1.SourceBuildStrategy", |
17698 |
- "description": "SourceStrategy holds the parameters to the Source build strategy." |
|
17698 |
+ "description": "sourceStrategy holds the parameters to the Source build strategy." |
|
17699 | 17699 |
}, |
17700 | 17700 |
"customStrategy": { |
17701 | 17701 |
"$ref": "v1.CustomBuildStrategy", |
17702 |
- "description": "CustomStrategy holds the parameters to the Custom build strategy" |
|
17702 |
+ "description": "customStrategy holds the parameters to the Custom build strategy" |
|
17703 | 17703 |
} |
17704 | 17704 |
} |
17705 | 17705 |
}, |
... | ... |
@@ -17709,30 +17713,30 @@ |
17709 | 17709 |
"properties": { |
17710 | 17710 |
"from": { |
17711 | 17711 |
"$ref": "v1.ObjectReference", |
17712 |
- "description": "From is reference to an DockerImage, ImageStreamTag, or ImageStreamImage from which the docker image should be pulled the resulting image will be used in the FROM line of the Dockerfile for this build." |
|
17712 |
+ "description": "from is reference to an DockerImage, ImageStreamTag, or ImageStreamImage from which the docker image should be pulled the resulting image will be used in the FROM line of the Dockerfile for this build." |
|
17713 | 17713 |
}, |
17714 | 17714 |
"pullSecret": { |
17715 | 17715 |
"$ref": "v1.LocalObjectReference", |
17716 |
- "description": "PullSecret is the name of a Secret that would be used for setting up the authentication for pulling the Docker images from the private Docker registries" |
|
17716 |
+ "description": "pullSecret is the name of a Secret that would be used for setting up the authentication for pulling the Docker images from the private Docker registries" |
|
17717 | 17717 |
}, |
17718 | 17718 |
"noCache": { |
17719 | 17719 |
"type": "boolean", |
17720 |
- "description": "NoCache if set to true indicates that the docker build must be executed with the --no-cache=true flag" |
|
17720 |
+ "description": "noCache if set to true indicates that the docker build must be executed with the --no-cache=true flag" |
|
17721 | 17721 |
}, |
17722 | 17722 |
"env": { |
17723 | 17723 |
"type": "array", |
17724 | 17724 |
"items": { |
17725 | 17725 |
"$ref": "v1.EnvVar" |
17726 | 17726 |
}, |
17727 |
- "description": "Env contains additional environment variables you want to pass into a builder container" |
|
17727 |
+ "description": "env contains additional environment variables you want to pass into a builder container" |
|
17728 | 17728 |
}, |
17729 | 17729 |
"forcePull": { |
17730 | 17730 |
"type": "boolean", |
17731 |
- "description": "ForcePull describes if the builder should pull the images from registry prior to building." |
|
17731 |
+ "description": "forcePull describes if the builder should pull the images from registry prior to building." |
|
17732 | 17732 |
}, |
17733 | 17733 |
"dockerfilePath": { |
17734 | 17734 |
"type": "string", |
17735 |
- "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)." |
|
17735 |
+ "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)." |
|
17736 | 17736 |
} |
17737 | 17737 |
} |
17738 | 17738 |
}, |
... | ... |
@@ -17835,30 +17839,30 @@ |
17835 | 17835 |
"properties": { |
17836 | 17836 |
"from": { |
17837 | 17837 |
"$ref": "v1.ObjectReference", |
17838 |
- "description": "From is reference to an DockerImage, ImageStreamTag, or ImageStreamImage from which the docker image should be pulled" |
|
17838 |
+ "description": "from is reference to an DockerImage, ImageStreamTag, or ImageStreamImage from which the docker image should be pulled" |
|
17839 | 17839 |
}, |
17840 | 17840 |
"pullSecret": { |
17841 | 17841 |
"$ref": "v1.LocalObjectReference", |
17842 |
- "description": "PullSecret is the name of a Secret that would be used for setting up the authentication for pulling the Docker images from the private Docker registries" |
|
17842 |
+ "description": "pullSecret is the name of a Secret that would be used for setting up the authentication for pulling the Docker images from the private Docker registries" |
|
17843 | 17843 |
}, |
17844 | 17844 |
"env": { |
17845 | 17845 |
"type": "array", |
17846 | 17846 |
"items": { |
17847 | 17847 |
"$ref": "v1.EnvVar" |
17848 | 17848 |
}, |
17849 |
- "description": "Env contains additional environment variables you want to pass into a builder container" |
|
17849 |
+ "description": "env contains additional environment variables you want to pass into a builder container" |
|
17850 | 17850 |
}, |
17851 | 17851 |
"scripts": { |
17852 | 17852 |
"type": "string", |
17853 |
- "description": "Scripts is the location of Source scripts" |
|
17853 |
+ "description": "scripts is the location of Source scripts" |
|
17854 | 17854 |
}, |
17855 | 17855 |
"incremental": { |
17856 | 17856 |
"type": "boolean", |
17857 |
- "description": "Incremental flag forces the Source build to do incremental builds if true." |
|
17857 |
+ "description": "incremental flag forces the Source build to do incremental builds if true." |
|
17858 | 17858 |
}, |
17859 | 17859 |
"forcePull": { |
17860 | 17860 |
"type": "boolean", |
17861 |
- "description": "ForcePull describes if the builder should pull the images from registry prior to building." |
|
17861 |
+ "description": "forcePull describes if the builder should pull the images from registry prior to building." |
|
17862 | 17862 |
} |
17863 | 17863 |
} |
17864 | 17864 |
}, |
... | ... |
@@ -17871,37 +17875,37 @@ |
17871 | 17871 |
"properties": { |
17872 | 17872 |
"from": { |
17873 | 17873 |
"$ref": "v1.ObjectReference", |
17874 |
- "description": "From is reference to an DockerImage, ImageStreamTag, or ImageStreamImage from which the docker image should be pulled" |
|
17874 |
+ "description": "from is reference to an DockerImage, ImageStreamTag, or ImageStreamImage from which the docker image should be pulled" |
|
17875 | 17875 |
}, |
17876 | 17876 |
"pullSecret": { |
17877 | 17877 |
"$ref": "v1.LocalObjectReference", |
17878 |
- "description": "PullSecret is the name of a Secret that would be used for setting up the authentication for pulling the Docker images from the private Docker registries" |
|
17878 |
+ "description": "pullSecret is the name of a Secret that would be used for setting up the authentication for pulling the Docker images from the private Docker registries" |
|
17879 | 17879 |
}, |
17880 | 17880 |
"env": { |
17881 | 17881 |
"type": "array", |
17882 | 17882 |
"items": { |
17883 | 17883 |
"$ref": "v1.EnvVar" |
17884 | 17884 |
}, |
17885 |
- "description": "Env contains additional environment variables you want to pass into a builder container" |
|
17885 |
+ "description": "env contains additional environment variables you want to pass into a builder container" |
|
17886 | 17886 |
}, |
17887 | 17887 |
"exposeDockerSocket": { |
17888 | 17888 |
"type": "boolean", |
17889 |
- "description": "ExposeDockerSocket will allow running Docker commands (and build Docker images) from inside the Docker container." |
|
17889 |
+ "description": "exposeDockerSocket will allow running Docker commands (and build Docker images) from inside the Docker container." |
|
17890 | 17890 |
}, |
17891 | 17891 |
"forcePull": { |
17892 | 17892 |
"type": "boolean", |
17893 |
- "description": "ForcePull describes if the controller should configure the build pod to always pull the images for the builder or only pull if it is not present locally" |
|
17893 |
+ "description": "forcePull describes if the controller should configure the build pod to always pull the images for the builder or only pull if it is not present locally" |
|
17894 | 17894 |
}, |
17895 | 17895 |
"secrets": { |
17896 | 17896 |
"type": "array", |
17897 | 17897 |
"items": { |
17898 | 17898 |
"$ref": "v1.SecretSpec" |
17899 | 17899 |
}, |
17900 |
- "description": "Secrets is a list of additional secrets that will be included in the build pod" |
|
17900 |
+ "description": "secrets is a list of additional secrets that will be included in the build pod" |
|
17901 | 17901 |
}, |
17902 | 17902 |
"buildAPIVersion": { |
17903 | 17903 |
"type": "string", |
17904 |
- "description": "BuildAPIVersion is the requested API version for the Build object serialized and passed to the custom builder" |
|
17904 |
+ "description": "buildAPIVersion is the requested API version for the Build object serialized and passed to the custom builder" |
|
17905 | 17905 |
} |
17906 | 17906 |
} |
17907 | 17907 |
}, |
... | ... |
@@ -17915,11 +17919,11 @@ |
17915 | 17915 |
"properties": { |
17916 | 17916 |
"secretSource": { |
17917 | 17917 |
"$ref": "v1.LocalObjectReference", |
17918 |
- "description": "SecretSource is a reference to the secret" |
|
17918 |
+ "description": "secretSource is a reference to the secret" |
|
17919 | 17919 |
}, |
17920 | 17920 |
"mountPath": { |
17921 | 17921 |
"type": "string", |
17922 |
- "description": "MountPath is the path at which to mount the secret" |
|
17922 |
+ "description": "mountPath is the path at which to mount the secret" |
|
17923 | 17923 |
} |
17924 | 17924 |
} |
17925 | 17925 |
}, |
... | ... |
@@ -17929,7 +17933,7 @@ |
17929 | 17929 |
"properties": { |
17930 | 17930 |
"to": { |
17931 | 17931 |
"$ref": "v1.ObjectReference", |
17932 |
- "description": "To defines an optional location to push the output of this build to. Kind must be one of 'ImageStreamTag' or 'DockerImage'. This value will be used to look up a Docker image repository to push to. In the case of an ImageStreamTag, the ImageStreamTag will be looked for in the namespace of the build unless Namespace is specified." |
|
17932 |
+ "description": "to defines an optional location to push the output of this build to. Kind must be one of 'ImageStreamTag' or 'DockerImage'. This value will be used to look up a Docker image repository to push to. In the case of an ImageStreamTag, the ImageStreamTag will be looked for in the namespace of the build unless Namespace is specified." |
|
17933 | 17933 |
}, |
17934 | 17934 |
"pushSecret": { |
17935 | 17935 |
"$ref": "v1.LocalObjectReference", |
... | ... |
@@ -17960,18 +17964,18 @@ |
17960 | 17960 |
"items": { |
17961 | 17961 |
"type": "string" |
17962 | 17962 |
}, |
17963 |
- "description": "Command is the command to run. It may not be specified with Script. This might be needed if the image doesn't have `/bin/sh`, or if you do not want to use a shell. In all other cases, using Script might be more convenient." |
|
17963 |
+ "description": "command is the command to run. It may not be specified with Script. This might be needed if the image doesn't have `/bin/sh`, or if you do not want to use a shell. In all other cases, using Script might be more convenient." |
|
17964 | 17964 |
}, |
17965 | 17965 |
"args": { |
17966 | 17966 |
"type": "array", |
17967 | 17967 |
"items": { |
17968 | 17968 |
"type": "string" |
17969 | 17969 |
}, |
17970 |
- "description": "Args is a list of arguments that are provided to either Command, Script or the Docker image's default entrypoint. The arguments are placed immediately after the command to be run." |
|
17970 |
+ "description": "args is a list of arguments that are provided to either Command, Script or the Docker image's default entrypoint. The arguments are placed immediately after the command to be run." |
|
17971 | 17971 |
}, |
17972 | 17972 |
"script": { |
17973 | 17973 |
"type": "string", |
17974 |
- "description": "Script is a shell script to be run with `/bin/sh -ic`. It may not be specified with Command. Use Script when a shell script is appropriate to execute the post build hook, for example for running unit tests with `rake test`. If you need control over the image entrypoint, or if the image does not have `/bin/sh`, use Command and/or Args. The `-i` flag is needed to support CentOS and RHEL images that use Software Collections (SCL), in order to have the appropriate collections enabled in the shell. E.g., in the Ruby image, this is necessary to make `ruby`, `bundle` and other binaries available in the PATH." |
|
17974 |
+ "description": "script is a shell script to be run with `/bin/sh -ic`. It may not be specified with Command. Use Script when a shell script is appropriate to execute the post build hook, for example for running unit tests with `rake test`. If you need control over the image entrypoint, or if the image does not have `/bin/sh`, use Command and/or Args. The `-i` flag is needed to support CentOS and RHEL images that use Software Collections (SCL), in order to have the appropriate collections enabled in the shell. E.g., in the Ruby image, this is necessary to make `ruby`, `bundle` and other binaries available in the PATH." |
|
17975 | 17975 |
} |
17976 | 17976 |
} |
17977 | 17977 |
}, |
... | ... |
@@ -17985,7 +17989,7 @@ |
17985 | 17985 |
"lastVersion": { |
17986 | 17986 |
"type": "integer", |
17987 | 17987 |
"format": "int32", |
17988 |
- "description": "LastVersion is used to inform about number of last triggered build." |
|
17988 |
+ "description": "lastVersion is used to inform about number of last triggered build." |
|
17989 | 17989 |
} |
17990 | 17990 |
} |
17991 | 17991 |
}, |
... | ... |
@@ -18145,35 +18149,35 @@ |
18145 | 18145 |
}, |
18146 | 18146 |
"metadata": { |
18147 | 18147 |
"$ref": "v1.ObjectMeta", |
18148 |
- "description": "Standard object's metadata." |
|
18148 |
+ "description": "metadata for BuildRequest." |
|
18149 | 18149 |
}, |
18150 | 18150 |
"revision": { |
18151 | 18151 |
"$ref": "v1.SourceRevision", |
18152 |
- "description": "Revision is the information from the source for a specific repo snapshot." |
|
18152 |
+ "description": "revision is the information from the source for a specific repo snapshot." |
|
18153 | 18153 |
}, |
18154 | 18154 |
"triggeredByImage": { |
18155 | 18155 |
"$ref": "v1.ObjectReference", |
18156 |
- "description": "TriggeredByImage is the Image that triggered this build." |
|
18156 |
+ "description": "triggeredByImage is the Image that triggered this build." |
|
18157 | 18157 |
}, |
18158 | 18158 |
"from": { |
18159 | 18159 |
"$ref": "v1.ObjectReference", |
18160 |
- "description": "From is the reference to the ImageStreamTag that triggered the build." |
|
18160 |
+ "description": "from is the reference to the ImageStreamTag that triggered the build." |
|
18161 | 18161 |
}, |
18162 | 18162 |
"binary": { |
18163 | 18163 |
"$ref": "v1.BinaryBuildSource", |
18164 |
- "description": "Binary indicates a request to build from a binary provided to the builder" |
|
18164 |
+ "description": "binary indicates a request to build from a binary provided to the builder" |
|
18165 | 18165 |
}, |
18166 | 18166 |
"lastVersion": { |
18167 | 18167 |
"type": "integer", |
18168 | 18168 |
"format": "int32", |
18169 |
- "description": "LastVersion (optional) is the LastVersion of the BuildConfig that was used to generate the build. If the BuildConfig in the generator doesn't match, a build will not be generated." |
|
18169 |
+ "description": "lastVersion (optional) is the LastVersion of the BuildConfig that was used to generate the build. If the BuildConfig in the generator doesn't match, a build will not be generated." |
|
18170 | 18170 |
}, |
18171 | 18171 |
"env": { |
18172 | 18172 |
"type": "array", |
18173 | 18173 |
"items": { |
18174 | 18174 |
"$ref": "v1.EnvVar" |
18175 | 18175 |
}, |
18176 |
- "description": "Env contains additional environment variables you want to pass into a builder container" |
|
18176 |
+ "description": "env contains additional environment variables you want to pass into a builder container" |
|
18177 | 18177 |
} |
18178 | 18178 |
} |
18179 | 18179 |
}, |
... | ... |
@@ -18194,14 +18198,14 @@ |
18194 | 18194 |
}, |
18195 | 18195 |
"metadata": { |
18196 | 18196 |
"$ref": "unversioned.ListMeta", |
18197 |
- "description": "Standard object's metadata." |
|
18197 |
+ "description": "metadata for BuildList." |
|
18198 | 18198 |
}, |
18199 | 18199 |
"items": { |
18200 | 18200 |
"type": "array", |
18201 | 18201 |
"items": { |
18202 | 18202 |
"$ref": "v1.Build" |
18203 | 18203 |
}, |
18204 |
- "description": "Items is a list of builds" |
|
18204 |
+ "description": "items is a list of builds" |
|
18205 | 18205 |
} |
18206 | 18206 |
} |
18207 | 18207 |
}, |
... | ... |
@@ -18223,11 +18227,11 @@ |
18223 | 18223 |
}, |
18224 | 18224 |
"spec": { |
18225 | 18225 |
"$ref": "v1.BuildSpec", |
18226 |
- "description": "Spec is all the inputs used to execute the build." |
|
18226 |
+ "description": "spec is all the inputs used to execute the build." |
|
18227 | 18227 |
}, |
18228 | 18228 |
"status": { |
18229 | 18229 |
"$ref": "v1.BuildStatus", |
18230 |
- "description": "Status is the current status of the build." |
|
18230 |
+ "description": "status is the current status of the build." |
|
18231 | 18231 |
} |
18232 | 18232 |
} |
18233 | 18233 |
}, |
... | ... |
@@ -18240,36 +18244,36 @@ |
18240 | 18240 |
"properties": { |
18241 | 18241 |
"serviceAccount": { |
18242 | 18242 |
"type": "string", |
18243 |
- "description": "ServiceAccount is the name of the ServiceAccount to use to run the pod created by this build. The pod will be allowed to use secrets referenced by the ServiceAccount" |
|
18243 |
+ "description": "serviceAccount is the name of the ServiceAccount to use to run the pod created by this build. The pod will be allowed to use secrets referenced by the ServiceAccount" |
|
18244 | 18244 |
}, |
18245 | 18245 |
"source": { |
18246 | 18246 |
"$ref": "v1.BuildSource", |
18247 |
- "description": "Source describes the SCM in use." |
|
18247 |
+ "description": "source describes the SCM in use." |
|
18248 | 18248 |
}, |
18249 | 18249 |
"revision": { |
18250 | 18250 |
"$ref": "v1.SourceRevision", |
18251 |
- "description": "Revision is the information from the source for a specific repo snapshot. This is optional." |
|
18251 |
+ "description": "revision is the information from the source for a specific repo snapshot. This is optional." |
|
18252 | 18252 |
}, |
18253 | 18253 |
"strategy": { |
18254 | 18254 |
"$ref": "v1.BuildStrategy", |
18255 |
- "description": "Strategy defines how to perform a build." |
|
18255 |
+ "description": "strategy defines how to perform a build." |
|
18256 | 18256 |
}, |
18257 | 18257 |
"output": { |
18258 | 18258 |
"$ref": "v1.BuildOutput", |
18259 |
- "description": "Output describes the Docker image the Strategy should produce." |
|
18259 |
+ "description": "output describes the Docker image the Strategy should produce." |
|
18260 | 18260 |
}, |
18261 | 18261 |
"resources": { |
18262 | 18262 |
"$ref": "v1.ResourceRequirements", |
18263 |
- "description": "Compute resource requirements to execute the build" |
|
18263 |
+ "description": "resource requirements to execute the build" |
|
18264 | 18264 |
}, |
18265 | 18265 |
"postCommit": { |
18266 | 18266 |
"$ref": "v1.BuildPostCommitSpec", |
18267 |
- "description": "PostCommit is a build hook executed after the build output image is committed, before it is pushed to a registry." |
|
18267 |
+ "description": "postCommit is a build hook executed after the build output image is committed, before it is pushed to a registry." |
|
18268 | 18268 |
}, |
18269 | 18269 |
"completionDeadlineSeconds": { |
18270 | 18270 |
"type": "integer", |
18271 | 18271 |
"format": "int64", |
18272 |
- "description": "Optional duration in seconds, counted from the time when a build pod gets scheduled in the system, that the build may be active on a node before the system actively tries to terminate the build; value must be positive integer" |
|
18272 |
+ "description": "completionDeadlineSeconds is an optional duration in seconds, counted from the time when a build pod gets scheduled in the system, that the build may be active on a node before the system actively tries to terminate the build; value must be positive integer" |
|
18273 | 18273 |
} |
18274 | 18274 |
} |
18275 | 18275 |
}, |
... | ... |
@@ -18282,39 +18286,39 @@ |
18282 | 18282 |
"properties": { |
18283 | 18283 |
"phase": { |
18284 | 18284 |
"type": "string", |
18285 |
- "description": "Phase is the point in the build lifecycle." |
|
18285 |
+ "description": "phase is the point in the build lifecycle." |
|
18286 | 18286 |
}, |
18287 | 18287 |
"cancelled": { |
18288 | 18288 |
"type": "boolean", |
18289 |
- "description": "Cancelled describes if a cancel event was triggered for the build." |
|
18289 |
+ "description": "cancelled describes if a cancel event was triggered for the build." |
|
18290 | 18290 |
}, |
18291 | 18291 |
"reason": { |
18292 | 18292 |
"type": "string", |
18293 |
- "description": "Reason is a brief CamelCase string that describes any failure and is meant for machine parsing and tidy display in the CLI." |
|
18293 |
+ "description": "reason is a brief CamelCase string that describes any failure and is meant for machine parsing and tidy display in the CLI." |
|
18294 | 18294 |
}, |
18295 | 18295 |
"message": { |
18296 | 18296 |
"type": "string", |
18297 |
- "description": "Message is a human-readable message indicating details about why the build has this status." |
|
18297 |
+ "description": "message is a human-readable message indicating details about why the build has this status." |
|
18298 | 18298 |
}, |
18299 | 18299 |
"startTimestamp": { |
18300 | 18300 |
"type": "string", |
18301 |
- "description": "StartTimestamp is a timestamp representing the server time when this Build started running in a Pod. It is represented in RFC3339 form and is in UTC." |
|
18301 |
+ "description": "startTimestamp is a timestamp representing the server time when this Build started running in a Pod. It is represented in RFC3339 form and is in UTC." |
|
18302 | 18302 |
}, |
18303 | 18303 |
"completionTimestamp": { |
18304 | 18304 |
"type": "string", |
18305 |
- "description": "CompletionTimestamp is a timestamp representing the server time when this Build was finished, whether that build failed or succeeded. It reflects the time at which the Pod running the Build terminated. It is represented in RFC3339 form and is in UTC." |
|
18305 |
+ "description": "completionTimestamp is a timestamp representing the server time when this Build was finished, whether that build failed or succeeded. It reflects the time at which the Pod running the Build terminated. It is represented in RFC3339 form and is in UTC." |
|
18306 | 18306 |
}, |
18307 | 18307 |
"duration": { |
18308 | 18308 |
"$ref": "time.Duration", |
18309 |
- "description": "Duration contains time.Duration object describing build time." |
|
18309 |
+ "description": "duration contains time.Duration object describing build time." |
|
18310 | 18310 |
}, |
18311 | 18311 |
"outputDockerImageReference": { |
18312 | 18312 |
"type": "string", |
18313 |
- "description": "OutputDockerImageReference contains a reference to the Docker image that will be built by this build. Its value is computed from Build.Spec.Output.To, and should include the registry address, so that it can be used to push and pull the image." |
|
18313 |
+ "description": "outputDockerImageReference contains a reference to the Docker image that will be built by this build. Its value is computed from Build.Spec.Output.To, and should include the registry address, so that it can be used to push and pull the image." |
|
18314 | 18314 |
}, |
18315 | 18315 |
"config": { |
18316 | 18316 |
"$ref": "v1.ObjectReference", |
18317 |
- "description": "Config is an ObjectReference to the BuildConfig this Build is based on." |
|
18317 |
+ "description": "config is an ObjectReference to the BuildConfig this Build is based on." |
|
18318 | 18318 |
} |
18319 | 18319 |
} |
18320 | 18320 |
}, |
... | ... |
@@ -5072,6 +5072,7 @@ _openshift_cli_set_triggers() |
5072 | 5072 |
flags+=("--from-github") |
5073 | 5073 |
flags+=("--from-image=") |
5074 | 5074 |
flags+=("--from-webhook") |
5075 |
+ flags+=("--from-webhook-allow-env") |
|
5075 | 5076 |
flags+=("--manual") |
5076 | 5077 |
flags+=("--no-headers") |
5077 | 5078 |
flags+=("--output=") |
... | ... |
@@ -1387,6 +1387,7 @@ func deepCopy_api_SourceRevision(in buildapi.SourceRevision, out *buildapi.Sourc |
1387 | 1387 |
|
1388 | 1388 |
func deepCopy_api_WebHookTrigger(in buildapi.WebHookTrigger, out *buildapi.WebHookTrigger, c *conversion.Cloner) error { |
1389 | 1389 |
out.Secret = in.Secret |
1390 |
+ out.AllowEnv = in.AllowEnv |
|
1390 | 1391 |
return nil |
1391 | 1392 |
} |
1392 | 1393 |
|
... | ... |
@@ -1769,6 +1769,7 @@ func autoConvert_api_WebHookTrigger_To_v1_WebHookTrigger(in *buildapi.WebHookTri |
1769 | 1769 |
defaulting.(func(*buildapi.WebHookTrigger))(in) |
1770 | 1770 |
} |
1771 | 1771 |
out.Secret = in.Secret |
1772 |
+ out.AllowEnv = in.AllowEnv |
|
1772 | 1773 |
return nil |
1773 | 1774 |
} |
1774 | 1775 |
|
... | ... |
@@ -2614,6 +2615,7 @@ func autoConvert_v1_WebHookTrigger_To_api_WebHookTrigger(in *v1.WebHookTrigger, |
2614 | 2614 |
defaulting.(func(*v1.WebHookTrigger))(in) |
2615 | 2615 |
} |
2616 | 2616 |
out.Secret = in.Secret |
2617 |
+ out.AllowEnv = in.AllowEnv |
|
2617 | 2618 |
return nil |
2618 | 2619 |
} |
2619 | 2620 |
|
... | ... |
@@ -1410,6 +1410,7 @@ func deepCopy_v1_SourceRevision(in apiv1.SourceRevision, out *apiv1.SourceRevisi |
1410 | 1410 |
|
1411 | 1411 |
func deepCopy_v1_WebHookTrigger(in apiv1.WebHookTrigger, out *apiv1.WebHookTrigger, c *conversion.Cloner) error { |
1412 | 1412 |
out.Secret = in.Secret |
1413 |
+ out.AllowEnv = in.AllowEnv |
|
1413 | 1414 |
return nil |
1414 | 1415 |
} |
1415 | 1416 |
|
... | ... |
@@ -1396,8 +1396,7 @@ func autoConvert_api_BuildTriggerPolicy_To_v1beta3_BuildTriggerPolicy(in *builda |
1396 | 1396 |
out.Type = v1beta3.BuildTriggerType(in.Type) |
1397 | 1397 |
// unable to generate simple pointer conversion for api.WebHookTrigger -> v1beta3.WebHookTrigger |
1398 | 1398 |
if in.GitHubWebHook != nil { |
1399 |
- out.GitHubWebHook = new(v1beta3.WebHookTrigger) |
|
1400 |
- if err := Convert_api_WebHookTrigger_To_v1beta3_WebHookTrigger(in.GitHubWebHook, out.GitHubWebHook, s); err != nil { |
|
1399 |
+ if err := s.Convert(&in.GitHubWebHook, &out.GitHubWebHook, 0); err != nil { |
|
1401 | 1400 |
return err |
1402 | 1401 |
} |
1403 | 1402 |
} else { |
... | ... |
@@ -1405,8 +1404,7 @@ func autoConvert_api_BuildTriggerPolicy_To_v1beta3_BuildTriggerPolicy(in *builda |
1405 | 1405 |
} |
1406 | 1406 |
// unable to generate simple pointer conversion for api.WebHookTrigger -> v1beta3.WebHookTrigger |
1407 | 1407 |
if in.GenericWebHook != nil { |
1408 |
- out.GenericWebHook = new(v1beta3.WebHookTrigger) |
|
1409 |
- if err := Convert_api_WebHookTrigger_To_v1beta3_WebHookTrigger(in.GenericWebHook, out.GenericWebHook, s); err != nil { |
|
1408 |
+ if err := s.Convert(&in.GenericWebHook, &out.GenericWebHook, 0); err != nil { |
|
1410 | 1409 |
return err |
1411 | 1410 |
} |
1412 | 1411 |
} else { |
... | ... |
@@ -1706,18 +1704,6 @@ func autoConvert_api_SourceRevision_To_v1beta3_SourceRevision(in *buildapi.Sourc |
1706 | 1706 |
return nil |
1707 | 1707 |
} |
1708 | 1708 |
|
1709 |
-func autoConvert_api_WebHookTrigger_To_v1beta3_WebHookTrigger(in *buildapi.WebHookTrigger, out *v1beta3.WebHookTrigger, s conversion.Scope) error { |
|
1710 |
- if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found { |
|
1711 |
- defaulting.(func(*buildapi.WebHookTrigger))(in) |
|
1712 |
- } |
|
1713 |
- out.Secret = in.Secret |
|
1714 |
- return nil |
|
1715 |
-} |
|
1716 |
- |
|
1717 |
-func Convert_api_WebHookTrigger_To_v1beta3_WebHookTrigger(in *buildapi.WebHookTrigger, out *v1beta3.WebHookTrigger, s conversion.Scope) error { |
|
1718 |
- return autoConvert_api_WebHookTrigger_To_v1beta3_WebHookTrigger(in, out, s) |
|
1719 |
-} |
|
1720 |
- |
|
1721 | 1709 |
func autoConvert_v1beta3_BinaryBuildRequestOptions_To_api_BinaryBuildRequestOptions(in *v1beta3.BinaryBuildRequestOptions, out *buildapi.BinaryBuildRequestOptions, s conversion.Scope) error { |
1722 | 1710 |
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found { |
1723 | 1711 |
defaulting.(func(*v1beta3.BinaryBuildRequestOptions))(in) |
... | ... |
@@ -2174,8 +2160,7 @@ func autoConvert_v1beta3_BuildTriggerPolicy_To_api_BuildTriggerPolicy(in *v1beta |
2174 | 2174 |
out.Type = buildapi.BuildTriggerType(in.Type) |
2175 | 2175 |
// unable to generate simple pointer conversion for v1beta3.WebHookTrigger -> api.WebHookTrigger |
2176 | 2176 |
if in.GitHubWebHook != nil { |
2177 |
- out.GitHubWebHook = new(buildapi.WebHookTrigger) |
|
2178 |
- if err := Convert_v1beta3_WebHookTrigger_To_api_WebHookTrigger(in.GitHubWebHook, out.GitHubWebHook, s); err != nil { |
|
2177 |
+ if err := s.Convert(&in.GitHubWebHook, &out.GitHubWebHook, 0); err != nil { |
|
2179 | 2178 |
return err |
2180 | 2179 |
} |
2181 | 2180 |
} else { |
... | ... |
@@ -2183,8 +2168,7 @@ func autoConvert_v1beta3_BuildTriggerPolicy_To_api_BuildTriggerPolicy(in *v1beta |
2183 | 2183 |
} |
2184 | 2184 |
// unable to generate simple pointer conversion for v1beta3.WebHookTrigger -> api.WebHookTrigger |
2185 | 2185 |
if in.GenericWebHook != nil { |
2186 |
- out.GenericWebHook = new(buildapi.WebHookTrigger) |
|
2187 |
- if err := Convert_v1beta3_WebHookTrigger_To_api_WebHookTrigger(in.GenericWebHook, out.GenericWebHook, s); err != nil { |
|
2186 |
+ if err := s.Convert(&in.GenericWebHook, &out.GenericWebHook, 0); err != nil { |
|
2188 | 2187 |
return err |
2189 | 2188 |
} |
2190 | 2189 |
} else { |
... | ... |
@@ -2485,18 +2469,6 @@ func autoConvert_v1beta3_SourceRevision_To_api_SourceRevision(in *v1beta3.Source |
2485 | 2485 |
return nil |
2486 | 2486 |
} |
2487 | 2487 |
|
2488 |
-func autoConvert_v1beta3_WebHookTrigger_To_api_WebHookTrigger(in *v1beta3.WebHookTrigger, out *buildapi.WebHookTrigger, s conversion.Scope) error { |
|
2489 |
- if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found { |
|
2490 |
- defaulting.(func(*v1beta3.WebHookTrigger))(in) |
|
2491 |
- } |
|
2492 |
- out.Secret = in.Secret |
|
2493 |
- return nil |
|
2494 |
-} |
|
2495 |
- |
|
2496 |
-func Convert_v1beta3_WebHookTrigger_To_api_WebHookTrigger(in *v1beta3.WebHookTrigger, out *buildapi.WebHookTrigger, s conversion.Scope) error { |
|
2497 |
- return autoConvert_v1beta3_WebHookTrigger_To_api_WebHookTrigger(in, out, s) |
|
2498 |
-} |
|
2499 |
- |
|
2500 | 2488 |
func autoConvert_api_DeploymentCause_To_v1beta3_DeploymentCause(in *deployapi.DeploymentCause, out *deployapiv1beta3.DeploymentCause, s conversion.Scope) error { |
2501 | 2489 |
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found { |
2502 | 2490 |
defaulting.(func(*deployapi.DeploymentCause))(in) |
... | ... |
@@ -6923,7 +6895,6 @@ func init() { |
6923 | 6923 |
autoConvert_api_VolumeMount_To_v1beta3_VolumeMount, |
6924 | 6924 |
autoConvert_api_VolumeSource_To_v1beta3_VolumeSource, |
6925 | 6925 |
autoConvert_api_Volume_To_v1beta3_Volume, |
6926 |
- autoConvert_api_WebHookTrigger_To_v1beta3_WebHookTrigger, |
|
6927 | 6926 |
autoConvert_v1beta3_AWSElasticBlockStoreVolumeSource_To_api_AWSElasticBlockStoreVolumeSource, |
6928 | 6927 |
autoConvert_v1beta3_BinaryBuildRequestOptions_To_api_BinaryBuildRequestOptions, |
6929 | 6928 |
autoConvert_v1beta3_BinaryBuildSource_To_api_BinaryBuildSource, |
... | ... |
@@ -7067,7 +7038,6 @@ func init() { |
7067 | 7067 |
autoConvert_v1beta3_VolumeMount_To_api_VolumeMount, |
7068 | 7068 |
autoConvert_v1beta3_VolumeSource_To_api_VolumeSource, |
7069 | 7069 |
autoConvert_v1beta3_Volume_To_api_Volume, |
7070 |
- autoConvert_v1beta3_WebHookTrigger_To_api_WebHookTrigger, |
|
7071 | 7070 |
) |
7072 | 7071 |
if err != nil { |
7073 | 7072 |
// If one of the conversion functions is malformed, detect it immediately. |
... | ... |
@@ -573,6 +573,10 @@ type BuildConfigStatus struct { |
573 | 573 |
type WebHookTrigger struct { |
574 | 574 |
// Secret used to validate requests. |
575 | 575 |
Secret string |
576 |
+ |
|
577 |
+ // AllowEnv determines whether the webhook can set environment variables; can only |
|
578 |
+ // be set to true for GenericWebHook |
|
579 |
+ AllowEnv bool |
|
576 | 580 |
} |
577 | 581 |
|
578 | 582 |
// ImageChangeTrigger allows builds to be triggered when an ImageStream changes |
... | ... |
@@ -657,6 +661,9 @@ type BuildConfigList struct { |
657 | 657 |
type GenericWebHookEvent struct { |
658 | 658 |
// Git is the git information, if any. |
659 | 659 |
Git *GitInfo |
660 |
+ |
|
661 |
+ // Env contains additional environment variables you want to pass into a builder container |
|
662 |
+ Env []kapi.EnvVar |
|
660 | 663 |
} |
661 | 664 |
|
662 | 665 |
// GitInfo is the aggregated git information for a generic webhook post |
... | ... |
@@ -7,14 +7,14 @@ package v1 |
7 | 7 |
|
8 | 8 |
var map_BinaryBuildRequestOptions = map[string]string{ |
9 | 9 |
"": "BinaryBuildRequestOptions are the options required to fully speficy a binary build request", |
10 |
- "metadata": "Standard object's metadata.", |
|
11 |
- "asFile": "AsFile determines if the binary should be created as a file within the source rather than extracted as an archive", |
|
12 |
- "revision.commit": "Commit is the value identifying a specific commit", |
|
13 |
- "revision.message": "Message is the description of a specific commit", |
|
14 |
- "revision.authorName": "AuthorName of the source control user", |
|
15 |
- "revision.authorEmail": "AuthorEmail of the source control user", |
|
16 |
- "revision.committerName": "CommitterName of the source control user", |
|
17 |
- "revision.committerEmail": "CommitterEmail of the source control user", |
|
10 |
+ "metadata": "metadata for BinaryBuildRequestOptions.", |
|
11 |
+ "asFile": "asFile determines if the binary should be created as a file within the source rather than extracted as an archive", |
|
12 |
+ "revision.commit": "revision.commit is the value identifying a specific commit", |
|
13 |
+ "revision.message": "revision.message is the description of a specific commit", |
|
14 |
+ "revision.authorName": "revision.authorName of the source control user", |
|
15 |
+ "revision.authorEmail": "revision.authorEmail of the source control user", |
|
16 |
+ "revision.committerName": "revision.committerName of the source control user", |
|
17 |
+ "revision.committerEmail": "revision.committerEmail of the source control user", |
|
18 | 18 |
} |
19 | 19 |
|
20 | 20 |
func (BinaryBuildRequestOptions) SwaggerDoc() map[string]string { |
... | ... |
@@ -23,7 +23,7 @@ func (BinaryBuildRequestOptions) SwaggerDoc() map[string]string { |
23 | 23 |
|
24 | 24 |
var map_BinaryBuildSource = map[string]string{ |
25 | 25 |
"": "BinaryBuildSource describes a binary file to be used for the Docker and Source build strategies, where the file will be extracted and used as the build source.", |
26 |
- "asFile": "AsFile indicates that the provided binary input should be considered a single file within the build input. For example, specifying \"webapp.war\" would place the provided binary as `/webapp.war` for the builder. If left empty, the Docker and Source build strategies assume this file is a zip, tar, or tar.gz file and extract it as the source. The custom strategy receives this binary as standard input. This filename may not contain slashes or be '..' or '.'.", |
|
26 |
+ "asFile": "asFile indicates that the provided binary input should be considered a single file within the build input. For example, specifying \"webapp.war\" would place the provided binary as `/webapp.war` for the builder. If left empty, the Docker and Source build strategies assume this file is a zip, tar, or tar.gz file and extract it as the source. The custom strategy receives this binary as standard input. This filename may not contain slashes or be '..' or '.'.", |
|
27 | 27 |
} |
28 | 28 |
|
29 | 29 |
func (BinaryBuildSource) SwaggerDoc() map[string]string { |
... | ... |
@@ -33,8 +33,8 @@ func (BinaryBuildSource) SwaggerDoc() map[string]string { |
33 | 33 |
var map_Build = map[string]string{ |
34 | 34 |
"": "Build encapsulates the inputs needed to produce a new deployable image, as well as the status of the execution and a reference to the Pod which executed the build.", |
35 | 35 |
"metadata": "Standard object's metadata.", |
36 |
- "spec": "Spec is all the inputs used to execute the build.", |
|
37 |
- "status": "Status is the current status of the build.", |
|
36 |
+ "spec": "spec is all the inputs used to execute the build.", |
|
37 |
+ "status": "status is the current status of the build.", |
|
38 | 38 |
} |
39 | 39 |
|
40 | 40 |
func (Build) SwaggerDoc() map[string]string { |
... | ... |
@@ -43,9 +43,9 @@ func (Build) SwaggerDoc() map[string]string { |
43 | 43 |
|
44 | 44 |
var map_BuildConfig = map[string]string{ |
45 | 45 |
"": "BuildConfig is a template which can be used to create new builds.", |
46 |
- "metadata": "Standard object's metadata.", |
|
47 |
- "spec": "Spec holds all the input necessary to produce a new build, and the conditions when to trigger them.", |
|
48 |
- "status": "Status holds any relevant information about a build config", |
|
46 |
+ "metadata": "metadata for BuildConfig.", |
|
47 |
+ "spec": "spec holds all the input necessary to produce a new build, and the conditions when to trigger them.", |
|
48 |
+ "status": "status holds any relevant information about a build config", |
|
49 | 49 |
} |
50 | 50 |
|
51 | 51 |
func (BuildConfig) SwaggerDoc() map[string]string { |
... | ... |
@@ -54,8 +54,8 @@ func (BuildConfig) SwaggerDoc() map[string]string { |
54 | 54 |
|
55 | 55 |
var map_BuildConfigList = map[string]string{ |
56 | 56 |
"": "BuildConfigList is a collection of BuildConfigs.", |
57 |
- "metadata": "Standard object's metadata.", |
|
58 |
- "items": "Items is a list of build configs", |
|
57 |
+ "metadata": "metadata for BuildConfigList.", |
|
58 |
+ "items": "items is a list of build configs", |
|
59 | 59 |
} |
60 | 60 |
|
61 | 61 |
func (BuildConfigList) SwaggerDoc() map[string]string { |
... | ... |
@@ -64,7 +64,7 @@ func (BuildConfigList) SwaggerDoc() map[string]string { |
64 | 64 |
|
65 | 65 |
var map_BuildConfigSpec = map[string]string{ |
66 | 66 |
"": "BuildConfigSpec describes when and how builds are created", |
67 |
- "triggers": "Triggers determine how new Builds can be launched from a BuildConfig. If no triggers are defined, a new build can only occur as a result of an explicit client build creation.", |
|
67 |
+ "triggers": "triggers determine how new Builds can be launched from a BuildConfig. If no triggers are defined, a new build can only occur as a result of an explicit client build creation.", |
|
68 | 68 |
} |
69 | 69 |
|
70 | 70 |
func (BuildConfigSpec) SwaggerDoc() map[string]string { |
... | ... |
@@ -73,7 +73,7 @@ func (BuildConfigSpec) SwaggerDoc() map[string]string { |
73 | 73 |
|
74 | 74 |
var map_BuildConfigStatus = map[string]string{ |
75 | 75 |
"": "BuildConfigStatus contains current state of the build config object.", |
76 |
- "lastVersion": "LastVersion is used to inform about number of last triggered build.", |
|
76 |
+ "lastVersion": "lastVersion is used to inform about number of last triggered build.", |
|
77 | 77 |
} |
78 | 78 |
|
79 | 79 |
func (BuildConfigStatus) SwaggerDoc() map[string]string { |
... | ... |
@@ -82,8 +82,8 @@ func (BuildConfigStatus) SwaggerDoc() map[string]string { |
82 | 82 |
|
83 | 83 |
var map_BuildList = map[string]string{ |
84 | 84 |
"": "BuildList is a collection of Builds.", |
85 |
- "metadata": "Standard object's metadata.", |
|
86 |
- "items": "Items is a list of builds", |
|
85 |
+ "metadata": "metadata for BuildList.", |
|
86 |
+ "items": "items is a list of builds", |
|
87 | 87 |
} |
88 | 88 |
|
89 | 89 |
func (BuildList) SwaggerDoc() map[string]string { |
... | ... |
@@ -100,16 +100,16 @@ func (BuildLog) SwaggerDoc() map[string]string { |
100 | 100 |
|
101 | 101 |
var map_BuildLogOptions = map[string]string{ |
102 | 102 |
"": "BuildLogOptions is the REST options for a build log", |
103 |
- "container": "The container for which to stream logs. Defaults to only container if there is one container in the pod.", |
|
104 |
- "follow": "Follow if true indicates that the build log should be streamed until the build terminates.", |
|
105 |
- "previous": "Return previous build logs. Defaults to false.", |
|
106 |
- "sinceSeconds": "A relative time in seconds before the current time from which to show logs. If this value precedes the time a pod was started, only logs since the pod start will be returned. If this value is in the future, no logs will be returned. Only one of sinceSeconds or sinceTime may be specified.", |
|
107 |
- "sinceTime": "An RFC3339 timestamp from which to show logs. If this value preceeds the time a pod was started, only logs since the pod start will be returned. If this value is in the future, no logs will be returned. Only one of sinceSeconds or sinceTime may be specified.", |
|
108 |
- "timestamps": "If true, add an RFC3339 or RFC3339Nano timestamp at the beginning of every line of log output. Defaults to false.", |
|
109 |
- "tailLines": "If set, the number of lines from the end of the logs to show. If not specified, logs are shown from the creation of the container or sinceSeconds or sinceTime", |
|
110 |
- "limitBytes": "If set, the number of bytes to read from the server before terminating the log output. This may not display a complete final line of logging, and may return slightly more or slightly less than the specified limit.", |
|
111 |
- "nowait": "NoWait if true causes the call to return immediately even if the build is not available yet. Otherwise the server will wait until the build has started.", |
|
112 |
- "version": "Version of the build for which to view logs.", |
|
103 |
+ "container": "cointainer for which to stream logs. Defaults to only container if there is one container in the pod.", |
|
104 |
+ "follow": "follow if true indicates that the build log should be streamed until the build terminates.", |
|
105 |
+ "previous": "previous returns previous build logs. Defaults to false.", |
|
106 |
+ "sinceSeconds": "sinceSeconds is a relative time in seconds before the current time from which to show logs. If this value precedes the time a pod was started, only logs since the pod start will be returned. If this value is in the future, no logs will be returned. Only one of sinceSeconds or sinceTime may be specified.", |
|
107 |
+ "sinceTime": "sinceTime is an RFC3339 timestamp from which to show logs. If this value preceeds the time a pod was started, only logs since the pod start will be returned. If this value is in the future, no logs will be returned. Only one of sinceSeconds or sinceTime may be specified.", |
|
108 |
+ "timestamps": "timestamps, If true, add an RFC3339 or RFC3339Nano timestamp at the beginning of every line of log output. Defaults to false.", |
|
109 |
+ "tailLines": "tailLines, If set, is the number of lines from the end of the logs to show. If not specified, logs are shown from the creation of the container or sinceSeconds or sinceTime", |
|
110 |
+ "limitBytes": "limitBytes, If set, is the number of bytes to read from the server before terminating the log output. This may not display a complete final line of logging, and may return slightly more or slightly less than the specified limit.", |
|
111 |
+ "nowait": "noWait if true causes the call to return immediately even if the build is not available yet. Otherwise the server will wait until the build has started.", |
|
112 |
+ "version": "version of the build for which to view logs.", |
|
113 | 113 |
} |
114 | 114 |
|
115 | 115 |
func (BuildLogOptions) SwaggerDoc() map[string]string { |
... | ... |
@@ -118,7 +118,7 @@ func (BuildLogOptions) SwaggerDoc() map[string]string { |
118 | 118 |
|
119 | 119 |
var map_BuildOutput = map[string]string{ |
120 | 120 |
"": "BuildOutput is input to a build strategy and describes the Docker image that the strategy should produce.", |
121 |
- "to": "To defines an optional location to push the output of this build to. Kind must be one of 'ImageStreamTag' or 'DockerImage'. This value will be used to look up a Docker image repository to push to. In the case of an ImageStreamTag, the ImageStreamTag will be looked for in the namespace of the build unless Namespace is specified.", |
|
121 |
+ "to": "to defines an optional location to push the output of this build to. Kind must be one of 'ImageStreamTag' or 'DockerImage'. This value will be used to look up a Docker image repository to push to. In the case of an ImageStreamTag, the ImageStreamTag will be looked for in the namespace of the build unless Namespace is specified.", |
|
122 | 122 |
"pushSecret": "PushSecret is the name of a Secret that would be used for setting up the authentication for executing the Docker push to authentication enabled Docker Registry (or Docker Hub).", |
123 | 123 |
} |
124 | 124 |
|
... | ... |
@@ -128,9 +128,9 @@ func (BuildOutput) SwaggerDoc() map[string]string { |
128 | 128 |
|
129 | 129 |
var map_BuildPostCommitSpec = map[string]string{ |
130 | 130 |
"": "A BuildPostCommitSpec holds a build post commit hook specification. The hook executes a command in a temporary container running the build output image, immediately after the last layer of the image is committed and before the image is pushed to a registry. The command is executed with the current working directory ($PWD) set to the image's WORKDIR.\n\nThe build will be marked as failed if the hook execution fails. It will fail if the script or command return a non-zero exit code, or if there is any other error related to starting the temporary container.\n\nThere are five different ways to configure the hook. As an example, all forms below are equivalent and will execute `rake test --verbose`.\n\n1. Shell script:\n\n \"postCommit\": {\n \"script\": \"rake test --verbose\",\n }\n\n The above is a convenient form which is equivalent to:\n\n \"postCommit\": {\n \"command\": [\"/bin/sh\", \"-ic\"],\n \"args\": [\"rake test --verbose\"]\n }\n\n2. A command as the image entrypoint:\n\n \"postCommit\": {\n \"commit\": [\"rake\", \"test\", \"--verbose\"]\n }\n\n Command overrides the image entrypoint in the exec form, as documented in\n Docker: https://docs.docker.com/engine/reference/builder/#entrypoint.\n\n3. Pass arguments to the default entrypoint:\n\n \"postCommit\": {\n\t\t \"args\": [\"rake\", \"test\", \"--verbose\"]\n\t }\n\n This form is only useful if the image entrypoint can handle arguments.\n\n4. Shell script with arguments:\n\n \"postCommit\": {\n \"script\": \"rake test $1\",\n \"args\": [\"--verbose\"]\n }\n\n This form is useful if you need to pass arguments that would otherwise be\n hard to quote properly in the shell script. In the script, $0 will be\n \"/bin/sh\" and $1, $2, etc, are the positional arguments from Args.\n\n5. Command with arguments:\n\n \"postCommit\": {\n \"command\": [\"rake\", \"test\"],\n \"args\": [\"--verbose\"]\n }\n\n This form is equivalent to appending the arguments to the Command slice.\n\nIt is invalid to provide both Script and Command simultaneously. If none of the fields are specified, the hook is not executed.", |
131 |
- "command": "Command is the command to run. It may not be specified with Script. This might be needed if the image doesn't have `/bin/sh`, or if you do not want to use a shell. In all other cases, using Script might be more convenient.", |
|
132 |
- "args": "Args is a list of arguments that are provided to either Command, Script or the Docker image's default entrypoint. The arguments are placed immediately after the command to be run.", |
|
133 |
- "script": "Script is a shell script to be run with `/bin/sh -ic`. It may not be specified with Command. Use Script when a shell script is appropriate to execute the post build hook, for example for running unit tests with `rake test`. If you need control over the image entrypoint, or if the image does not have `/bin/sh`, use Command and/or Args. The `-i` flag is needed to support CentOS and RHEL images that use Software Collections (SCL), in order to have the appropriate collections enabled in the shell. E.g., in the Ruby image, this is necessary to make `ruby`, `bundle` and other binaries available in the PATH.", |
|
131 |
+ "command": "command is the command to run. It may not be specified with Script. This might be needed if the image doesn't have `/bin/sh`, or if you do not want to use a shell. In all other cases, using Script might be more convenient.", |
|
132 |
+ "args": "args is a list of arguments that are provided to either Command, Script or the Docker image's default entrypoint. The arguments are placed immediately after the command to be run.", |
|
133 |
+ "script": "script is a shell script to be run with `/bin/sh -ic`. It may not be specified with Command. Use Script when a shell script is appropriate to execute the post build hook, for example for running unit tests with `rake test`. If you need control over the image entrypoint, or if the image does not have `/bin/sh`, use Command and/or Args. The `-i` flag is needed to support CentOS and RHEL images that use Software Collections (SCL), in order to have the appropriate collections enabled in the shell. E.g., in the Ruby image, this is necessary to make `ruby`, `bundle` and other binaries available in the PATH.", |
|
134 | 134 |
} |
135 | 135 |
|
136 | 136 |
func (BuildPostCommitSpec) SwaggerDoc() map[string]string { |
... | ... |
@@ -139,13 +139,13 @@ func (BuildPostCommitSpec) SwaggerDoc() map[string]string { |
139 | 139 |
|
140 | 140 |
var map_BuildRequest = map[string]string{ |
141 | 141 |
"": "BuildRequest is the resource used to pass parameters to build generator", |
142 |
- "metadata": "Standard object's metadata.", |
|
143 |
- "revision": "Revision is the information from the source for a specific repo snapshot.", |
|
144 |
- "triggeredByImage": "TriggeredByImage is the Image that triggered this build.", |
|
145 |
- "from": "From is the reference to the ImageStreamTag that triggered the build.", |
|
146 |
- "binary": "Binary indicates a request to build from a binary provided to the builder", |
|
147 |
- "lastVersion": "LastVersion (optional) is the LastVersion of the BuildConfig that was used to generate the build. If the BuildConfig in the generator doesn't match, a build will not be generated.", |
|
148 |
- "env": "Env contains additional environment variables you want to pass into a builder container", |
|
142 |
+ "metadata": "metadata for BuildRequest.", |
|
143 |
+ "revision": "revision is the information from the source for a specific repo snapshot.", |
|
144 |
+ "triggeredByImage": "triggeredByImage is the Image that triggered this build.", |
|
145 |
+ "from": "from is the reference to the ImageStreamTag that triggered the build.", |
|
146 |
+ "binary": "binary indicates a request to build from a binary provided to the builder", |
|
147 |
+ "lastVersion": "lastVersion (optional) is the LastVersion of the BuildConfig that was used to generate the build. If the BuildConfig in the generator doesn't match, a build will not be generated.", |
|
148 |
+ "env": "env contains additional environment variables you want to pass into a builder container", |
|
149 | 149 |
} |
150 | 150 |
|
151 | 151 |
func (BuildRequest) SwaggerDoc() map[string]string { |
... | ... |
@@ -154,14 +154,14 @@ func (BuildRequest) SwaggerDoc() map[string]string { |
154 | 154 |
|
155 | 155 |
var map_BuildSource = map[string]string{ |
156 | 156 |
"": "BuildSource is the SCM used for the build.", |
157 |
- "type": "Type of build input to accept", |
|
158 |
- "binary": "Binary builds accept a binary as their input. The binary is generally assumed to be a tar, gzipped tar, or zip file depending on the strategy. For Docker builds, this is the build context and an optional Dockerfile may be specified to override any Dockerfile in the build context. For Source builds, this is assumed to be an archive as described above. For Source and Docker builds, if binary.asFile is set the build will receive a directory with a single file. contextDir may be used when an archive is provided. Custom builds will receive this binary as input on STDIN.", |
|
159 |
- "dockerfile": "Dockerfile is the raw contents of a Dockerfile which should be built. When this option is specified, the FROM may be modified based on your strategy base image and additional ENV stanzas from your strategy environment will be added after the FROM, but before the rest of your Dockerfile stanzas. The Dockerfile source type may be used with other options like git - in those cases the Git repo will have any innate Dockerfile replaced in the context dir.", |
|
160 |
- "git": "Git contains optional information about git build source", |
|
161 |
- "images": "Images describes a set of images to be used to provide source for the build", |
|
162 |
- "contextDir": "ContextDir specifies the sub-directory where the source code for the application exists. This allows to have buildable sources in directory other than root of repository.", |
|
163 |
- "sourceSecret": "SourceSecret is the name of a Secret that would be used for setting up the authentication for cloning private repository. The secret contains valid credentials for remote repository, where the data's key represent the authentication method to be used and value is the base64 encoded credentials. Supported auth methods are: ssh-privatekey.", |
|
164 |
- "secrets": "Secrets represents a list of secrets and their destinations that will be used only for the build.", |
|
157 |
+ "type": "type of build input to accept", |
|
158 |
+ "binary": "binary builds accept a binary as their input. The binary is generally assumed to be a tar, gzipped tar, or zip file depending on the strategy. For Docker builds, this is the build context and an optional Dockerfile may be specified to override any Dockerfile in the build context. For Source builds, this is assumed to be an archive as described above. For Source and Docker builds, if binary.asFile is set the build will receive a directory with a single file. contextDir may be used when an archive is provided. Custom builds will receive this binary as input on STDIN.", |
|
159 |
+ "dockerfile": "dockerfile is the raw contents of a Dockerfile which should be built. When this option is specified, the FROM may be modified based on your strategy base image and additional ENV stanzas from your strategy environment will be added after the FROM, but before the rest of your Dockerfile stanzas. The Dockerfile source type may be used with other options like git - in those cases the Git repo will have any innate Dockerfile replaced in the context dir.", |
|
160 |
+ "git": "git contains optional information about git build source", |
|
161 |
+ "images": "images describes a set of images to be used to provide source for the build", |
|
162 |
+ "contextDir": "contextDir specifies the sub-directory where the source code for the application exists. This allows to have buildable sources in directory other than root of repository.", |
|
163 |
+ "sourceSecret": "sourceSecret is the name of a Secret that would be used for setting up the authentication for cloning private repository. The secret contains valid credentials for remote repository, where the data's key represent the authentication method to be used and value is the base64 encoded credentials. Supported auth methods are: ssh-privatekey.", |
|
164 |
+ "secrets": "secrets represents a list of secrets and their destinations that will be used only for the build.", |
|
165 | 165 |
} |
166 | 166 |
|
167 | 167 |
func (BuildSource) SwaggerDoc() map[string]string { |
... | ... |
@@ -170,14 +170,14 @@ func (BuildSource) SwaggerDoc() map[string]string { |
170 | 170 |
|
171 | 171 |
var map_BuildSpec = map[string]string{ |
172 | 172 |
"": "BuildSpec encapsulates all the inputs necessary to represent a build.", |
173 |
- "serviceAccount": "ServiceAccount is the name of the ServiceAccount to use to run the pod created by this build. The pod will be allowed to use secrets referenced by the ServiceAccount", |
|
174 |
- "source": "Source describes the SCM in use.", |
|
175 |
- "revision": "Revision is the information from the source for a specific repo snapshot. This is optional.", |
|
176 |
- "strategy": "Strategy defines how to perform a build.", |
|
177 |
- "output": "Output describes the Docker image the Strategy should produce.", |
|
178 |
- "resources": "Compute resource requirements to execute the build", |
|
179 |
- "postCommit": "PostCommit is a build hook executed after the build output image is committed, before it is pushed to a registry.", |
|
180 |
- "completionDeadlineSeconds": "Optional duration in seconds, counted from the time when a build pod gets scheduled in the system, that the build may be active on a node before the system actively tries to terminate the build; value must be positive integer", |
|
173 |
+ "serviceAccount": "serviceAccount is the name of the ServiceAccount to use to run the pod created by this build. The pod will be allowed to use secrets referenced by the ServiceAccount", |
|
174 |
+ "source": "source describes the SCM in use.", |
|
175 |
+ "revision": "revision is the information from the source for a specific repo snapshot. This is optional.", |
|
176 |
+ "strategy": "strategy defines how to perform a build.", |
|
177 |
+ "output": "output describes the Docker image the Strategy should produce.", |
|
178 |
+ "resources": "resource requirements to execute the build", |
|
179 |
+ "postCommit": "postCommit is a build hook executed after the build output image is committed, before it is pushed to a registry.", |
|
180 |
+ "completionDeadlineSeconds": "completionDeadlineSeconds is an optional duration in seconds, counted from the time when a build pod gets scheduled in the system, that the build may be active on a node before the system actively tries to terminate the build; value must be positive integer", |
|
181 | 181 |
} |
182 | 182 |
|
183 | 183 |
func (BuildSpec) SwaggerDoc() map[string]string { |
... | ... |
@@ -186,15 +186,15 @@ func (BuildSpec) SwaggerDoc() map[string]string { |
186 | 186 |
|
187 | 187 |
var map_BuildStatus = map[string]string{ |
188 | 188 |
"": "BuildStatus contains the status of a build", |
189 |
- "phase": "Phase is the point in the build lifecycle.", |
|
190 |
- "cancelled": "Cancelled describes if a cancel event was triggered for the build.", |
|
191 |
- "reason": "Reason is a brief CamelCase string that describes any failure and is meant for machine parsing and tidy display in the CLI.", |
|
192 |
- "message": "Message is a human-readable message indicating details about why the build has this status.", |
|
193 |
- "startTimestamp": "StartTimestamp is a timestamp representing the server time when this Build started running in a Pod. It is represented in RFC3339 form and is in UTC.", |
|
194 |
- "completionTimestamp": "CompletionTimestamp is a timestamp representing the server time when this Build was finished, whether that build failed or succeeded. It reflects the time at which the Pod running the Build terminated. It is represented in RFC3339 form and is in UTC.", |
|
195 |
- "duration": "Duration contains time.Duration object describing build time.", |
|
196 |
- "outputDockerImageReference": "OutputDockerImageReference contains a reference to the Docker image that will be built by this build. Its value is computed from Build.Spec.Output.To, and should include the registry address, so that it can be used to push and pull the image.", |
|
197 |
- "config": "Config is an ObjectReference to the BuildConfig this Build is based on.", |
|
189 |
+ "phase": "phase is the point in the build lifecycle.", |
|
190 |
+ "cancelled": "cancelled describes if a cancel event was triggered for the build.", |
|
191 |
+ "reason": "reason is a brief CamelCase string that describes any failure and is meant for machine parsing and tidy display in the CLI.", |
|
192 |
+ "message": "message is a human-readable message indicating details about why the build has this status.", |
|
193 |
+ "startTimestamp": "startTimestamp is a timestamp representing the server time when this Build started running in a Pod. It is represented in RFC3339 form and is in UTC.", |
|
194 |
+ "completionTimestamp": "completionTimestamp is a timestamp representing the server time when this Build was finished, whether that build failed or succeeded. It reflects the time at which the Pod running the Build terminated. It is represented in RFC3339 form and is in UTC.", |
|
195 |
+ "duration": "duration contains time.Duration object describing build time.", |
|
196 |
+ "outputDockerImageReference": "outputDockerImageReference contains a reference to the Docker image that will be built by this build. Its value is computed from Build.Spec.Output.To, and should include the registry address, so that it can be used to push and pull the image.", |
|
197 |
+ "config": "config is an ObjectReference to the BuildConfig this Build is based on.", |
|
198 | 198 |
} |
199 | 199 |
|
200 | 200 |
func (BuildStatus) SwaggerDoc() map[string]string { |
... | ... |
@@ -203,10 +203,10 @@ func (BuildStatus) SwaggerDoc() map[string]string { |
203 | 203 |
|
204 | 204 |
var map_BuildStrategy = map[string]string{ |
205 | 205 |
"": "BuildStrategy contains the details of how to perform a build.", |
206 |
- "type": "Type is the kind of build strategy.", |
|
207 |
- "dockerStrategy": "DockerStrategy holds the parameters to the Docker build strategy.", |
|
208 |
- "sourceStrategy": "SourceStrategy holds the parameters to the Source build strategy.", |
|
209 |
- "customStrategy": "CustomStrategy holds the parameters to the Custom build strategy", |
|
206 |
+ "type": "type is the kind of build strategy.", |
|
207 |
+ "dockerStrategy": "dockerStrategy holds the parameters to the Docker build strategy.", |
|
208 |
+ "sourceStrategy": "sourceStrategy holds the parameters to the Source build strategy.", |
|
209 |
+ "customStrategy": "customStrategy holds the parameters to the Custom build strategy", |
|
210 | 210 |
} |
211 | 211 |
|
212 | 212 |
func (BuildStrategy) SwaggerDoc() map[string]string { |
... | ... |
@@ -215,10 +215,10 @@ func (BuildStrategy) SwaggerDoc() map[string]string { |
215 | 215 |
|
216 | 216 |
var map_BuildTriggerPolicy = map[string]string{ |
217 | 217 |
"": "BuildTriggerPolicy describes a policy for a single trigger that results in a new Build.", |
218 |
- "type": "Type is the type of build trigger", |
|
219 |
- "github": "GitHubWebHook contains the parameters for a GitHub webhook type of trigger", |
|
220 |
- "generic": "GenericWebHook contains the parameters for a Generic webhook type of trigger", |
|
221 |
- "imageChange": "ImageChange contains parameters for an ImageChange type of trigger", |
|
218 |
+ "type": "type is the type of build trigger", |
|
219 |
+ "github": "github contains the parameters for a GitHub webhook type of trigger", |
|
220 |
+ "generic": "generic contains the parameters for a Generic webhook type of trigger", |
|
221 |
+ "imageChange": "imageChange contains parameters for an ImageChange type of trigger", |
|
222 | 222 |
} |
223 | 223 |
|
224 | 224 |
func (BuildTriggerPolicy) SwaggerDoc() map[string]string { |
... | ... |
@@ -227,13 +227,13 @@ func (BuildTriggerPolicy) SwaggerDoc() map[string]string { |
227 | 227 |
|
228 | 228 |
var map_CustomBuildStrategy = map[string]string{ |
229 | 229 |
"": "CustomBuildStrategy defines input parameters specific to Custom build.", |
230 |
- "from": "From is reference to an DockerImage, ImageStreamTag, or ImageStreamImage from which the docker image should be pulled", |
|
231 |
- "pullSecret": "PullSecret is the name of a Secret that would be used for setting up the authentication for pulling the Docker images from the private Docker registries", |
|
232 |
- "env": "Env contains additional environment variables you want to pass into a builder container", |
|
233 |
- "exposeDockerSocket": "ExposeDockerSocket will allow running Docker commands (and build Docker images) from inside the Docker container.", |
|
234 |
- "forcePull": "ForcePull describes if the controller should configure the build pod to always pull the images for the builder or only pull if it is not present locally", |
|
235 |
- "secrets": "Secrets is a list of additional secrets that will be included in the build pod", |
|
236 |
- "buildAPIVersion": "BuildAPIVersion is the requested API version for the Build object serialized and passed to the custom builder", |
|
230 |
+ "from": "from is reference to an DockerImage, ImageStreamTag, or ImageStreamImage from which the docker image should be pulled", |
|
231 |
+ "pullSecret": "pullSecret is the name of a Secret that would be used for setting up the authentication for pulling the Docker images from the private Docker registries", |
|
232 |
+ "env": "env contains additional environment variables you want to pass into a builder container", |
|
233 |
+ "exposeDockerSocket": "exposeDockerSocket will allow running Docker commands (and build Docker images) from inside the Docker container.", |
|
234 |
+ "forcePull": "forcePull describes if the controller should configure the build pod to always pull the images for the builder or only pull if it is not present locally", |
|
235 |
+ "secrets": "secrets is a list of additional secrets that will be included in the build pod", |
|
236 |
+ "buildAPIVersion": "buildAPIVersion is the requested API version for the Build object serialized and passed to the custom builder", |
|
237 | 237 |
} |
238 | 238 |
|
239 | 239 |
func (CustomBuildStrategy) SwaggerDoc() map[string]string { |
... | ... |
@@ -242,12 +242,12 @@ func (CustomBuildStrategy) SwaggerDoc() map[string]string { |
242 | 242 |
|
243 | 243 |
var map_DockerBuildStrategy = map[string]string{ |
244 | 244 |
"": "DockerBuildStrategy defines input parameters specific to Docker build.", |
245 |
- "from": "From is reference to an DockerImage, ImageStreamTag, or ImageStreamImage from which the docker image should be pulled the resulting image will be used in the FROM line of the Dockerfile for this build.", |
|
246 |
- "pullSecret": "PullSecret is the name of a Secret that would be used for setting up the authentication for pulling the Docker images from the private Docker registries", |
|
247 |
- "noCache": "NoCache if set to true indicates that the docker build must be executed with the --no-cache=true flag", |
|
248 |
- "env": "Env contains additional environment variables you want to pass into a builder container", |
|
249 |
- "forcePull": "ForcePull describes if the builder should pull the images from registry prior to building.", |
|
250 |
- "dockerfilePath": "DockerfilePath is the path of the Dockerfile that will be used to build the Docker image, relative to the root of the context (contextDir).", |
|
245 |
+ "from": "from is reference to an DockerImage, ImageStreamTag, or ImageStreamImage from which the docker image should be pulled the resulting image will be used in the FROM line of the Dockerfile for this build.", |
|
246 |
+ "pullSecret": "pullSecret is the name of a Secret that would be used for setting up the authentication for pulling the Docker images from the private Docker registries", |
|
247 |
+ "noCache": "noCache if set to true indicates that the docker build must be executed with the --no-cache=true flag", |
|
248 |
+ "env": "env contains additional environment variables you want to pass into a builder container", |
|
249 |
+ "forcePull": "forcePull describes if the builder should pull the images from registry prior to building.", |
|
250 |
+ "dockerfilePath": "dockerfilePath is the path of the Dockerfile that will be used to build the Docker image, relative to the root of the context (contextDir).", |
|
251 | 251 |
} |
252 | 252 |
|
253 | 253 |
func (DockerBuildStrategy) SwaggerDoc() map[string]string { |
... | ... |
@@ -256,8 +256,9 @@ func (DockerBuildStrategy) SwaggerDoc() map[string]string { |
256 | 256 |
|
257 | 257 |
var map_GenericWebHookEvent = map[string]string{ |
258 | 258 |
"": "GenericWebHookEvent is the payload expected for a generic webhook post", |
259 |
- "type": "Type is the type of source repository", |
|
260 |
- "git": "Git is the git information if the Type is BuildSourceGit", |
|
259 |
+ "type": "type is the type of source repository", |
|
260 |
+ "git": "git is the git information if the Type is BuildSourceGit", |
|
261 |
+ "env": "env contains additional environment variables you want to pass into a builder container", |
|
261 | 262 |
} |
262 | 263 |
|
263 | 264 |
func (GenericWebHookEvent) SwaggerDoc() map[string]string { |
... | ... |
@@ -266,10 +267,10 @@ func (GenericWebHookEvent) SwaggerDoc() map[string]string { |
266 | 266 |
|
267 | 267 |
var map_GitBuildSource = map[string]string{ |
268 | 268 |
"": "GitBuildSource defines the parameters of a Git SCM", |
269 |
- "uri": "URI points to the source that will be built. The structure of the source will depend on the type of build to run", |
|
270 |
- "ref": "Ref is the branch/tag/ref to build.", |
|
271 |
- "httpProxy": "HTTPProxy is a proxy used to reach the git repository over http", |
|
272 |
- "httpsProxy": "HTTPSProxy is a proxy used to reach the git repository over https", |
|
269 |
+ "uri": "uri points to the source that will be built. The structure of the source will depend on the type of build to run", |
|
270 |
+ "ref": "ref is the branch/tag/ref to build.", |
|
271 |
+ "httpProxy": "httpProxy is a proxy used to reach the git repository over http", |
|
272 |
+ "httpsProxy": "httpsProxy is a proxy used to reach the git repository over https", |
|
273 | 273 |
} |
274 | 274 |
|
275 | 275 |
func (GitBuildSource) SwaggerDoc() map[string]string { |
... | ... |
@@ -286,10 +287,10 @@ func (GitInfo) SwaggerDoc() map[string]string { |
286 | 286 |
|
287 | 287 |
var map_GitSourceRevision = map[string]string{ |
288 | 288 |
"": "GitSourceRevision is the commit information from a git source for a build", |
289 |
- "commit": "Commit is the commit hash identifying a specific commit", |
|
290 |
- "author": "Author is the author of a specific commit", |
|
291 |
- "committer": "Committer is the committer of a specific commit", |
|
292 |
- "message": "Message is the description of a specific commit", |
|
289 |
+ "commit": "commit is the commit hash identifying a specific commit", |
|
290 |
+ "author": "author is the author of a specific commit", |
|
291 |
+ "committer": "committer is the committer of a specific commit", |
|
292 |
+ "message": "message is the description of a specific commit", |
|
293 | 293 |
} |
294 | 294 |
|
295 | 295 |
func (GitSourceRevision) SwaggerDoc() map[string]string { |
... | ... |
@@ -298,8 +299,8 @@ func (GitSourceRevision) SwaggerDoc() map[string]string { |
298 | 298 |
|
299 | 299 |
var map_ImageChangeTrigger = map[string]string{ |
300 | 300 |
"": "ImageChangeTrigger allows builds to be triggered when an ImageStream changes", |
301 |
- "lastTriggeredImageID": "LastTriggeredImageID is used internally by the ImageChangeController to save last used image ID for build", |
|
302 |
- "from": "From is a reference to an ImageStreamTag that will trigger a build when updated It is optional. If no From is specified, the From image from the build strategy will be used. Only one ImageChangeTrigger with an empty From reference is allowed in a build configuration.", |
|
301 |
+ "lastTriggeredImageID": "lastTriggeredImageID is used internally by the ImageChangeController to save last used image ID for build", |
|
302 |
+ "from": "from is a reference to an ImageStreamTag that will trigger a build when updated It is optional. If no From is specified, the From image from the build strategy will be used. Only one ImageChangeTrigger with an empty From reference is allowed in a build configuration.", |
|
303 | 303 |
} |
304 | 304 |
|
305 | 305 |
func (ImageChangeTrigger) SwaggerDoc() map[string]string { |
... | ... |
@@ -308,9 +309,9 @@ func (ImageChangeTrigger) SwaggerDoc() map[string]string { |
308 | 308 |
|
309 | 309 |
var map_ImageSource = map[string]string{ |
310 | 310 |
"": "ImageSource describes an image that is used as source for the build", |
311 |
- "from": "From is a reference to an ImageStreamTag, ImageStreamImage, or DockerImage to copy source from.", |
|
312 |
- "paths": "Paths is a list of source and destination paths to copy from the image.", |
|
313 |
- "pullSecret": "PullSecret is a reference to a secret to be used to pull the image from a registry If the image is pulled from the OpenShift registry, this field does not need to be set.", |
|
311 |
+ "from": "from is a reference to an ImageStreamTag, ImageStreamImage, or DockerImage to copy source from.", |
|
312 |
+ "paths": "paths is a list of source and destination paths to copy from the image.", |
|
313 |
+ "pullSecret": "pullSecret is a reference to a secret to be used to pull the image from a registry If the image is pulled from the OpenShift registry, this field does not need to be set.", |
|
314 | 314 |
} |
315 | 315 |
|
316 | 316 |
func (ImageSource) SwaggerDoc() map[string]string { |
... | ... |
@@ -319,8 +320,8 @@ func (ImageSource) SwaggerDoc() map[string]string { |
319 | 319 |
|
320 | 320 |
var map_ImageSourcePath = map[string]string{ |
321 | 321 |
"": "ImageSourcePath describes a path to be copied from a source image and its destination within the build directory.", |
322 |
- "sourcePath": "SourcePath is the absolute path of the file or directory inside the image to copy to the build directory.", |
|
323 |
- "destinationDir": "DestinationDir is the relative directory within the build directory where files copied from the image are placed.", |
|
322 |
+ "sourcePath": "sourcePath is the absolute path of the file or directory inside the image to copy to the build directory.", |
|
323 |
+ "destinationDir": "destinationDir is the relative directory within the build directory where files copied from the image are placed.", |
|
324 | 324 |
} |
325 | 325 |
|
326 | 326 |
func (ImageSourcePath) SwaggerDoc() map[string]string { |
... | ... |
@@ -329,8 +330,8 @@ func (ImageSourcePath) SwaggerDoc() map[string]string { |
329 | 329 |
|
330 | 330 |
var map_SecretBuildSource = map[string]string{ |
331 | 331 |
"": "SecretBuildSource describes a secret and its destination directory that will be used only at the build time. The content of the secret referenced here will be copied into the destination directory instead of mounting.", |
332 |
- "secret": "Secret is a reference to an existing secret that you want to use in your build.", |
|
333 |
- "destinationDir": "DestinationDir is the directory where the files from the secret should be available for the build time. For the Source build strategy, these will be injected into a container where the assemble script runs. Later, when the script finishes, all files injected will be truncated to zero length. For the Docker build strategy, these will be copied into the build directory, where the Dockerfile is located, so users can ADD or COPY them during docker build.", |
|
332 |
+ "secret": "secret is a reference to an existing secret that you want to use in your build.", |
|
333 |
+ "destinationDir": "destinationDir is the directory where the files from the secret should be available for the build time. For the Source build strategy, these will be injected into a container where the assemble script runs. Later, when the script finishes, all files injected will be truncated to zero length. For the Docker build strategy, these will be copied into the build directory, where the Dockerfile is located, so users can ADD or COPY them during docker build.", |
|
334 | 334 |
} |
335 | 335 |
|
336 | 336 |
func (SecretBuildSource) SwaggerDoc() map[string]string { |
... | ... |
@@ -339,8 +340,8 @@ func (SecretBuildSource) SwaggerDoc() map[string]string { |
339 | 339 |
|
340 | 340 |
var map_SecretSpec = map[string]string{ |
341 | 341 |
"": "SecretSpec specifies a secret to be included in a build pod and its corresponding mount point", |
342 |
- "secretSource": "SecretSource is a reference to the secret", |
|
343 |
- "mountPath": "MountPath is the path at which to mount the secret", |
|
342 |
+ "secretSource": "secretSource is a reference to the secret", |
|
343 |
+ "mountPath": "mountPath is the path at which to mount the secret", |
|
344 | 344 |
} |
345 | 345 |
|
346 | 346 |
func (SecretSpec) SwaggerDoc() map[string]string { |
... | ... |
@@ -349,12 +350,12 @@ func (SecretSpec) SwaggerDoc() map[string]string { |
349 | 349 |
|
350 | 350 |
var map_SourceBuildStrategy = map[string]string{ |
351 | 351 |
"": "SourceBuildStrategy defines input parameters specific to an Source build.", |
352 |
- "from": "From is reference to an DockerImage, ImageStreamTag, or ImageStreamImage from which the docker image should be pulled", |
|
353 |
- "pullSecret": "PullSecret is the name of a Secret that would be used for setting up the authentication for pulling the Docker images from the private Docker registries", |
|
354 |
- "env": "Env contains additional environment variables you want to pass into a builder container", |
|
355 |
- "scripts": "Scripts is the location of Source scripts", |
|
356 |
- "incremental": "Incremental flag forces the Source build to do incremental builds if true.", |
|
357 |
- "forcePull": "ForcePull describes if the builder should pull the images from registry prior to building.", |
|
352 |
+ "from": "from is reference to an DockerImage, ImageStreamTag, or ImageStreamImage from which the docker image should be pulled", |
|
353 |
+ "pullSecret": "pullSecret is the name of a Secret that would be used for setting up the authentication for pulling the Docker images from the private Docker registries", |
|
354 |
+ "env": "env contains additional environment variables you want to pass into a builder container", |
|
355 |
+ "scripts": "scripts is the location of Source scripts", |
|
356 |
+ "incremental": "incremental flag forces the Source build to do incremental builds if true.", |
|
357 |
+ "forcePull": "forcePull describes if the builder should pull the images from registry prior to building.", |
|
358 | 358 |
} |
359 | 359 |
|
360 | 360 |
func (SourceBuildStrategy) SwaggerDoc() map[string]string { |
... | ... |
@@ -363,8 +364,8 @@ func (SourceBuildStrategy) SwaggerDoc() map[string]string { |
363 | 363 |
|
364 | 364 |
var map_SourceControlUser = map[string]string{ |
365 | 365 |
"": "SourceControlUser defines the identity of a user of source control", |
366 |
- "name": "Name of the source control user", |
|
367 |
- "email": "Email of the source control user", |
|
366 |
+ "name": "name of the source control user", |
|
367 |
+ "email": "email of the source control user", |
|
368 | 368 |
} |
369 | 369 |
|
370 | 370 |
func (SourceControlUser) SwaggerDoc() map[string]string { |
... | ... |
@@ -373,7 +374,7 @@ func (SourceControlUser) SwaggerDoc() map[string]string { |
373 | 373 |
|
374 | 374 |
var map_SourceRevision = map[string]string{ |
375 | 375 |
"": "SourceRevision is the revision or commit information from the source for the build", |
376 |
- "type": "Type of the build source", |
|
376 |
+ "type": "type of the build source", |
|
377 | 377 |
"git": "Git contains information about git-based build source", |
378 | 378 |
} |
379 | 379 |
|
... | ... |
@@ -382,8 +383,9 @@ func (SourceRevision) SwaggerDoc() map[string]string { |
382 | 382 |
} |
383 | 383 |
|
384 | 384 |
var map_WebHookTrigger = map[string]string{ |
385 |
- "": "WebHookTrigger is a trigger that gets invoked using a webhook type of post", |
|
386 |
- "secret": "Secret used to validate requests.", |
|
385 |
+ "": "WebHookTrigger is a trigger that gets invoked using a webhook type of post", |
|
386 |
+ "secret": "secret used to validate requests.", |
|
387 |
+ "allowEnv": "allowEnv determines whether the webhook can set environment variables; can only be set to true for GenericWebHook.", |
|
387 | 388 |
} |
388 | 389 |
|
389 | 390 |
func (WebHookTrigger) SwaggerDoc() map[string]string { |
... | ... |
@@ -14,41 +14,41 @@ type Build struct { |
14 | 14 |
// Standard object's metadata. |
15 | 15 |
kapi.ObjectMeta `json:"metadata,omitempty"` |
16 | 16 |
|
17 |
- // Spec is all the inputs used to execute the build. |
|
17 |
+ // spec is all the inputs used to execute the build. |
|
18 | 18 |
Spec BuildSpec `json:"spec,omitempty"` |
19 | 19 |
|
20 |
- // Status is the current status of the build. |
|
20 |
+ // status is the current status of the build. |
|
21 | 21 |
Status BuildStatus `json:"status,omitempty"` |
22 | 22 |
} |
23 | 23 |
|
24 | 24 |
// BuildSpec encapsulates all the inputs necessary to represent a build. |
25 | 25 |
type BuildSpec struct { |
26 |
- // ServiceAccount is the name of the ServiceAccount to use to run the pod |
|
26 |
+ // serviceAccount is the name of the ServiceAccount to use to run the pod |
|
27 | 27 |
// created by this build. |
28 | 28 |
// The pod will be allowed to use secrets referenced by the ServiceAccount |
29 | 29 |
ServiceAccount string `json:"serviceAccount,omitempty"` |
30 | 30 |
|
31 |
- // Source describes the SCM in use. |
|
31 |
+ // source describes the SCM in use. |
|
32 | 32 |
Source BuildSource `json:"source,omitempty"` |
33 | 33 |
|
34 |
- // Revision is the information from the source for a specific repo snapshot. |
|
34 |
+ // revision is the information from the source for a specific repo snapshot. |
|
35 | 35 |
// This is optional. |
36 | 36 |
Revision *SourceRevision `json:"revision,omitempty"` |
37 | 37 |
|
38 |
- // Strategy defines how to perform a build. |
|
38 |
+ // strategy defines how to perform a build. |
|
39 | 39 |
Strategy BuildStrategy `json:"strategy"` |
40 | 40 |
|
41 |
- // Output describes the Docker image the Strategy should produce. |
|
41 |
+ // output describes the Docker image the Strategy should produce. |
|
42 | 42 |
Output BuildOutput `json:"output,omitempty"` |
43 | 43 |
|
44 |
- // Compute resource requirements to execute the build |
|
44 |
+ // resource requirements to execute the build |
|
45 | 45 |
Resources kapi.ResourceRequirements `json:"resources,omitempty"` |
46 | 46 |
|
47 |
- // PostCommit is a build hook executed after the build output image is |
|
47 |
+ // postCommit is a build hook executed after the build output image is |
|
48 | 48 |
// committed, before it is pushed to a registry. |
49 | 49 |
PostCommit BuildPostCommitSpec `json:"postCommit,omitempty"` |
50 | 50 |
|
51 |
- // Optional duration in seconds, counted from the time when a build pod gets |
|
51 |
+ // completionDeadlineSeconds is an optional duration in seconds, counted from the time when a build pod gets |
|
52 | 52 |
// scheduled in the system, that the build may be active on a node before the |
53 | 53 |
// system actively tries to terminate the build; value must be positive integer |
54 | 54 |
CompletionDeadlineSeconds *int64 `json:"completionDeadlineSeconds,omitempty"` |
... | ... |
@@ -56,39 +56,39 @@ type BuildSpec struct { |
56 | 56 |
|
57 | 57 |
// BuildStatus contains the status of a build |
58 | 58 |
type BuildStatus struct { |
59 |
- // Phase is the point in the build lifecycle. |
|
59 |
+ // phase is the point in the build lifecycle. |
|
60 | 60 |
Phase BuildPhase `json:"phase"` |
61 | 61 |
|
62 |
- // Cancelled describes if a cancel event was triggered for the build. |
|
62 |
+ // cancelled describes if a cancel event was triggered for the build. |
|
63 | 63 |
Cancelled bool `json:"cancelled,omitempty"` |
64 | 64 |
|
65 |
- // Reason is a brief CamelCase string that describes any failure and is meant for machine parsing and tidy display in the CLI. |
|
65 |
+ // reason is a brief CamelCase string that describes any failure and is meant for machine parsing and tidy display in the CLI. |
|
66 | 66 |
Reason StatusReason `json:"reason,omitempty"` |
67 | 67 |
|
68 |
- // Message is a human-readable message indicating details about why the build has this status. |
|
68 |
+ // message is a human-readable message indicating details about why the build has this status. |
|
69 | 69 |
Message string `json:"message,omitempty"` |
70 | 70 |
|
71 |
- // StartTimestamp is a timestamp representing the server time when this Build started |
|
71 |
+ // startTimestamp is a timestamp representing the server time when this Build started |
|
72 | 72 |
// running in a Pod. |
73 | 73 |
// It is represented in RFC3339 form and is in UTC. |
74 | 74 |
StartTimestamp *unversioned.Time `json:"startTimestamp,omitempty"` |
75 | 75 |
|
76 |
- // CompletionTimestamp is a timestamp representing the server time when this Build was |
|
76 |
+ // completionTimestamp is a timestamp representing the server time when this Build was |
|
77 | 77 |
// finished, whether that build failed or succeeded. It reflects the time at which |
78 | 78 |
// the Pod running the Build terminated. |
79 | 79 |
// It is represented in RFC3339 form and is in UTC. |
80 | 80 |
CompletionTimestamp *unversioned.Time `json:"completionTimestamp,omitempty"` |
81 | 81 |
|
82 |
- // Duration contains time.Duration object describing build time. |
|
82 |
+ // duration contains time.Duration object describing build time. |
|
83 | 83 |
Duration time.Duration `json:"duration,omitempty"` |
84 | 84 |
|
85 |
- // OutputDockerImageReference contains a reference to the Docker image that |
|
85 |
+ // outputDockerImageReference contains a reference to the Docker image that |
|
86 | 86 |
// will be built by this build. Its value is computed from |
87 | 87 |
// Build.Spec.Output.To, and should include the registry address, so that |
88 | 88 |
// it can be used to push and pull the image. |
89 | 89 |
OutputDockerImageReference string `json:"outputDockerImageReference,omitempty"` |
90 | 90 |
|
91 |
- // Config is an ObjectReference to the BuildConfig this Build is based on. |
|
91 |
+ // config is an ObjectReference to the BuildConfig this Build is based on. |
|
92 | 92 |
Config *kapi.ObjectReference `json:"config,omitempty"` |
93 | 93 |
} |
94 | 94 |
|
... | ... |
@@ -144,10 +144,10 @@ const ( |
144 | 144 |
|
145 | 145 |
// BuildSource is the SCM used for the build. |
146 | 146 |
type BuildSource struct { |
147 |
- // Type of build input to accept |
|
147 |
+ // type of build input to accept |
|
148 | 148 |
Type BuildSourceType `json:"type"` |
149 | 149 |
|
150 |
- // Binary builds accept a binary as their input. The binary is generally assumed to be a tar, |
|
150 |
+ // binary builds accept a binary as their input. The binary is generally assumed to be a tar, |
|
151 | 151 |
// gzipped tar, or zip file depending on the strategy. For Docker builds, this is the build |
152 | 152 |
// context and an optional Dockerfile may be specified to override any Dockerfile in the |
153 | 153 |
// build context. For Source builds, this is assumed to be an archive as described above. For |
... | ... |
@@ -156,7 +156,7 @@ type BuildSource struct { |
156 | 156 |
// receive this binary as input on STDIN. |
157 | 157 |
Binary *BinaryBuildSource `json:"binary,omitempty"` |
158 | 158 |
|
159 |
- // Dockerfile is the raw contents of a Dockerfile which should be built. When this option is |
|
159 |
+ // dockerfile is the raw contents of a Dockerfile which should be built. When this option is |
|
160 | 160 |
// specified, the FROM may be modified based on your strategy base image and additional ENV |
161 | 161 |
// stanzas from your strategy environment will be added after the FROM, but before the rest |
162 | 162 |
// of your Dockerfile stanzas. The Dockerfile source type may be used with other options like |
... | ... |
@@ -164,50 +164,50 @@ type BuildSource struct { |
164 | 164 |
// dir. |
165 | 165 |
Dockerfile *string `json:"dockerfile,omitempty"` |
166 | 166 |
|
167 |
- // Git contains optional information about git build source |
|
167 |
+ // git contains optional information about git build source |
|
168 | 168 |
Git *GitBuildSource `json:"git,omitempty"` |
169 | 169 |
|
170 |
- // Images describes a set of images to be used to provide source for the build |
|
170 |
+ // images describes a set of images to be used to provide source for the build |
|
171 | 171 |
Images []ImageSource `json:"images,omitempty"` |
172 | 172 |
|
173 |
- // ContextDir specifies the sub-directory where the source code for the application exists. |
|
173 |
+ // contextDir specifies the sub-directory where the source code for the application exists. |
|
174 | 174 |
// This allows to have buildable sources in directory other than root of |
175 | 175 |
// repository. |
176 | 176 |
ContextDir string `json:"contextDir,omitempty"` |
177 | 177 |
|
178 |
- // SourceSecret is the name of a Secret that would be used for setting |
|
178 |
+ // sourceSecret is the name of a Secret that would be used for setting |
|
179 | 179 |
// up the authentication for cloning private repository. |
180 | 180 |
// The secret contains valid credentials for remote repository, where the |
181 | 181 |
// data's key represent the authentication method to be used and value is |
182 | 182 |
// the base64 encoded credentials. Supported auth methods are: ssh-privatekey. |
183 | 183 |
SourceSecret *kapi.LocalObjectReference `json:"sourceSecret,omitempty"` |
184 | 184 |
|
185 |
- // Secrets represents a list of secrets and their destinations that will |
|
185 |
+ // secrets represents a list of secrets and their destinations that will |
|
186 | 186 |
// be used only for the build. |
187 | 187 |
Secrets []SecretBuildSource `json:"secrets"` |
188 | 188 |
} |
189 | 189 |
|
190 | 190 |
// ImageSource describes an image that is used as source for the build |
191 | 191 |
type ImageSource struct { |
192 |
- // From is a reference to an ImageStreamTag, ImageStreamImage, or DockerImage to |
|
192 |
+ // from is a reference to an ImageStreamTag, ImageStreamImage, or DockerImage to |
|
193 | 193 |
// copy source from. |
194 | 194 |
From kapi.ObjectReference `json:"from"` |
195 | 195 |
|
196 |
- // Paths is a list of source and destination paths to copy from the image. |
|
196 |
+ // paths is a list of source and destination paths to copy from the image. |
|
197 | 197 |
Paths []ImageSourcePath `json:"paths"` |
198 | 198 |
|
199 |
- // PullSecret is a reference to a secret to be used to pull the image from a registry |
|
199 |
+ // pullSecret is a reference to a secret to be used to pull the image from a registry |
|
200 | 200 |
// If the image is pulled from the OpenShift registry, this field does not need to be set. |
201 | 201 |
PullSecret *kapi.LocalObjectReference `json:"pullSecret,omitempty"` |
202 | 202 |
} |
203 | 203 |
|
204 | 204 |
// ImageSourcePath describes a path to be copied from a source image and its destination within the build directory. |
205 | 205 |
type ImageSourcePath struct { |
206 |
- // SourcePath is the absolute path of the file or directory inside the image to |
|
206 |
+ // sourcePath is the absolute path of the file or directory inside the image to |
|
207 | 207 |
// copy to the build directory. |
208 | 208 |
SourcePath string `json:"sourcePath"` |
209 | 209 |
|
210 |
- // DestinationDir is the relative directory within the build directory |
|
210 |
+ // destinationDir is the relative directory within the build directory |
|
211 | 211 |
// where files copied from the image are placed. |
212 | 212 |
DestinationDir string `json:"destinationDir"` |
213 | 213 |
} |
... | ... |
@@ -216,11 +216,11 @@ type ImageSourcePath struct { |
216 | 216 |
// used only at the build time. The content of the secret referenced here will |
217 | 217 |
// be copied into the destination directory instead of mounting. |
218 | 218 |
type SecretBuildSource struct { |
219 |
- // Secret is a reference to an existing secret that you want to use in your |
|
219 |
+ // secret is a reference to an existing secret that you want to use in your |
|
220 | 220 |
// build. |
221 | 221 |
Secret kapi.LocalObjectReference `json:"secret"` |
222 | 222 |
|
223 |
- // DestinationDir is the directory where the files from the secret should be |
|
223 |
+ // destinationDir is the directory where the files from the secret should be |
|
224 | 224 |
// available for the build time. |
225 | 225 |
// For the Source build strategy, these will be injected into a container |
226 | 226 |
// where the assemble script runs. Later, when the script finishes, all files |
... | ... |
@@ -234,7 +234,7 @@ type SecretBuildSource struct { |
234 | 234 |
// BinaryBuildSource describes a binary file to be used for the Docker and Source build strategies, |
235 | 235 |
// where the file will be extracted and used as the build source. |
236 | 236 |
type BinaryBuildSource struct { |
237 |
- // AsFile indicates that the provided binary input should be considered a single file |
|
237 |
+ // asFile indicates that the provided binary input should be considered a single file |
|
238 | 238 |
// within the build input. For example, specifying "webapp.war" would place the provided |
239 | 239 |
// binary as `/webapp.war` for the builder. If left empty, the Docker and Source build |
240 | 240 |
// strategies assume this file is a zip, tar, or tar.gz file and extract it as the source. |
... | ... |
@@ -245,7 +245,7 @@ type BinaryBuildSource struct { |
245 | 245 |
|
246 | 246 |
// SourceRevision is the revision or commit information from the source for the build |
247 | 247 |
type SourceRevision struct { |
248 |
- // Type of the build source |
|
248 |
+ // type of the build source |
|
249 | 249 |
Type BuildSourceType `json:"type"` |
250 | 250 |
|
251 | 251 |
// Git contains information about git-based build source |
... | ... |
@@ -254,56 +254,56 @@ type SourceRevision struct { |
254 | 254 |
|
255 | 255 |
// GitSourceRevision is the commit information from a git source for a build |
256 | 256 |
type GitSourceRevision struct { |
257 |
- // Commit is the commit hash identifying a specific commit |
|
257 |
+ // commit is the commit hash identifying a specific commit |
|
258 | 258 |
Commit string `json:"commit,omitempty"` |
259 | 259 |
|
260 |
- // Author is the author of a specific commit |
|
260 |
+ // author is the author of a specific commit |
|
261 | 261 |
Author SourceControlUser `json:"author,omitempty"` |
262 | 262 |
|
263 |
- // Committer is the committer of a specific commit |
|
263 |
+ // committer is the committer of a specific commit |
|
264 | 264 |
Committer SourceControlUser `json:"committer,omitempty"` |
265 | 265 |
|
266 |
- // Message is the description of a specific commit |
|
266 |
+ // message is the description of a specific commit |
|
267 | 267 |
Message string `json:"message,omitempty"` |
268 | 268 |
} |
269 | 269 |
|
270 | 270 |
// GitBuildSource defines the parameters of a Git SCM |
271 | 271 |
type GitBuildSource struct { |
272 |
- // URI points to the source that will be built. The structure of the source |
|
272 |
+ // uri points to the source that will be built. The structure of the source |
|
273 | 273 |
// will depend on the type of build to run |
274 | 274 |
URI string `json:"uri"` |
275 | 275 |
|
276 |
- // Ref is the branch/tag/ref to build. |
|
276 |
+ // ref is the branch/tag/ref to build. |
|
277 | 277 |
Ref string `json:"ref,omitempty"` |
278 | 278 |
|
279 |
- // HTTPProxy is a proxy used to reach the git repository over http |
|
279 |
+ // httpProxy is a proxy used to reach the git repository over http |
|
280 | 280 |
HTTPProxy *string `json:"httpProxy,omitempty"` |
281 | 281 |
|
282 |
- // HTTPSProxy is a proxy used to reach the git repository over https |
|
282 |
+ // httpsProxy is a proxy used to reach the git repository over https |
|
283 | 283 |
HTTPSProxy *string `json:"httpsProxy,omitempty"` |
284 | 284 |
} |
285 | 285 |
|
286 | 286 |
// SourceControlUser defines the identity of a user of source control |
287 | 287 |
type SourceControlUser struct { |
288 |
- // Name of the source control user |
|
288 |
+ // name of the source control user |
|
289 | 289 |
Name string `json:"name,omitempty"` |
290 | 290 |
|
291 |
- // Email of the source control user |
|
291 |
+ // email of the source control user |
|
292 | 292 |
Email string `json:"email,omitempty"` |
293 | 293 |
} |
294 | 294 |
|
295 | 295 |
// BuildStrategy contains the details of how to perform a build. |
296 | 296 |
type BuildStrategy struct { |
297 |
- // Type is the kind of build strategy. |
|
297 |
+ // type is the kind of build strategy. |
|
298 | 298 |
Type BuildStrategyType `json:"type"` |
299 | 299 |
|
300 |
- // DockerStrategy holds the parameters to the Docker build strategy. |
|
300 |
+ // dockerStrategy holds the parameters to the Docker build strategy. |
|
301 | 301 |
DockerStrategy *DockerBuildStrategy `json:"dockerStrategy,omitempty"` |
302 | 302 |
|
303 |
- // SourceStrategy holds the parameters to the Source build strategy. |
|
303 |
+ // sourceStrategy holds the parameters to the Source build strategy. |
|
304 | 304 |
SourceStrategy *SourceBuildStrategy `json:"sourceStrategy,omitempty"` |
305 | 305 |
|
306 |
- // CustomStrategy holds the parameters to the Custom build strategy |
|
306 |
+ // customStrategy holds the parameters to the Custom build strategy |
|
307 | 307 |
CustomStrategy *CustomBuildStrategy `json:"customStrategy,omitempty"` |
308 | 308 |
} |
309 | 309 |
|
... | ... |
@@ -325,82 +325,82 @@ const ( |
325 | 325 |
|
326 | 326 |
// CustomBuildStrategy defines input parameters specific to Custom build. |
327 | 327 |
type CustomBuildStrategy struct { |
328 |
- // From is reference to an DockerImage, ImageStreamTag, or ImageStreamImage from which |
|
328 |
+ // from is reference to an DockerImage, ImageStreamTag, or ImageStreamImage from which |
|
329 | 329 |
// the docker image should be pulled |
330 | 330 |
From kapi.ObjectReference `json:"from"` |
331 | 331 |
|
332 |
- // PullSecret is the name of a Secret that would be used for setting up |
|
332 |
+ // pullSecret is the name of a Secret that would be used for setting up |
|
333 | 333 |
// the authentication for pulling the Docker images from the private Docker |
334 | 334 |
// registries |
335 | 335 |
PullSecret *kapi.LocalObjectReference `json:"pullSecret,omitempty"` |
336 | 336 |
|
337 |
- // Env contains additional environment variables you want to pass into a builder container |
|
337 |
+ // env contains additional environment variables you want to pass into a builder container |
|
338 | 338 |
Env []kapi.EnvVar `json:"env,omitempty"` |
339 | 339 |
|
340 |
- // ExposeDockerSocket will allow running Docker commands (and build Docker images) from |
|
340 |
+ // exposeDockerSocket will allow running Docker commands (and build Docker images) from |
|
341 | 341 |
// inside the Docker container. |
342 | 342 |
// TODO: Allow admins to enforce 'false' for this option |
343 | 343 |
ExposeDockerSocket bool `json:"exposeDockerSocket,omitempty"` |
344 | 344 |
|
345 |
- // ForcePull describes if the controller should configure the build pod to always pull the images |
|
345 |
+ // forcePull describes if the controller should configure the build pod to always pull the images |
|
346 | 346 |
// for the builder or only pull if it is not present locally |
347 | 347 |
ForcePull bool `json:"forcePull,omitempty"` |
348 | 348 |
|
349 |
- // Secrets is a list of additional secrets that will be included in the build pod |
|
349 |
+ // secrets is a list of additional secrets that will be included in the build pod |
|
350 | 350 |
Secrets []SecretSpec `json:"secrets,omitempty"` |
351 | 351 |
|
352 |
- // BuildAPIVersion is the requested API version for the Build object serialized and passed to the custom builder |
|
352 |
+ // buildAPIVersion is the requested API version for the Build object serialized and passed to the custom builder |
|
353 | 353 |
BuildAPIVersion string `json:"buildAPIVersion,omitempty"` |
354 | 354 |
} |
355 | 355 |
|
356 | 356 |
// DockerBuildStrategy defines input parameters specific to Docker build. |
357 | 357 |
type DockerBuildStrategy struct { |
358 |
- // From is reference to an DockerImage, ImageStreamTag, or ImageStreamImage from which |
|
358 |
+ // from is reference to an DockerImage, ImageStreamTag, or ImageStreamImage from which |
|
359 | 359 |
// the docker image should be pulled |
360 | 360 |
// the resulting image will be used in the FROM line of the Dockerfile for this build. |
361 | 361 |
From *kapi.ObjectReference `json:"from,omitempty"` |
362 | 362 |
|
363 |
- // PullSecret is the name of a Secret that would be used for setting up |
|
363 |
+ // pullSecret is the name of a Secret that would be used for setting up |
|
364 | 364 |
// the authentication for pulling the Docker images from the private Docker |
365 | 365 |
// registries |
366 | 366 |
PullSecret *kapi.LocalObjectReference `json:"pullSecret,omitempty"` |
367 | 367 |
|
368 |
- // NoCache if set to true indicates that the docker build must be executed with the |
|
368 |
+ // noCache if set to true indicates that the docker build must be executed with the |
|
369 | 369 |
// --no-cache=true flag |
370 | 370 |
NoCache bool `json:"noCache,omitempty"` |
371 | 371 |
|
372 |
- // Env contains additional environment variables you want to pass into a builder container |
|
372 |
+ // env contains additional environment variables you want to pass into a builder container |
|
373 | 373 |
Env []kapi.EnvVar `json:"env,omitempty"` |
374 | 374 |
|
375 |
- // ForcePull describes if the builder should pull the images from registry prior to building. |
|
375 |
+ // forcePull describes if the builder should pull the images from registry prior to building. |
|
376 | 376 |
ForcePull bool `json:"forcePull,omitempty"` |
377 | 377 |
|
378 |
- // DockerfilePath is the path of the Dockerfile that will be used to build the Docker image, |
|
378 |
+ // dockerfilePath is the path of the Dockerfile that will be used to build the Docker image, |
|
379 | 379 |
// relative to the root of the context (contextDir). |
380 | 380 |
DockerfilePath string `json:"dockerfilePath,omitempty"` |
381 | 381 |
} |
382 | 382 |
|
383 | 383 |
// SourceBuildStrategy defines input parameters specific to an Source build. |
384 | 384 |
type SourceBuildStrategy struct { |
385 |
- // From is reference to an DockerImage, ImageStreamTag, or ImageStreamImage from which |
|
385 |
+ // from is reference to an DockerImage, ImageStreamTag, or ImageStreamImage from which |
|
386 | 386 |
// the docker image should be pulled |
387 | 387 |
From kapi.ObjectReference `json:"from"` |
388 | 388 |
|
389 |
- // PullSecret is the name of a Secret that would be used for setting up |
|
389 |
+ // pullSecret is the name of a Secret that would be used for setting up |
|
390 | 390 |
// the authentication for pulling the Docker images from the private Docker |
391 | 391 |
// registries |
392 | 392 |
PullSecret *kapi.LocalObjectReference `json:"pullSecret,omitempty"` |
393 | 393 |
|
394 |
- // Env contains additional environment variables you want to pass into a builder container |
|
394 |
+ // env contains additional environment variables you want to pass into a builder container |
|
395 | 395 |
Env []kapi.EnvVar `json:"env,omitempty"` |
396 | 396 |
|
397 |
- // Scripts is the location of Source scripts |
|
397 |
+ // scripts is the location of Source scripts |
|
398 | 398 |
Scripts string `json:"scripts,omitempty"` |
399 | 399 |
|
400 |
- // Incremental flag forces the Source build to do incremental builds if true. |
|
400 |
+ // incremental flag forces the Source build to do incremental builds if true. |
|
401 | 401 |
Incremental bool `json:"incremental,omitempty"` |
402 | 402 |
|
403 |
- // ForcePull describes if the builder should pull the images from registry prior to building. |
|
403 |
+ // forcePull describes if the builder should pull the images from registry prior to building. |
|
404 | 404 |
ForcePull bool `json:"forcePull,omitempty"` |
405 | 405 |
} |
406 | 406 |
|
... | ... |
@@ -470,16 +470,16 @@ type SourceBuildStrategy struct { |
470 | 470 |
// It is invalid to provide both Script and Command simultaneously. If none of |
471 | 471 |
// the fields are specified, the hook is not executed. |
472 | 472 |
type BuildPostCommitSpec struct { |
473 |
- // Command is the command to run. It may not be specified with Script. |
|
473 |
+ // command is the command to run. It may not be specified with Script. |
|
474 | 474 |
// This might be needed if the image doesn't have `/bin/sh`, or if you |
475 | 475 |
// do not want to use a shell. In all other cases, using Script might be |
476 | 476 |
// more convenient. |
477 | 477 |
Command []string `json:"command,omitempty"` |
478 |
- // Args is a list of arguments that are provided to either Command, |
|
478 |
+ // args is a list of arguments that are provided to either Command, |
|
479 | 479 |
// Script or the Docker image's default entrypoint. The arguments are |
480 | 480 |
// placed immediately after the command to be run. |
481 | 481 |
Args []string `json:"args,omitempty"` |
482 |
- // Script is a shell script to be run with `/bin/sh -ic`. It may not be |
|
482 |
+ // script is a shell script to be run with `/bin/sh -ic`. It may not be |
|
483 | 483 |
// specified with Command. Use Script when a shell script is appropriate |
484 | 484 |
// to execute the post build hook, for example for running unit tests |
485 | 485 |
// with `rake test`. If you need control over the image entrypoint, or |
... | ... |
@@ -495,7 +495,7 @@ type BuildPostCommitSpec struct { |
495 | 495 |
// BuildOutput is input to a build strategy and describes the Docker image that the strategy |
496 | 496 |
// should produce. |
497 | 497 |
type BuildOutput struct { |
498 |
- // To defines an optional location to push the output of this build to. |
|
498 |
+ // to defines an optional location to push the output of this build to. |
|
499 | 499 |
// Kind must be one of 'ImageStreamTag' or 'DockerImage'. |
500 | 500 |
// This value will be used to look up a Docker image repository to push to. |
501 | 501 |
// In the case of an ImageStreamTag, the ImageStreamTag will be looked for in the namespace of |
... | ... |
@@ -511,19 +511,19 @@ type BuildOutput struct { |
511 | 511 |
// BuildConfig is a template which can be used to create new builds. |
512 | 512 |
type BuildConfig struct { |
513 | 513 |
unversioned.TypeMeta `json:",inline"` |
514 |
- // Standard object's metadata. |
|
514 |
+ // metadata for BuildConfig. |
|
515 | 515 |
kapi.ObjectMeta `json:"metadata,omitempty"` |
516 | 516 |
|
517 |
- // Spec holds all the input necessary to produce a new build, and the conditions when |
|
517 |
+ // spec holds all the input necessary to produce a new build, and the conditions when |
|
518 | 518 |
// to trigger them. |
519 | 519 |
Spec BuildConfigSpec `json:"spec"` |
520 |
- // Status holds any relevant information about a build config |
|
520 |
+ // status holds any relevant information about a build config |
|
521 | 521 |
Status BuildConfigStatus `json:"status"` |
522 | 522 |
} |
523 | 523 |
|
524 | 524 |
// BuildConfigSpec describes when and how builds are created |
525 | 525 |
type BuildConfigSpec struct { |
526 |
- // Triggers determine how new Builds can be launched from a BuildConfig. If no triggers |
|
526 |
+ // triggers determine how new Builds can be launched from a BuildConfig. If no triggers |
|
527 | 527 |
// are defined, a new build can only occur as a result of an explicit client build creation. |
528 | 528 |
Triggers []BuildTriggerPolicy `json:"triggers"` |
529 | 529 |
|
... | ... |
@@ -533,23 +533,27 @@ type BuildConfigSpec struct { |
533 | 533 |
|
534 | 534 |
// BuildConfigStatus contains current state of the build config object. |
535 | 535 |
type BuildConfigStatus struct { |
536 |
- // LastVersion is used to inform about number of last triggered build. |
|
536 |
+ // lastVersion is used to inform about number of last triggered build. |
|
537 | 537 |
LastVersion int `json:"lastVersion"` |
538 | 538 |
} |
539 | 539 |
|
540 | 540 |
// WebHookTrigger is a trigger that gets invoked using a webhook type of post |
541 | 541 |
type WebHookTrigger struct { |
542 |
- // Secret used to validate requests. |
|
542 |
+ // secret used to validate requests. |
|
543 | 543 |
Secret string `json:"secret,omitempty"` |
544 |
+ |
|
545 |
+ // allowEnv determines whether the webhook can set environment variables; can only |
|
546 |
+ // be set to true for GenericWebHook. |
|
547 |
+ AllowEnv bool `json:"allowEnv,omitempty"` |
|
544 | 548 |
} |
545 | 549 |
|
546 | 550 |
// ImageChangeTrigger allows builds to be triggered when an ImageStream changes |
547 | 551 |
type ImageChangeTrigger struct { |
548 |
- // LastTriggeredImageID is used internally by the ImageChangeController to save last |
|
552 |
+ // lastTriggeredImageID is used internally by the ImageChangeController to save last |
|
549 | 553 |
// used image ID for build |
550 | 554 |
LastTriggeredImageID string `json:"lastTriggeredImageID,omitempty"` |
551 | 555 |
|
552 |
- // From is a reference to an ImageStreamTag that will trigger a build when updated |
|
556 |
+ // from is a reference to an ImageStreamTag that will trigger a build when updated |
|
553 | 557 |
// It is optional. If no From is specified, the From image from the build strategy |
554 | 558 |
// will be used. Only one ImageChangeTrigger with an empty From reference is allowed in |
555 | 559 |
// a build configuration. |
... | ... |
@@ -558,16 +562,16 @@ type ImageChangeTrigger struct { |
558 | 558 |
|
559 | 559 |
// BuildTriggerPolicy describes a policy for a single trigger that results in a new Build. |
560 | 560 |
type BuildTriggerPolicy struct { |
561 |
- // Type is the type of build trigger |
|
561 |
+ // type is the type of build trigger |
|
562 | 562 |
Type BuildTriggerType `json:"type"` |
563 | 563 |
|
564 |
- // GitHubWebHook contains the parameters for a GitHub webhook type of trigger |
|
564 |
+ // github contains the parameters for a GitHub webhook type of trigger |
|
565 | 565 |
GitHubWebHook *WebHookTrigger `json:"github,omitempty"` |
566 | 566 |
|
567 |
- // GenericWebHook contains the parameters for a Generic webhook type of trigger |
|
567 |
+ // generic contains the parameters for a Generic webhook type of trigger |
|
568 | 568 |
GenericWebHook *WebHookTrigger `json:"generic,omitempty"` |
569 | 569 |
|
570 |
- // ImageChange contains parameters for an ImageChange type of trigger |
|
570 |
+ // imageChange contains parameters for an ImageChange type of trigger |
|
571 | 571 |
ImageChange *ImageChangeTrigger `json:"imageChange,omitempty"` |
572 | 572 |
} |
573 | 573 |
|
... | ... |
@@ -598,30 +602,33 @@ const ( |
598 | 598 |
// BuildList is a collection of Builds. |
599 | 599 |
type BuildList struct { |
600 | 600 |
unversioned.TypeMeta `json:",inline"` |
601 |
- // Standard object's metadata. |
|
601 |
+ // metadata for BuildList. |
|
602 | 602 |
unversioned.ListMeta `json:"metadata,omitempty"` |
603 | 603 |
|
604 |
- // Items is a list of builds |
|
604 |
+ // items is a list of builds |
|
605 | 605 |
Items []Build `json:"items"` |
606 | 606 |
} |
607 | 607 |
|
608 | 608 |
// BuildConfigList is a collection of BuildConfigs. |
609 | 609 |
type BuildConfigList struct { |
610 | 610 |
unversioned.TypeMeta `json:",inline"` |
611 |
- // Standard object's metadata. |
|
611 |
+ // metadata for BuildConfigList. |
|
612 | 612 |
unversioned.ListMeta `json:"metadata,omitempty"` |
613 | 613 |
|
614 |
- // Items is a list of build configs |
|
614 |
+ // items is a list of build configs |
|
615 | 615 |
Items []BuildConfig `json:"items"` |
616 | 616 |
} |
617 | 617 |
|
618 | 618 |
// GenericWebHookEvent is the payload expected for a generic webhook post |
619 | 619 |
type GenericWebHookEvent struct { |
620 |
- // Type is the type of source repository |
|
620 |
+ // type is the type of source repository |
|
621 | 621 |
Type BuildSourceType `json:"type,omitempty"` |
622 | 622 |
|
623 |
- // Git is the git information if the Type is BuildSourceGit |
|
623 |
+ // git is the git information if the Type is BuildSourceGit |
|
624 | 624 |
Git *GitInfo `json:"git,omitempty"` |
625 |
+ |
|
626 |
+ // env contains additional environment variables you want to pass into a builder container |
|
627 |
+ Env []kapi.EnvVar `json:"env,omitempty"` |
|
625 | 628 |
} |
626 | 629 |
|
627 | 630 |
// GitInfo is the aggregated git information for a generic webhook post |
... | ... |
@@ -638,57 +645,57 @@ type BuildLog struct { |
638 | 638 |
// BuildRequest is the resource used to pass parameters to build generator |
639 | 639 |
type BuildRequest struct { |
640 | 640 |
unversioned.TypeMeta `json:",inline"` |
641 |
- // Standard object's metadata. |
|
641 |
+ // metadata for BuildRequest. |
|
642 | 642 |
kapi.ObjectMeta `json:"metadata,omitempty"` |
643 | 643 |
|
644 |
- // Revision is the information from the source for a specific repo snapshot. |
|
644 |
+ // revision is the information from the source for a specific repo snapshot. |
|
645 | 645 |
Revision *SourceRevision `json:"revision,omitempty"` |
646 | 646 |
|
647 |
- // TriggeredByImage is the Image that triggered this build. |
|
647 |
+ // triggeredByImage is the Image that triggered this build. |
|
648 | 648 |
TriggeredByImage *kapi.ObjectReference `json:"triggeredByImage,omitempty"` |
649 | 649 |
|
650 |
- // From is the reference to the ImageStreamTag that triggered the build. |
|
650 |
+ // from is the reference to the ImageStreamTag that triggered the build. |
|
651 | 651 |
From *kapi.ObjectReference `json:"from,omitempty"` |
652 | 652 |
|
653 |
- // Binary indicates a request to build from a binary provided to the builder |
|
653 |
+ // binary indicates a request to build from a binary provided to the builder |
|
654 | 654 |
Binary *BinaryBuildSource `json:"binary,omitempty"` |
655 | 655 |
|
656 |
- // LastVersion (optional) is the LastVersion of the BuildConfig that was used |
|
656 |
+ // lastVersion (optional) is the LastVersion of the BuildConfig that was used |
|
657 | 657 |
// to generate the build. If the BuildConfig in the generator doesn't match, a build will |
658 | 658 |
// not be generated. |
659 | 659 |
LastVersion *int `json:"lastVersion,omitempty"` |
660 | 660 |
|
661 |
- // Env contains additional environment variables you want to pass into a builder container |
|
661 |
+ // env contains additional environment variables you want to pass into a builder container |
|
662 | 662 |
Env []kapi.EnvVar `json:"env,omitempty"` |
663 | 663 |
} |
664 | 664 |
|
665 | 665 |
// BinaryBuildRequestOptions are the options required to fully speficy a binary build request |
666 | 666 |
type BinaryBuildRequestOptions struct { |
667 | 667 |
unversioned.TypeMeta `json:",inline"` |
668 |
- // Standard object's metadata. |
|
668 |
+ // metadata for BinaryBuildRequestOptions. |
|
669 | 669 |
kapi.ObjectMeta `json:"metadata,omitempty"` |
670 | 670 |
|
671 |
- // AsFile determines if the binary should be created as a file within the source rather than extracted as an archive |
|
671 |
+ // asFile determines if the binary should be created as a file within the source rather than extracted as an archive |
|
672 | 672 |
AsFile string `json:"asFile,omitempty"` |
673 | 673 |
|
674 | 674 |
// TODO: Improve map[string][]string conversion so we can handled nested objects |
675 | 675 |
|
676 |
- // Commit is the value identifying a specific commit |
|
676 |
+ // revision.commit is the value identifying a specific commit |
|
677 | 677 |
Commit string `json:"revision.commit,omitempty"` |
678 | 678 |
|
679 |
- // Message is the description of a specific commit |
|
679 |
+ // revision.message is the description of a specific commit |
|
680 | 680 |
Message string `json:"revision.message,omitempty"` |
681 | 681 |
|
682 |
- // AuthorName of the source control user |
|
682 |
+ // revision.authorName of the source control user |
|
683 | 683 |
AuthorName string `json:"revision.authorName,omitempty"` |
684 | 684 |
|
685 |
- // AuthorEmail of the source control user |
|
685 |
+ // revision.authorEmail of the source control user |
|
686 | 686 |
AuthorEmail string `json:"revision.authorEmail,omitempty"` |
687 | 687 |
|
688 |
- // CommitterName of the source control user |
|
688 |
+ // revision.committerName of the source control user |
|
689 | 689 |
CommitterName string `json:"revision.committerName,omitempty"` |
690 | 690 |
|
691 |
- // CommitterEmail of the source control user |
|
691 |
+ // revision.committerEmail of the source control user |
|
692 | 692 |
CommitterEmail string `json:"revision.committerEmail,omitempty"` |
693 | 693 |
} |
694 | 694 |
|
... | ... |
@@ -696,48 +703,48 @@ type BinaryBuildRequestOptions struct { |
696 | 696 |
type BuildLogOptions struct { |
697 | 697 |
unversioned.TypeMeta `json:",inline"` |
698 | 698 |
|
699 |
- // The container for which to stream logs. Defaults to only container if there is one container in the pod. |
|
699 |
+ // cointainer for which to stream logs. Defaults to only container if there is one container in the pod. |
|
700 | 700 |
Container string `json:"container,omitempty"` |
701 |
- // Follow if true indicates that the build log should be streamed until |
|
701 |
+ // follow if true indicates that the build log should be streamed until |
|
702 | 702 |
// the build terminates. |
703 | 703 |
Follow bool `json:"follow,omitempty"` |
704 |
- // Return previous build logs. Defaults to false. |
|
704 |
+ // previous returns previous build logs. Defaults to false. |
|
705 | 705 |
Previous bool `json:"previous,omitempty"` |
706 |
- // A relative time in seconds before the current time from which to show logs. If this value |
|
706 |
+ // sinceSeconds is a relative time in seconds before the current time from which to show logs. If this value |
|
707 | 707 |
// precedes the time a pod was started, only logs since the pod start will be returned. |
708 | 708 |
// If this value is in the future, no logs will be returned. |
709 | 709 |
// Only one of sinceSeconds or sinceTime may be specified. |
710 | 710 |
SinceSeconds *int64 `json:"sinceSeconds,omitempty"` |
711 |
- // An RFC3339 timestamp from which to show logs. If this value |
|
711 |
+ // sinceTime is an RFC3339 timestamp from which to show logs. If this value |
|
712 | 712 |
// preceeds the time a pod was started, only logs since the pod start will be returned. |
713 | 713 |
// If this value is in the future, no logs will be returned. |
714 | 714 |
// Only one of sinceSeconds or sinceTime may be specified. |
715 | 715 |
SinceTime *unversioned.Time `json:"sinceTime,omitempty"` |
716 |
- // If true, add an RFC3339 or RFC3339Nano timestamp at the beginning of every line |
|
716 |
+ // timestamps, If true, add an RFC3339 or RFC3339Nano timestamp at the beginning of every line |
|
717 | 717 |
// of log output. Defaults to false. |
718 | 718 |
Timestamps bool `json:"timestamps,omitempty"` |
719 |
- // If set, the number of lines from the end of the logs to show. If not specified, |
|
719 |
+ // tailLines, If set, is the number of lines from the end of the logs to show. If not specified, |
|
720 | 720 |
// logs are shown from the creation of the container or sinceSeconds or sinceTime |
721 | 721 |
TailLines *int64 `json:"tailLines,omitempty"` |
722 |
- // If set, the number of bytes to read from the server before terminating the |
|
722 |
+ // limitBytes, If set, is the number of bytes to read from the server before terminating the |
|
723 | 723 |
// log output. This may not display a complete final line of logging, and may return |
724 | 724 |
// slightly more or slightly less than the specified limit. |
725 | 725 |
LimitBytes *int64 `json:"limitBytes,omitempty"` |
726 | 726 |
|
727 |
- // NoWait if true causes the call to return immediately even if the build |
|
727 |
+ // noWait if true causes the call to return immediately even if the build |
|
728 | 728 |
// is not available yet. Otherwise the server will wait until the build has started. |
729 | 729 |
// TODO: Fix the tag to 'noWait' in v2 |
730 | 730 |
NoWait bool `json:"nowait,omitempty"` |
731 | 731 |
|
732 |
- // Version of the build for which to view logs. |
|
732 |
+ // version of the build for which to view logs. |
|
733 | 733 |
Version *int64 `json:"version,omitempty"` |
734 | 734 |
} |
735 | 735 |
|
736 | 736 |
// SecretSpec specifies a secret to be included in a build pod and its corresponding mount point |
737 | 737 |
type SecretSpec struct { |
738 |
- // SecretSource is a reference to the secret |
|
738 |
+ // secretSource is a reference to the secret |
|
739 | 739 |
SecretSource kapi.LocalObjectReference `json:"secretSource"` |
740 | 740 |
|
741 |
- // MountPath is the path at which to mount the secret |
|
741 |
+ // mountPath is the path at which to mount the secret |
|
742 | 742 |
MountPath string `json:"mountPath"` |
743 | 743 |
} |
... | ... |
@@ -126,7 +126,7 @@ func Convert_api_BuildOutput_To_v1beta3_BuildOutput(in *newer.BuildOutput, out * |
126 | 126 |
} |
127 | 127 |
|
128 | 128 |
func Convert_v1beta3_BuildTriggerPolicy_To_api_BuildTriggerPolicy(in *BuildTriggerPolicy, out *newer.BuildTriggerPolicy, s conversion.Scope) error { |
129 |
- if err := s.DefaultConvert(in, out, conversion.DestFromSource); err != nil { |
|
129 |
+ if err := s.DefaultConvert(in, out, conversion.IgnoreMissingFields); err != nil { |
|
130 | 130 |
return err |
131 | 131 |
} |
132 | 132 |
switch in.Type { |
... | ... |
@@ -141,7 +141,7 @@ func Convert_v1beta3_BuildTriggerPolicy_To_api_BuildTriggerPolicy(in *BuildTrigg |
141 | 141 |
} |
142 | 142 |
|
143 | 143 |
func Convert_api_BuildTriggerPolicy_To_v1beta3_BuildTriggerPolicy(in *newer.BuildTriggerPolicy, out *BuildTriggerPolicy, s conversion.Scope) error { |
144 |
- if err := s.DefaultConvert(in, out, conversion.DestFromSource); err != nil { |
|
144 |
+ if err := s.DefaultConvert(in, out, conversion.IgnoreMissingFields); err != nil { |
|
145 | 145 |
return err |
146 | 146 |
} |
147 | 147 |
switch in.Type { |
... | ... |
@@ -458,13 +458,13 @@ func validateTrigger(trigger *buildapi.BuildTriggerPolicy, buildFrom *kapi.Objec |
458 | 458 |
if trigger.GitHubWebHook == nil { |
459 | 459 |
allErrs = append(allErrs, field.Required(fldPath.Child("github"), "")) |
460 | 460 |
} else { |
461 |
- allErrs = append(allErrs, validateWebHook(trigger.GitHubWebHook, fldPath.Child("github"))...) |
|
461 |
+ allErrs = append(allErrs, validateWebHook(trigger.GitHubWebHook, fldPath.Child("github"), false)...) |
|
462 | 462 |
} |
463 | 463 |
case buildapi.GenericWebHookBuildTriggerType: |
464 | 464 |
if trigger.GenericWebHook == nil { |
465 | 465 |
allErrs = append(allErrs, field.Required(fldPath.Child("generic"), "")) |
466 | 466 |
} else { |
467 |
- allErrs = append(allErrs, validateWebHook(trigger.GenericWebHook, fldPath.Child("generic"))...) |
|
467 |
+ allErrs = append(allErrs, validateWebHook(trigger.GenericWebHook, fldPath.Child("generic"), true)...) |
|
468 | 468 |
} |
469 | 469 |
case buildapi.ImageChangeBuildTriggerType: |
470 | 470 |
if trigger.ImageChange == nil { |
... | ... |
@@ -500,11 +500,14 @@ func validateTrigger(trigger *buildapi.BuildTriggerPolicy, buildFrom *kapi.Objec |
500 | 500 |
return allErrs |
501 | 501 |
} |
502 | 502 |
|
503 |
-func validateWebHook(webHook *buildapi.WebHookTrigger, fldPath *field.Path) field.ErrorList { |
|
503 |
+func validateWebHook(webHook *buildapi.WebHookTrigger, fldPath *field.Path, isGeneric bool) field.ErrorList { |
|
504 | 504 |
allErrs := field.ErrorList{} |
505 | 505 |
if len(webHook.Secret) == 0 { |
506 | 506 |
allErrs = append(allErrs, field.Required(fldPath.Child("secret"), "")) |
507 | 507 |
} |
508 |
+ if !isGeneric && webHook.AllowEnv { |
|
509 |
+ allErrs = append(allErrs, field.Invalid(fldPath.Child("allowEnv"), webHook, "git webhooks cannot allow env vars")) |
|
510 |
+ } |
|
508 | 511 |
return allErrs |
509 | 512 |
} |
510 | 513 |
|
... | ... |
@@ -1854,6 +1854,16 @@ func TestValidateTrigger(t *testing.T) { |
1854 | 1854 |
}, |
1855 | 1855 |
expected: []*field.Error{field.Required(field.NewPath("github"), "")}, |
1856 | 1856 |
}, |
1857 |
+ "GitHub trigger with allow env": { |
|
1858 |
+ trigger: buildapi.BuildTriggerPolicy{ |
|
1859 |
+ Type: buildapi.GitHubWebHookBuildTriggerType, |
|
1860 |
+ GitHubWebHook: &buildapi.WebHookTrigger{ |
|
1861 |
+ Secret: "secret101", |
|
1862 |
+ AllowEnv: true, |
|
1863 |
+ }, |
|
1864 |
+ }, |
|
1865 |
+ expected: []*field.Error{field.Invalid(field.NewPath("github", "allowEnv"), "", "")}, |
|
1866 |
+ }, |
|
1857 | 1867 |
"Generic trigger with no generic webhook": { |
1858 | 1868 |
trigger: buildapi.BuildTriggerPolicy{Type: buildapi.GenericWebHookBuildTriggerType}, |
1859 | 1869 |
expected: []*field.Error{field.Required(field.NewPath("generic"), "")}, |
... | ... |
@@ -49,7 +49,7 @@ func (c *controller) ServeHTTP(w http.ResponseWriter, req *http.Request, ctx kap |
49 | 49 |
return errors.NewUnauthorized(fmt.Sprintf("the webhook %q for %q did not accept your secret", hookType, name)) |
50 | 50 |
} |
51 | 51 |
|
52 |
- revision, proceed, err := plugin.Extract(config, secret, "", req) |
|
52 |
+ revision, envvars, proceed, err := plugin.Extract(config, secret, "", req) |
|
53 | 53 |
switch err { |
54 | 54 |
case webhook.ErrSecretMismatch, webhook.ErrHookNotEnabled: |
55 | 55 |
return errors.NewUnauthorized(fmt.Sprintf("the webhook %q for %q did not accept your secret", hookType, name)) |
... | ... |
@@ -65,6 +65,7 @@ func (c *controller) ServeHTTP(w http.ResponseWriter, req *http.Request, ctx kap |
65 | 65 |
request := &buildapi.BuildRequest{ |
66 | 66 |
ObjectMeta: kapi.ObjectMeta{Name: name}, |
67 | 67 |
Revision: revision, |
68 |
+ Env: envvars, |
|
68 | 69 |
} |
69 | 70 |
if _, err := c.instantiator.Instantiate(config.Namespace, request); err != nil { |
70 | 71 |
return errors.NewInternalError(fmt.Errorf("could not generate a build: %v", err)) |
... | ... |
@@ -32,18 +32,27 @@ func (i *buildConfigInstantiator) Instantiate(namespace string, request *api.Bui |
32 | 32 |
type plugin struct { |
33 | 33 |
Secret, Path string |
34 | 34 |
Err error |
35 |
+ Env []kapi.EnvVar |
|
35 | 36 |
} |
36 | 37 |
|
37 |
-func (p *plugin) Extract(buildCfg *api.BuildConfig, secret, path string, req *http.Request) (*api.SourceRevision, bool, error) { |
|
38 |
+func (p *plugin) Extract(buildCfg *api.BuildConfig, secret, path string, req *http.Request) (*api.SourceRevision, []kapi.EnvVar, bool, error) { |
|
38 | 39 |
p.Secret, p.Path = secret, path |
39 |
- return nil, true, p.Err |
|
40 |
+ return nil, p.Env, true, p.Err |
|
40 | 41 |
} |
41 | 42 |
|
42 | 43 |
func newStorage() (*rest.WebHook, *buildConfigInstantiator, *test.BuildConfigRegistry) { |
43 | 44 |
mockRegistry := &test.BuildConfigRegistry{} |
44 | 45 |
bci := &buildConfigInstantiator{} |
45 | 46 |
hook := NewWebHookREST(mockRegistry, bci, map[string]webhook.Plugin{ |
46 |
- "ok": &plugin{}, |
|
47 |
+ "ok": &plugin{}, |
|
48 |
+ "okenv": &plugin{ |
|
49 |
+ Env: []kapi.EnvVar{ |
|
50 |
+ { |
|
51 |
+ Name: "foo", |
|
52 |
+ Value: "bar", |
|
53 |
+ }, |
|
54 |
+ }, |
|
55 |
+ }, |
|
47 | 56 |
"errsecret": &plugin{Err: webhook.ErrSecretMismatch}, |
48 | 57 |
"errhook": &plugin{Err: webhook.ErrHookNotEnabled}, |
49 | 58 |
"err": &plugin{Err: fmt.Errorf("test error")}, |
... | ... |
@@ -90,6 +99,7 @@ func TestConnectWebHook(t *testing.T) { |
90 | 90 |
RegErr error |
91 | 91 |
ErrFn func(error) bool |
92 | 92 |
WFn func(*httptest.ResponseRecorder) bool |
93 |
+ EnvLen int |
|
93 | 94 |
}{ |
94 | 95 |
"hook returns generic error": { |
95 | 96 |
Name: "test", |
... | ... |
@@ -123,6 +133,16 @@ func TestConnectWebHook(t *testing.T) { |
123 | 123 |
return w.Code == http.StatusOK |
124 | 124 |
}, |
125 | 125 |
}, |
126 |
+ "hook returns 200 for okenv hook": { |
|
127 |
+ Name: "test", |
|
128 |
+ Path: "secret/okenv/extra", |
|
129 |
+ Obj: &api.BuildConfig{ObjectMeta: kapi.ObjectMeta{Name: "test", Namespace: "default"}}, |
|
130 |
+ ErrFn: func(err error) bool { return err == nil }, |
|
131 |
+ WFn: func(w *httptest.ResponseRecorder) bool { |
|
132 |
+ return w.Code == http.StatusOK |
|
133 |
+ }, |
|
134 |
+ EnvLen: 1, |
|
135 |
+ }, |
|
126 | 136 |
} |
127 | 137 |
for k, testCase := range testCases { |
128 | 138 |
hook, bci, registry := newStorage() |
... | ... |
@@ -163,5 +183,8 @@ func TestConnectWebHook(t *testing.T) { |
163 | 163 |
continue |
164 | 164 |
} |
165 | 165 |
} |
166 |
+ if bci.Request != nil && testCase.EnvLen != len(bci.Request.Env) { |
|
167 |
+ t.Errorf("%s: build request does not have correct env vars: %+v \n", k, bci.Request) |
|
168 |
+ } |
|
166 | 169 |
} |
167 | 170 |
} |
... | ... |
@@ -20,7 +20,7 @@ type Plugin interface { |
20 | 20 |
// - newly created build object or nil if default is to be created |
21 | 21 |
// - information whether to trigger the build itself |
22 | 22 |
// - eventual error. |
23 |
- Extract(buildCfg *buildapi.BuildConfig, secret, path string, req *http.Request) (*buildapi.SourceRevision, bool, error) |
|
23 |
+ Extract(buildCfg *buildapi.BuildConfig, secret, path string, req *http.Request) (*buildapi.SourceRevision, []kapi.EnvVar, bool, error) |
|
24 | 24 |
} |
25 | 25 |
|
26 | 26 |
// controller used for processing webhook requests. |
... | ... |
@@ -71,7 +71,7 @@ func (c *controller) ServeHTTP(w http.ResponseWriter, req *http.Request) { |
71 | 71 |
notFound(w, "Plugin ", uv.plugin, " not found") |
72 | 72 |
return |
73 | 73 |
} |
74 |
- revision, proceed, err := plugin.Extract(buildCfg, uv.secret, uv.path, req) |
|
74 |
+ revision, envvars, proceed, err := plugin.Extract(buildCfg, uv.secret, uv.path, req) |
|
75 | 75 |
if err != nil { |
76 | 76 |
glog.V(2).Infof("Failed to extract information from webhook: %v", err) |
77 | 77 |
badRequest(w, err.Error()) |
... | ... |
@@ -83,6 +83,7 @@ func (c *controller) ServeHTTP(w http.ResponseWriter, req *http.Request) { |
83 | 83 |
request := &buildapi.BuildRequest{ |
84 | 84 |
ObjectMeta: kapi.ObjectMeta{Name: buildCfg.Name}, |
85 | 85 |
Revision: revision, |
86 |
+ Env: envvars, |
|
86 | 87 |
} |
87 | 88 |
if _, err := c.buildConfigInstantiator.Instantiate(uv.namespace, request); err != nil { |
88 | 89 |
glog.V(2).Infof("Failed to generate new Build from BuildConfig %s/%s: %v", buildCfg.Namespace, buildCfg.Name, err) |
... | ... |
@@ -68,15 +68,15 @@ type pathPlugin struct { |
68 | 68 |
Path string |
69 | 69 |
} |
70 | 70 |
|
71 |
-func (p *pathPlugin) Extract(buildCfg *api.BuildConfig, secret, path string, req *http.Request) (*api.SourceRevision, bool, error) { |
|
71 |
+func (p *pathPlugin) Extract(buildCfg *api.BuildConfig, secret, path string, req *http.Request) (*api.SourceRevision, []kapi.EnvVar, bool, error) { |
|
72 | 72 |
p.Path = path |
73 |
- return nil, true, nil |
|
73 |
+ return nil, []kapi.EnvVar{}, true, nil |
|
74 | 74 |
} |
75 | 75 |
|
76 | 76 |
type errPlugin struct{} |
77 | 77 |
|
78 |
-func (*errPlugin) Extract(buildCfg *api.BuildConfig, secret, path string, req *http.Request) (*api.SourceRevision, bool, error) { |
|
79 |
- return nil, true, errors.New("Plugin error!") |
|
78 |
+func (*errPlugin) Extract(buildCfg *api.BuildConfig, secret, path string, req *http.Request) (*api.SourceRevision, []kapi.EnvVar, bool, error) { |
|
79 |
+ return nil, []kapi.EnvVar{}, true, errors.New("Plugin error!") |
|
80 | 80 |
} |
81 | 81 |
|
82 | 82 |
func TestParseUrlError(t *testing.T) { |
83 | 83 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,23 @@ |
0 |
+{ |
|
1 |
+ "type" : "Git", |
|
2 |
+ "git" : { |
|
3 |
+ "uri" : "git://mygitserver/myrepo.git", |
|
4 |
+ "ref" : "refs/heads/master", |
|
5 |
+ "commit" : "9bdc3a26ff933b32f3e558636b58aea86a69f051", |
|
6 |
+ "message" : "Random act of kindness", |
|
7 |
+ "author" : { |
|
8 |
+ "name" : "Jon Doe", |
|
9 |
+ "email" : "jondoe@email.com" |
|
10 |
+ }, |
|
11 |
+ "committer" : { |
|
12 |
+ "name" : "Jon Doe", |
|
13 |
+ "email" : "jondoe@email.com" |
|
14 |
+ } |
|
15 |
+ }, |
|
16 |
+ "env": [ |
|
17 |
+ { |
|
18 |
+ "name": "EXAMPLE", |
|
19 |
+ "value": "sample-app" |
|
20 |
+ } |
|
21 |
+ ] |
|
22 |
+} |
... | ... |
@@ -10,6 +10,8 @@ import ( |
10 | 10 |
|
11 | 11 |
"github.com/golang/glog" |
12 | 12 |
|
13 |
+ kapi "k8s.io/kubernetes/pkg/api" |
|
14 |
+ |
|
13 | 15 |
"github.com/openshift/origin/pkg/build/api" |
14 | 16 |
"github.com/openshift/origin/pkg/build/webhook" |
15 | 17 |
) |
... | ... |
@@ -23,7 +25,7 @@ func New() *WebHookPlugin { |
23 | 23 |
} |
24 | 24 |
|
25 | 25 |
// Extract services generic webhooks. |
26 |
-func (p *WebHookPlugin) Extract(buildCfg *api.BuildConfig, secret, path string, req *http.Request) (revision *api.SourceRevision, proceed bool, err error) { |
|
26 |
+func (p *WebHookPlugin) Extract(buildCfg *api.BuildConfig, secret, path string, req *http.Request) (revision *api.SourceRevision, envvars []kapi.EnvVar, proceed bool, err error) { |
|
27 | 27 |
trigger, ok := webhook.FindTriggerPolicy(api.GenericWebHookBuildTriggerType, buildCfg) |
28 | 28 |
if !ok { |
29 | 29 |
err = webhook.ErrHookNotEnabled |
... | ... |
@@ -42,33 +44,36 @@ func (p *WebHookPlugin) Extract(buildCfg *api.BuildConfig, secret, path string, |
42 | 42 |
git := buildCfg.Spec.Source.Git |
43 | 43 |
if git == nil { |
44 | 44 |
glog.V(4).Infof("No source defined for BuildConfig %s/%s, but triggering anyway", buildCfg.Namespace, buildCfg.Name) |
45 |
- return nil, true, nil |
|
45 |
+ return nil, envvars, true, nil |
|
46 | 46 |
} |
47 | 47 |
|
48 | 48 |
contentType := req.Header.Get("Content-Type") |
49 | 49 |
if len(contentType) != 0 { |
50 | 50 |
contentType, _, err = mime.ParseMediaType(contentType) |
51 | 51 |
if err != nil { |
52 |
- return nil, false, fmt.Errorf("non-parseable Content-Type %s (%s)", contentType, err) |
|
52 |
+ return nil, envvars, false, fmt.Errorf("non-parseable Content-Type %s (%s)", contentType, err) |
|
53 | 53 |
} |
54 | 54 |
} |
55 | 55 |
|
56 | 56 |
if req.Body != nil && contentType == "application/json" { |
57 | 57 |
body, err := ioutil.ReadAll(req.Body) |
58 | 58 |
if err != nil { |
59 |
- return nil, false, err |
|
59 |
+ return nil, envvars, false, err |
|
60 | 60 |
} |
61 | 61 |
if len(body) == 0 { |
62 |
- return nil, true, nil |
|
62 |
+ return nil, envvars, true, nil |
|
63 | 63 |
} |
64 | 64 |
var data api.GenericWebHookEvent |
65 | 65 |
if err = json.Unmarshal(body, &data); err != nil { |
66 | 66 |
glog.V(4).Infof("Error unmarshaling json %v, but continuing", err) |
67 |
- return nil, true, nil |
|
67 |
+ return nil, envvars, true, nil |
|
68 |
+ } |
|
69 |
+ if len(data.Env) > 0 && trigger.GenericWebHook.AllowEnv { |
|
70 |
+ envvars = data.Env |
|
68 | 71 |
} |
69 | 72 |
if data.Git == nil { |
70 | 73 |
glog.V(4).Infof("No git information for the generic webhook found in %s/%s", buildCfg.Namespace, buildCfg.Name) |
71 |
- return nil, true, nil |
|
74 |
+ return nil, envvars, true, nil |
|
72 | 75 |
} |
73 | 76 |
|
74 | 77 |
if data.Git.Refs != nil { |
... | ... |
@@ -77,21 +82,21 @@ func (p *WebHookPlugin) Extract(buildCfg *api.BuildConfig, secret, path string, |
77 | 77 |
revision = &api.SourceRevision{ |
78 | 78 |
Git: &ref.GitSourceRevision, |
79 | 79 |
} |
80 |
- return revision, true, nil |
|
80 |
+ return revision, envvars, true, nil |
|
81 | 81 |
} |
82 | 82 |
} |
83 | 83 |
glog.V(2).Infof("Skipping build for BuildConfig %s/%s. None of the supplied refs matched %q", buildCfg.Namespace, buildCfg, git.Ref) |
84 |
- return nil, false, nil |
|
84 |
+ return nil, envvars, false, nil |
|
85 | 85 |
} |
86 | 86 |
if !webhook.GitRefMatches(data.Git.Ref, git.Ref) { |
87 | 87 |
glog.V(2).Infof("Skipping build for BuildConfig %s/%s. Branch reference from %q does not match configuration", buildCfg.Namespace, buildCfg.Name, data.Git.Ref) |
88 |
- return nil, false, nil |
|
88 |
+ return nil, envvars, false, nil |
|
89 | 89 |
} |
90 | 90 |
revision = &api.SourceRevision{ |
91 | 91 |
Git: &data.Git.GitSourceRevision, |
92 | 92 |
} |
93 | 93 |
} |
94 |
- return revision, true, nil |
|
94 |
+ return revision, envvars, true, nil |
|
95 | 95 |
} |
96 | 96 |
|
97 | 97 |
func verifyRequest(req *http.Request) error { |
... | ... |
@@ -67,7 +67,7 @@ func TestVerifyRequestForMethod(t *testing.T) { |
67 | 67 |
}, |
68 | 68 |
} |
69 | 69 |
plugin := New() |
70 |
- revision, proceed, err := plugin.Extract(buildConfig, "secret100", "", req) |
|
70 |
+ revision, _, proceed, err := plugin.Extract(buildConfig, "secret100", "", req) |
|
71 | 71 |
|
72 | 72 |
if err == nil || !strings.Contains(err.Error(), "Unsupported HTTP method") { |
73 | 73 |
t.Errorf("Excepcted unsupported HTTP method, got %v!", err) |
... | ... |
@@ -95,7 +95,7 @@ func TestWrongSecret(t *testing.T) { |
95 | 95 |
}, |
96 | 96 |
} |
97 | 97 |
plugin := New() |
98 |
- revision, proceed, err := plugin.Extract(buildConfig, "wrongsecret", "", req) |
|
98 |
+ revision, _, proceed, err := plugin.Extract(buildConfig, "wrongsecret", "", req) |
|
99 | 99 |
|
100 | 100 |
if err != webhook.ErrSecretMismatch { |
101 | 101 |
t.Errorf("Excepcted %v, got %v!", webhook.ErrSecretMismatch, err) |
... | ... |
@@ -139,7 +139,7 @@ func TestExtractWithEmptyPayload(t *testing.T) { |
139 | 139 |
}, |
140 | 140 |
} |
141 | 141 |
plugin := New() |
142 |
- revision, proceed, err := plugin.Extract(buildConfig, "secret100", "", req) |
|
142 |
+ revision, _, proceed, err := plugin.Extract(buildConfig, "secret100", "", req) |
|
143 | 143 |
if err != nil { |
144 | 144 |
t.Errorf("Expected to be able to trigger a build without a payload error: %v", err) |
145 | 145 |
} |
... | ... |
@@ -174,7 +174,7 @@ func TestExtractWithUnmatchedRefGitPayload(t *testing.T) { |
174 | 174 |
}, |
175 | 175 |
} |
176 | 176 |
plugin := New() |
177 |
- build, proceed, err := plugin.Extract(buildConfig, "secret100", "", req) |
|
177 |
+ build, _, proceed, err := plugin.Extract(buildConfig, "secret100", "", req) |
|
178 | 178 |
|
179 | 179 |
if err != nil { |
180 | 180 |
t.Errorf("Unexpected error when triggering build: %v", err) |
... | ... |
@@ -210,7 +210,7 @@ func TestExtractWithGitPayload(t *testing.T) { |
210 | 210 |
}, |
211 | 211 |
} |
212 | 212 |
plugin := New() |
213 |
- revision, proceed, err := plugin.Extract(buildConfig, "secret100", "", req) |
|
213 |
+ revision, _, proceed, err := plugin.Extract(buildConfig, "secret100", "", req) |
|
214 | 214 |
|
215 | 215 |
if err != nil { |
216 | 216 |
t.Errorf("Expected to be able to trigger a build without a payload error: %v", err) |
... | ... |
@@ -246,7 +246,7 @@ func TestExtractWithGitPayloadAndUTF8Charset(t *testing.T) { |
246 | 246 |
}, |
247 | 247 |
} |
248 | 248 |
plugin := New() |
249 |
- revision, proceed, err := plugin.Extract(buildConfig, "secret100", "", req) |
|
249 |
+ revision, _, proceed, err := plugin.Extract(buildConfig, "secret100", "", req) |
|
250 | 250 |
|
251 | 251 |
if err != nil { |
252 | 252 |
t.Errorf("Expected to be able to trigger a build without a payload error: %v", err) |
... | ... |
@@ -282,7 +282,7 @@ func TestExtractWithGitRefsPayload(t *testing.T) { |
282 | 282 |
}, |
283 | 283 |
} |
284 | 284 |
plugin := New() |
285 |
- revision, proceed, err := plugin.Extract(buildConfig, "secret100", "", req) |
|
285 |
+ revision, _, proceed, err := plugin.Extract(buildConfig, "secret100", "", req) |
|
286 | 286 |
|
287 | 287 |
if err != nil { |
288 | 288 |
t.Errorf("Expected to be able to trigger a build without a payload error: %v", err) |
... | ... |
@@ -318,7 +318,7 @@ func TestExtractWithUnmatchedGitRefsPayload(t *testing.T) { |
318 | 318 |
}, |
319 | 319 |
} |
320 | 320 |
plugin := New() |
321 |
- revision, proceed, err := plugin.Extract(buildConfig, "secret100", "", req) |
|
321 |
+ revision, _, proceed, err := plugin.Extract(buildConfig, "secret100", "", req) |
|
322 | 322 |
|
323 | 323 |
if err != nil { |
324 | 324 |
t.Errorf("Expected to be able to trigger a build without a payload error: %v", err) |
... | ... |
@@ -331,6 +331,87 @@ func TestExtractWithUnmatchedGitRefsPayload(t *testing.T) { |
331 | 331 |
} |
332 | 332 |
} |
333 | 333 |
|
334 |
+func TestExtractWithKeyValuePairs(t *testing.T) { |
|
335 |
+ req := GivenRequestWithPayload(t, "push-github-envs.json") |
|
336 |
+ buildConfig := &api.BuildConfig{ |
|
337 |
+ Spec: api.BuildConfigSpec{ |
|
338 |
+ Triggers: []api.BuildTriggerPolicy{ |
|
339 |
+ { |
|
340 |
+ Type: api.GenericWebHookBuildTriggerType, |
|
341 |
+ GenericWebHook: &api.WebHookTrigger{ |
|
342 |
+ Secret: "secret100", |
|
343 |
+ AllowEnv: true, |
|
344 |
+ }, |
|
345 |
+ }, |
|
346 |
+ }, |
|
347 |
+ BuildSpec: api.BuildSpec{ |
|
348 |
+ Source: api.BuildSource{ |
|
349 |
+ Git: &api.GitBuildSource{ |
|
350 |
+ Ref: "master", |
|
351 |
+ }, |
|
352 |
+ }, |
|
353 |
+ Strategy: mockBuildStrategy, |
|
354 |
+ }, |
|
355 |
+ }, |
|
356 |
+ } |
|
357 |
+ plugin := New() |
|
358 |
+ revision, envvars, proceed, err := plugin.Extract(buildConfig, "secret100", "", req) |
|
359 |
+ |
|
360 |
+ if err != nil { |
|
361 |
+ t.Errorf("Expected to be able to trigger a build without a payload error: %v", err) |
|
362 |
+ } |
|
363 |
+ if !proceed { |
|
364 |
+ t.Error("Expected 'proceed' return value to be 'true'") |
|
365 |
+ } |
|
366 |
+ if revision == nil { |
|
367 |
+ t.Error("Expected the 'revision' return value to not be nil") |
|
368 |
+ } |
|
369 |
+ |
|
370 |
+ if len(envvars) == 0 { |
|
371 |
+ t.Error("Expected env vars to be set") |
|
372 |
+ } |
|
373 |
+} |
|
374 |
+ |
|
375 |
+func TestExtractWithKeyValuePairsDisabled(t *testing.T) { |
|
376 |
+ req := GivenRequestWithPayload(t, "push-github-envs.json") |
|
377 |
+ buildConfig := &api.BuildConfig{ |
|
378 |
+ Spec: api.BuildConfigSpec{ |
|
379 |
+ Triggers: []api.BuildTriggerPolicy{ |
|
380 |
+ { |
|
381 |
+ Type: api.GenericWebHookBuildTriggerType, |
|
382 |
+ GenericWebHook: &api.WebHookTrigger{ |
|
383 |
+ Secret: "secret100", |
|
384 |
+ }, |
|
385 |
+ }, |
|
386 |
+ }, |
|
387 |
+ BuildSpec: api.BuildSpec{ |
|
388 |
+ Source: api.BuildSource{ |
|
389 |
+ Git: &api.GitBuildSource{ |
|
390 |
+ Ref: "master", |
|
391 |
+ }, |
|
392 |
+ }, |
|
393 |
+ Strategy: mockBuildStrategy, |
|
394 |
+ }, |
|
395 |
+ }, |
|
396 |
+ } |
|
397 |
+ plugin := New() |
|
398 |
+ revision, envvars, proceed, err := plugin.Extract(buildConfig, "secret100", "", req) |
|
399 |
+ |
|
400 |
+ if err != nil { |
|
401 |
+ t.Errorf("Expected to be able to trigger a build without a payload error: %v", err) |
|
402 |
+ } |
|
403 |
+ if !proceed { |
|
404 |
+ t.Error("Expected 'proceed' return value to be 'true'") |
|
405 |
+ } |
|
406 |
+ if revision == nil { |
|
407 |
+ t.Error("Expected the 'revision' return value to not be nil") |
|
408 |
+ } |
|
409 |
+ |
|
410 |
+ if len(envvars) != 0 { |
|
411 |
+ t.Error("Expected env vars to be empty") |
|
412 |
+ } |
|
413 |
+} |
|
414 |
+ |
|
334 | 415 |
func TestGitlabPush(t *testing.T) { |
335 | 416 |
req := GivenRequestWithPayload(t, "push-gitlab.json") |
336 | 417 |
buildConfig := &api.BuildConfig{ |
... | ... |
@@ -352,7 +433,7 @@ func TestGitlabPush(t *testing.T) { |
352 | 352 |
}, |
353 | 353 |
} |
354 | 354 |
plugin := New() |
355 |
- _, proceed, err := plugin.Extract(buildConfig, "secret100", "", req) |
|
355 |
+ _, _, proceed, err := plugin.Extract(buildConfig, "secret100", "", req) |
|
356 | 356 |
|
357 | 357 |
if err != nil { |
358 | 358 |
t.Errorf("Expected to be able to trigger a build without a payload error: %v", err) |
... | ... |
@@ -384,7 +465,7 @@ func TestNonJsonPush(t *testing.T) { |
384 | 384 |
}, |
385 | 385 |
} |
386 | 386 |
plugin := New() |
387 |
- _, proceed, err := plugin.Extract(buildConfig, "secret100", "", req) |
|
387 |
+ _, _, proceed, err := plugin.Extract(buildConfig, "secret100", "", req) |
|
388 | 388 |
|
389 | 389 |
if err != nil { |
390 | 390 |
t.Errorf("Expected to be able to trigger a build without a payload error: %v", err) |
... | ... |
@@ -425,7 +506,7 @@ func TestExtractWithUnmarshalError(t *testing.T) { |
425 | 425 |
}, |
426 | 426 |
} |
427 | 427 |
plugin := New() |
428 |
- revision, proceed, err := plugin.Extract(buildConfig, "secret100", "", req) |
|
428 |
+ revision, _, proceed, err := plugin.Extract(buildConfig, "secret100", "", req) |
|
429 | 429 |
if err != nil { |
430 | 430 |
t.Errorf("Expected to be able to trigger a build without a payload error: %v", err) |
431 | 431 |
} |
... | ... |
@@ -9,6 +9,8 @@ import ( |
9 | 9 |
"mime" |
10 | 10 |
"net/http" |
11 | 11 |
|
12 |
+ kapi "k8s.io/kubernetes/pkg/api" |
|
13 |
+ |
|
12 | 14 |
"github.com/golang/glog" |
13 | 15 |
"github.com/openshift/origin/pkg/build/api" |
14 | 16 |
"github.com/openshift/origin/pkg/build/webhook" |
... | ... |
@@ -36,7 +38,7 @@ type pushEvent struct { |
36 | 36 |
} |
37 | 37 |
|
38 | 38 |
// Extract services webhooks from github.com |
39 |
-func (p *WebHook) Extract(buildCfg *api.BuildConfig, secret, path string, req *http.Request) (revision *api.SourceRevision, proceed bool, err error) { |
|
39 |
+func (p *WebHook) Extract(buildCfg *api.BuildConfig, secret, path string, req *http.Request) (revision *api.SourceRevision, envvars []kapi.EnvVar, proceed bool, err error) { |
|
40 | 40 |
trigger, ok := webhook.FindTriggerPolicy(api.GitHubWebHookBuildTriggerType, buildCfg) |
41 | 41 |
if !ok { |
42 | 42 |
err = webhook.ErrHookNotEnabled |
... | ... |
@@ -263,7 +263,7 @@ func TestExtractForAPingEvent(t *testing.T) { |
263 | 263 |
context := setup(t, "pingevent.json", "ping") |
264 | 264 |
|
265 | 265 |
//execute |
266 |
- _, proceed, err := context.plugin.Extract(context.buildCfg, "secret101", context.path, context.req) |
|
266 |
+ _, _, proceed, err := context.plugin.Extract(context.buildCfg, "secret101", context.path, context.req) |
|
267 | 267 |
|
268 | 268 |
//validation |
269 | 269 |
if err != nil { |
... | ... |
@@ -279,7 +279,7 @@ func TestExtractProvidesValidBuildForAPushEvent(t *testing.T) { |
279 | 279 |
context := setup(t, "pushevent.json", "push") |
280 | 280 |
|
281 | 281 |
//execute |
282 |
- revision, proceed, err := context.plugin.Extract(context.buildCfg, "secret101", context.path, context.req) |
|
282 |
+ revision, _, proceed, err := context.plugin.Extract(context.buildCfg, "secret101", context.path, context.req) |
|
283 | 283 |
|
284 | 284 |
//validation |
285 | 285 |
if err != nil { |
... | ... |
@@ -303,7 +303,7 @@ func TestExtractProvidesValidBuildForAPushEventOtherThanMaster(t *testing.T) { |
303 | 303 |
context.buildCfg.Spec.Source.Git.Ref = "my_other_branch" |
304 | 304 |
|
305 | 305 |
//execute |
306 |
- revision, proceed, err := context.plugin.Extract(context.buildCfg, "secret101", context.path, context.req) |
|
306 |
+ revision, _, proceed, err := context.plugin.Extract(context.buildCfg, "secret101", context.path, context.req) |
|
307 | 307 |
|
308 | 308 |
//validation |
309 | 309 |
if err != nil { |
... | ... |
@@ -327,7 +327,7 @@ func TestExtractSkipsBuildForUnmatchedBranches(t *testing.T) { |
327 | 327 |
context.buildCfg.Spec.Source.Git.Ref = "adfj32qrafdavckeaewra" |
328 | 328 |
|
329 | 329 |
//execute |
330 |
- _, proceed, _ := context.plugin.Extract(context.buildCfg, "secret101", context.path, context.req) |
|
330 |
+ _, _, proceed, _ := context.plugin.Extract(context.buildCfg, "secret101", context.path, context.req) |
|
331 | 331 |
if proceed { |
332 | 332 |
t.Errorf("Expecting to not continue from this event because the branch is not for this buildConfig '%s'", context.buildCfg.Spec.Source.Git.Ref) |
333 | 333 |
} |
... | ... |
@@ -90,11 +90,12 @@ type TriggersOptions struct { |
90 | 90 |
Manual bool |
91 | 91 |
Reset bool |
92 | 92 |
|
93 |
- ContainerNames string |
|
94 |
- FromConfig bool |
|
95 |
- FromGitHub *bool |
|
96 |
- FromWebHook *bool |
|
97 |
- FromImage string |
|
93 |
+ ContainerNames string |
|
94 |
+ FromConfig bool |
|
95 |
+ FromGitHub *bool |
|
96 |
+ FromWebHook *bool |
|
97 |
+ FromWebHookAllowEnv *bool |
|
98 |
+ FromImage string |
|
98 | 99 |
// FromImageNamespace is the namespace for the FromImage |
99 | 100 |
FromImageNamespace string |
100 | 101 |
} |
... | ... |
@@ -138,6 +139,7 @@ func NewCmdTriggers(fullName string, f *clientcmd.Factory, out, errOut io.Writer |
138 | 138 |
cmd.Flags().StringVar(&options.FromImage, "from-image", options.FromImage, "An image stream tag to trigger off of") |
139 | 139 |
options.FromGitHub = cmd.Flags().Bool("from-github", false, "A GitHub webhook - a secret value will be generated automatically") |
140 | 140 |
options.FromWebHook = cmd.Flags().Bool("from-webhook", false, "A generic webhook - a secret value will be generated automatically") |
141 |
+ options.FromWebHookAllowEnv = cmd.Flags().Bool("from-webhook-allow-env", false, "A generic webhook which can provide environment variables - a secret value will be generated automatically") |
|
141 | 142 |
|
142 | 143 |
cmd.MarkFlagFilename("filename", "yaml", "yml", "json") |
143 | 144 |
|
... | ... |
@@ -156,6 +158,9 @@ func (o *TriggersOptions) Complete(f *clientcmd.Factory, cmd *cobra.Command, arg |
156 | 156 |
if !cmd.Flags().Lookup("from-webhook").Changed { |
157 | 157 |
o.FromWebHook = nil |
158 | 158 |
} |
159 |
+ if !cmd.Flags().Lookup("from-webhook-allow-env").Changed { |
|
160 |
+ o.FromWebHookAllowEnv = nil |
|
161 |
+ } |
|
159 | 162 |
|
160 | 163 |
if len(o.FromImage) > 0 { |
161 | 164 |
ref, err := imageapi.ParseDockerImageReference(o.FromImage) |
... | ... |
@@ -213,6 +218,9 @@ func (o *TriggersOptions) count() int { |
213 | 213 |
if o.FromWebHook != nil { |
214 | 214 |
count++ |
215 | 215 |
} |
216 |
+ if o.FromWebHookAllowEnv != nil { |
|
217 |
+ count++ |
|
218 |
+ } |
|
216 | 219 |
if len(o.FromImage) > 0 { |
217 | 220 |
count++ |
218 | 221 |
} |
... | ... |
@@ -383,6 +391,10 @@ func (o *TriggersOptions) updateTriggers(triggers *TriggerDefinition) { |
383 | 383 |
if o.FromWebHook != nil && *o.FromWebHook { |
384 | 384 |
triggers.WebHooks = nil |
385 | 385 |
} |
386 |
+ if o.FromWebHookAllowEnv != nil && *o.FromWebHookAllowEnv { |
|
387 |
+ triggers.WebHooks = nil |
|
388 |
+ triggers.WebHooksAllowEnv = false |
|
389 |
+ } |
|
386 | 390 |
if o.FromGitHub != nil && *o.FromGitHub { |
387 | 391 |
triggers.GitHubWebHooks = nil |
388 | 392 |
} |
... | ... |
@@ -428,6 +440,10 @@ func (o *TriggersOptions) updateTriggers(triggers *TriggerDefinition) { |
428 | 428 |
if o.FromWebHook != nil && *o.FromWebHook { |
429 | 429 |
triggers.WebHooks = []string{app.GenerateSecret(20)} |
430 | 430 |
} |
431 |
+ if o.FromWebHookAllowEnv != nil && *o.FromWebHookAllowEnv { |
|
432 |
+ triggers.WebHooks = []string{app.GenerateSecret(20)} |
|
433 |
+ triggers.WebHooksAllowEnv = true |
|
434 |
+ } |
|
431 | 435 |
if o.FromGitHub != nil && *o.FromGitHub { |
432 | 436 |
triggers.GitHubWebHooks = []string{app.GenerateSecret(20)} |
433 | 437 |
} |
... | ... |
@@ -448,10 +464,11 @@ type ImageChangeTrigger struct { |
448 | 448 |
|
449 | 449 |
// TriggerDefinition is the abstract representation of triggers for builds and deploymnet configs. |
450 | 450 |
type TriggerDefinition struct { |
451 |
- ConfigChange bool |
|
452 |
- ImageChange []ImageChangeTrigger |
|
453 |
- WebHooks []string |
|
454 |
- GitHubWebHooks []string |
|
451 |
+ ConfigChange bool |
|
452 |
+ ImageChange []ImageChangeTrigger |
|
453 |
+ WebHooks []string |
|
454 |
+ WebHooksAllowEnv bool |
|
455 |
+ GitHubWebHooks []string |
|
455 | 456 |
} |
456 | 457 |
|
457 | 458 |
// defaultNamespace returns an empty string if the provided namespace matches the default namespace, or |
... | ... |
@@ -492,6 +509,7 @@ func NewBuildConfigTriggers(config *buildapi.BuildConfig) *TriggerDefinition { |
492 | 492 |
t.ConfigChange = true |
493 | 493 |
case buildapi.GenericWebHookBuildTriggerType: |
494 | 494 |
t.WebHooks = append(t.WebHooks, trigger.GenericWebHook.Secret) |
495 |
+ t.WebHooksAllowEnv = trigger.GenericWebHook.AllowEnv |
|
495 | 496 |
case buildapi.GitHubWebHookBuildTriggerType: |
496 | 497 |
t.GitHubWebHooks = append(t.GitHubWebHooks, trigger.GitHubWebHook.Secret) |
497 | 498 |
case buildapi.ImageChangeBuildTriggerType: |
... | ... |
@@ -575,7 +593,8 @@ func (t *TriggerDefinition) Apply(obj runtime.Object) error { |
575 | 575 |
triggers = append(triggers, buildapi.BuildTriggerPolicy{ |
576 | 576 |
Type: buildapi.GenericWebHookBuildTriggerType, |
577 | 577 |
GenericWebHook: &buildapi.WebHookTrigger{ |
578 |
- Secret: trigger, |
|
578 |
+ Secret: trigger, |
|
579 |
+ AllowEnv: t.WebHooksAllowEnv, |
|
579 | 580 |
}, |
580 | 581 |
}) |
581 | 582 |
} |
... | ... |
@@ -360,15 +360,10 @@ func describeCustomStrategy(s *buildapi.CustomBuildStrategy, out *tabwriter.Writ |
360 | 360 |
|
361 | 361 |
// DescribeTriggers generates information about the triggers associated with a buildconfig |
362 | 362 |
func (d *BuildConfigDescriber) DescribeTriggers(bc *buildapi.BuildConfig, out *tabwriter.Writer) { |
363 |
- describeBuildTriggers(bc.Spec.Triggers, out) |
|
364 |
- webhooks := webhookURL(bc, d.Interface) |
|
365 |
- for whType, whURL := range webhooks { |
|
366 |
- t := strings.Title(whType) |
|
367 |
- formatString(out, "Webhook "+t, whURL) |
|
368 |
- } |
|
363 |
+ describeBuildTriggers(bc.Spec.Triggers, bc.Name, bc.Namespace, out, d) |
|
369 | 364 |
} |
370 | 365 |
|
371 |
-func describeBuildTriggers(triggers []buildapi.BuildTriggerPolicy, w *tabwriter.Writer) { |
|
366 |
+func describeBuildTriggers(triggers []buildapi.BuildTriggerPolicy, name, namespace string, w *tabwriter.Writer, d *BuildConfigDescriber) { |
|
372 | 367 |
if len(triggers) == 0 { |
373 | 368 |
formatString(w, "Triggered by", "<none>") |
374 | 369 |
return |
... | ... |
@@ -397,6 +392,15 @@ func describeBuildTriggers(triggers []buildapi.BuildTriggerPolicy, w *tabwriter. |
397 | 397 |
|
398 | 398 |
desc := strings.Join(labels, ", ") |
399 | 399 |
formatString(w, "Triggered by", desc) |
400 |
+ |
|
401 |
+ webhooks := webhookDescribe(triggers, name, namespace, d.Interface) |
|
402 |
+ for whType, whDesc := range webhooks { |
|
403 |
+ t := strings.Title(whType) |
|
404 |
+ fmt.Fprintf(w, fmt.Sprintf("%s:\n\tURL:\t%s\n", "Webhook "+t, whDesc.URL)) |
|
405 |
+ if whType == string(buildapi.GenericWebHookBuildTriggerType) && whDesc.AllowEnv != nil { |
|
406 |
+ fmt.Fprintf(w, fmt.Sprintf("\t%s:\t%v\n", "AllowEnv", *whDesc.AllowEnv)) |
|
407 |
+ } |
|
408 |
+ } |
|
400 | 409 |
} |
401 | 410 |
|
402 | 411 |
// Describe returns the description of a buildConfig |
... | ... |
@@ -136,28 +136,40 @@ func formatMeta(out *tabwriter.Writer, m api.ObjectMeta) { |
136 | 136 |
formatAnnotations(out, m, "") |
137 | 137 |
} |
138 | 138 |
|
139 |
-// webhookURL assembles map with of webhook type as key and webhook url and value |
|
140 |
-func webhookURL(c *buildapi.BuildConfig, cli client.BuildConfigsNamespacer) map[string]string { |
|
141 |
- result := map[string]string{} |
|
142 |
- for _, trigger := range c.Spec.Triggers { |
|
139 |
+type DescribeWebhook struct { |
|
140 |
+ URL string |
|
141 |
+ AllowEnv *bool |
|
142 |
+} |
|
143 |
+ |
|
144 |
+// webhookDescribe assembles a map with of webhook type as the key and a DescribeWebhook struct as the value |
|
145 |
+func webhookDescribe(triggers []buildapi.BuildTriggerPolicy, name, namespace string, cli client.BuildConfigsNamespacer) map[string]DescribeWebhook { |
|
146 |
+ result := map[string]DescribeWebhook{} |
|
147 |
+ for _, trigger := range triggers { |
|
143 | 148 |
whTrigger := "" |
149 |
+ var allowEnv *bool |
|
144 | 150 |
switch trigger.Type { |
145 | 151 |
case buildapi.GitHubWebHookBuildTriggerType: |
146 | 152 |
whTrigger = trigger.GitHubWebHook.Secret |
147 | 153 |
case buildapi.GenericWebHookBuildTriggerType: |
148 | 154 |
whTrigger = trigger.GenericWebHook.Secret |
155 |
+ allowEnv = &trigger.GenericWebHook.AllowEnv |
|
149 | 156 |
} |
150 | 157 |
if len(whTrigger) == 0 { |
151 | 158 |
continue |
152 | 159 |
} |
153 |
- out := "" |
|
154 |
- url, err := cli.BuildConfigs(c.Namespace).WebHookURL(c.Name, &trigger) |
|
160 |
+ urlStr := "" |
|
161 |
+ url, err := cli.BuildConfigs(namespace).WebHookURL(name, &trigger) |
|
155 | 162 |
if err != nil { |
156 |
- out = fmt.Sprintf("<error: %s>", err.Error()) |
|
163 |
+ urlStr = fmt.Sprintf("<error: %s>", err.Error()) |
|
157 | 164 |
} else { |
158 |
- out = url.String() |
|
165 |
+ urlStr = url.String() |
|
159 | 166 |
} |
160 |
- result[string(trigger.Type)] = out |
|
167 |
+ desc := DescribeWebhook{ |
|
168 |
+ URL: urlStr, |
|
169 |
+ AllowEnv: allowEnv, |
|
170 |
+ } |
|
171 |
+ |
|
172 |
+ result[string(trigger.Type)] = desc |
|
161 | 173 |
} |
162 | 174 |
return result |
163 | 175 |
} |
... | ... |
@@ -306,7 +306,7 @@ func TestProjectStatus(t *testing.T) { |
306 | 306 |
o := ktestclient.NewObjects(kapi.Scheme, kapi.Codecs.UniversalDecoder()) |
307 | 307 |
if len(test.Path) > 0 { |
308 | 308 |
if err := ktestclient.AddObjectsFromPath(test.Path, o, kapi.Codecs.UniversalDecoder()); err != nil { |
309 |
- t.Fatal(err) |
|
309 |
+ t.Errorf("%s: unexpected error: %v", k, err) |
|
310 | 310 |
} |
311 | 311 |
} |
312 | 312 |
for _, obj := range test.Extra { |
... | ... |
@@ -112,8 +112,10 @@ echo "patchAnonFields: ok" |
112 | 112 |
os::test::junit::declare_suite_end |
113 | 113 |
|
114 | 114 |
os::test::junit::declare_suite_start "cmd/builds/config" |
115 |
-os::cmd::expect_success_and_text 'oc describe buildConfigs ruby-sample-build' "Webhook GitHub.+${url}/oapi/v1/namespaces/${project}/buildconfigs/ruby-sample-build/webhooks/secret101/github" |
|
116 |
-os::cmd::expect_success_and_text 'oc describe buildConfigs ruby-sample-build' "Webhook Generic.+${url}/oapi/v1/namespaces/${project}/buildconfigs/ruby-sample-build/webhooks/secret101/generic" |
|
115 |
+os::cmd::expect_success_and_text 'oc describe buildConfigs ruby-sample-build' "${url}/oapi/v1/namespaces/${project}/buildconfigs/ruby-sample-build/webhooks/secret101/github" |
|
116 |
+os::cmd::expect_success_and_text 'oc describe buildConfigs ruby-sample-build' "Webhook GitHub" |
|
117 |
+os::cmd::expect_success_and_text 'oc describe buildConfigs ruby-sample-build' "${url}/oapi/v1/namespaces/${project}/buildconfigs/ruby-sample-build/webhooks/secret101/generic" |
|
118 |
+os::cmd::expect_success_and_text 'oc describe buildConfigs ruby-sample-build' "Webhook Generic" |
|
117 | 119 |
os::cmd::expect_success 'oc start-build --list-webhooks='all' ruby-sample-build' |
118 | 120 |
os::cmd::expect_success_and_text 'oc start-build --list-webhooks=all bc/ruby-sample-build' 'generic' |
119 | 121 |
os::cmd::expect_success_and_text 'oc start-build --list-webhooks=all ruby-sample-build' 'github' |
... | ... |
@@ -150,4 +152,4 @@ os::cmd::expect_success 'oc delete all --all' |
150 | 150 |
echo "cancel-build: ok" |
151 | 151 |
os::test::junit::declare_suite_end |
152 | 152 |
|
153 |
-os::test::junit::declare_suite_end |
|
154 | 153 |
\ No newline at end of file |
154 |
+os::test::junit::declare_suite_end |
... | ... |
@@ -54,6 +54,11 @@ os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world --from-web |
54 | 54 |
os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world' 'webhook' |
55 | 55 |
os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world --remove --from-webhook' 'updated' |
56 | 56 |
os::cmd::expect_success_and_not_text 'oc set triggers bc/ruby-hello-world' 'webhook' |
57 |
+# set webhook plus envvars |
|
58 |
+os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world --from-webhook-allow-env' 'updated' |
|
59 |
+os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world' 'webhook' |
|
60 |
+os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world --remove --from-webhook-allow-env' 'updated' |
|
61 |
+os::cmd::expect_success_and_not_text 'oc set triggers bc/ruby-hello-world' 'webhook' |
|
57 | 62 |
# set from-image |
58 | 63 |
os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world --from-image=ruby-22-centos7:other' 'updated' |
59 | 64 |
os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world' 'image.*ruby-22-centos7:other.*true' |
... | ... |
@@ -93,4 +98,4 @@ os::cmd::expect_success_and_text 'oc set triggers dc/ruby-hello-world --from-ima |
93 | 93 |
os::cmd::expect_success_and_text 'oc set triggers dc/ruby-hello-world' 'image.*ruby-hello-world:latest \(ruby-hello-world\).*true' |
94 | 94 |
os::test::junit::declare_suite_end |
95 | 95 |
|
96 |
-os::test::junit::declare_suite_end |
|
97 | 96 |
\ No newline at end of file |
97 |
+os::test::junit::declare_suite_end |