Add S3Source.initial_version and related props to Schema

This commit is contained in:
Kris De Volder
2019-05-03 12:35:57 -07:00
parent 28c0637395
commit 005fbcbfda
7 changed files with 145 additions and 4 deletions

View File

@@ -582,6 +582,14 @@ public class PipelineYmlSchema implements YamlSchema {
addProp(source, "regexp", t_ne_string);
addProp(source, "versioned_file", t_ne_string);
source.requireOneOf("regexp", "versioned_file");
addProp(source, "initial_path", t_ne_string);
addProp(source, "initial_version", t_ne_string);
source.require(Constraints.mutuallyExclusive("initial_path", "initial_version"));
source.require(Constraints.implies("initial_version", "versioned_file"));
source.require(Constraints.implies("initial_path", "regexp"));
addProp(source, "initial_content_text", t_ne_string);
addProp(source, "initial_content_binary", t_ne_string);
source.require(Constraints.mutuallyExclusive("initial_content_text", "initial_content_binary"));
AbstractType get = f.ybean("S3GetParams");
addProp(get, "unpack", t_boolean);

View File

@@ -0,0 +1,15 @@
### Initial state
If no resource versions exist you can set up this resource to emit an initial version with a specified content. This won't create a real resource in S3 but only create an initial version for Concourse. The resource file will be created as usual when you `get` a resource with an initial version.
You can define one of the following two options:
* `initial_path`: *Optional.* Must be used with the `regexp` option. You should set this to the file path containing the initial version which would match the given regexp. E.g. if `regexp` is `file/build-(.*).zip`, then `initial_path` might be `file/build-0.0.0.zip`. The resource version will be `0.0.0` in this case.
* `initial_version`: *Optional.* Must be used with the `versioned_file` option. This will be the resource version.
By default the resource file will be created with no content when `get` runs. You can set the content by using one of the following options:
* `initial_content_text`: *Optional.* Initial content as a string.
* `initial_content_binary`: *Optional.* You can pass binary content as a base64 encoded string.

View File

@@ -0,0 +1,15 @@
### Initial state
If no resource versions exist you can set up this resource to emit an initial version with a specified content. This won't create a real resource in S3 but only create an initial version for Concourse. The resource file will be created as usual when you `get` a resource with an initial version.
You can define one of the following two options:
* `initial_path`: *Optional.* Must be used with the `regexp` option. You should set this to the file path containing the initial version which would match the given regexp. E.g. if `regexp` is `file/build-(.*).zip`, then `initial_path` might be `file/build-0.0.0.zip`. The resource version will be `0.0.0` in this case.
* `initial_version`: *Optional.* Must be used with the `versioned_file` option. This will be the resource version.
By default the resource file will be created with no content when `get` runs. You can set the content by using one of the following options:
* `initial_content_text`: *Optional.* Initial content as a string.
* `initial_content_binary`: *Optional.* You can pass binary content as a base64 encoded string.

View File

@@ -0,0 +1,15 @@
### Initial state
If no resource versions exist you can set up this resource to emit an initial version with a specified content. This won't create a real resource in S3 but only create an initial version for Concourse. The resource file will be created as usual when you `get` a resource with an initial version.
You can define one of the following two options:
* `initial_path`: *Optional.* Must be used with the `regexp` option. You should set this to the file path containing the initial version which would match the given regexp. E.g. if `regexp` is `file/build-(.*).zip`, then `initial_path` might be `file/build-0.0.0.zip`. The resource version will be `0.0.0` in this case.
* `initial_version`: *Optional.* Must be used with the `versioned_file` option. This will be the resource version.
By default the resource file will be created with no content when `get` runs. You can set the content by using one of the following options:
* `initial_content_text`: *Optional.* Initial content as a string.
* `initial_content_binary`: *Optional.* You can pass binary content as a base64 encoded string.

View File

@@ -0,0 +1,15 @@
### Initial state
If no resource versions exist you can set up this resource to emit an initial version with a specified content. This won't create a real resource in S3 but only create an initial version for Concourse. The resource file will be created as usual when you `get` a resource with an initial version.
You can define one of the following two options:
* `initial_path`: *Optional.* Must be used with the `regexp` option. You should set this to the file path containing the initial version which would match the given regexp. E.g. if `regexp` is `file/build-(.*).zip`, then `initial_path` might be `file/build-0.0.0.zip`. The resource version will be `0.0.0` in this case.
* `initial_version`: *Optional.* Must be used with the `versioned_file` option. This will be the resource version.
By default the resource file will be created with no content when `get` runs. You can set the content by using one of the following options:
* `initial_content_text`: *Optional.* Initial content as a string.
* `initial_content_binary`: *Optional.* You can pass binary content as a base64 encoded string.