Add schemas for RegistryImageRespource Parameters

This commit is contained in:
Kris De Volder
2019-10-21 11:24:46 -07:00
parent 3a4efe9c97
commit 0aac76979a
16 changed files with 172 additions and 1 deletions

View File

@@ -573,6 +573,35 @@ public class PipelineYmlSchema implements YamlSchema {
resourceTypes.def("docker-image", source, get, put);
}
//registry_image
{
AbstractType source = f.ybean("RegistryImageSource");
addProp(source, "repository", t_ne_string).isPrimary(true);
addProp(source, "tag", t_ne_string);
addProp(source, "username", t_ne_string);
addProp(source, "password", t_ne_string);
addProp(source, "debug", t_boolean);
{
AbstractType contentTrust = f.ybean("RegistryImageContentTrust");
addProp(contentTrust, "server", t_ne_string);
addProp(contentTrust, "repository_key_id", t_ne_string).isRequired(true);
addProp(contentTrust, "repository_key", t_ne_string).isRequired(true);
addProp(contentTrust, "repository_passphrase", t_ne_string).isRequired(true);
addProp(contentTrust, "tls_key", t_ne_string);
addProp(contentTrust, "tls_cert", t_ne_string);
addProp(source, "content_trust", contentTrust);
}
AbstractType get = f.ybean("RegistryImageGetParams");
addProp(get, "format", f.yenum("RegistryImageFormat", "rootfs", "oci"));
AbstractType put = f.ybean("RegistryImagePutParams");
addProp(put, "image", t_ne_string).isPrimary(true);
addProp(put, "additional_tags", t_ne_string);
resourceTypes.def("registry-image", source, get, put);
}
//s3
{
YType t_canned_acl = f.yenum("S3CannedAcl",

View File

@@ -0,0 +1 @@
*Required.* Target key used to sign the trusted collection.

View File

@@ -0,0 +1 @@
*Required.* Target key's ID used to sign the trusted collection, could be retrieved by `notary key list`

View File

@@ -0,0 +1 @@
*Required.* The passphrase of the signing/target key. (equal to `DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE`)

View File

@@ -0,0 +1 @@
*Optional.* URL for the notary server. (equal to `DOCKER_CONTENT_TRUST_SERVER`)

View File

@@ -0,0 +1 @@
*Optional. Default `""`* TLS certificate for the notary server.

View File

@@ -0,0 +1 @@
*Optional. Default `""`* TLS key for the notary server.

View File

@@ -0,0 +1 @@
*Optional. Default `rootfs`.* The format to fetch as.

View File

@@ -0,0 +1,3 @@
*Optional.* The path to a file with whitespace-separated
list of tag values to tag the image with (in addition to the tag configured in
`source`).

View File

@@ -0,0 +1 @@
*Required.* The path to the OCI image tarball to upload.

View File

@@ -0,0 +1,2 @@
*Optional. Default `false`.* If set, progress bars will be disabled
and debugging output will be printed instead.

View File

@@ -0,0 +1,4 @@
*Optional.* A password to use when
authenticating to the registry. Must be specified for private repos or when
using `put`.

View File

@@ -0,0 +1 @@
*Required*. The name of the repository, e.g. `alpine`.

View File

@@ -0,0 +1 @@
*Optional*. Default `latest`. The name of the tag to monitor and publish to.

View File

@@ -0,0 +1,4 @@
*Optional.* A username to use when
authenticating to the registry. Must be specified for private repos or when
using `put`.