Add tests and hovers for docker-image source attributes.

This commit is contained in:
Kris De Volder
2017-01-22 11:35:29 -08:00
parent 5087c8a647
commit fa6ab481d0
12 changed files with 181 additions and 5 deletions

View File

@@ -264,13 +264,16 @@ public class PipelineYmlSchema implements YamlSchema {
addProp(source, "aws_access_key_id", t_ne_string);
addProp(source, "aws_secret_access_key", t_ne_string);
addProp(source, "insecure_registries", t_strings);
addProp(source, "registry_mirror", t_strings);
YBeanType t_cert_entry = f.ybean("DomainAndCert",
addProp(source, "registry_mirror", t_ne_string);
addProp(source, "ca_certs", f.yseq(f.ybean("CaCertsEntry",
f.yprop("domain", t_ne_string),
f.yprop("cert", t_ne_string)
);
addProp(source, "ca_certs", f.yseq(t_cert_entry));
addProp(source, "client_certs", f.yseq(t_cert_entry));
)));
addProp(source, "client_certs", f.yseq(f.ybean("ClientCertsEntry",
f.yprop("domain", t_ne_string),
f.yprop("key", t_ne_string),
f.yprop("cert", t_ne_string)
)));
YBeanType get = f.ybean("DockerImageGetParams");
addProp(get, "save", t_boolean);

View File

@@ -0,0 +1,2 @@
*Optional.* AWS access key to use for acquiring ECR
credentials.

View File

@@ -0,0 +1,2 @@
*Optional.* AWS secret key to use for acquiring ECR
credentials.

View File

@@ -0,0 +1,25 @@
*Optional.* An array of objects with the following format:
```yaml
ca_certs:
- domain: example.com:443
cert: |
-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----
- domain: 10.244.6.2:443
cert: |
-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----
```
Each entry specifies the x509 CA certificate for the trusted docker registry
residing at the specified domain. This is used to validate the certificate of
the docker registry when the registry's certificate is signed by a custom
authority (or itself).
The domain should match the first component of `repository`, including the
port. If the registry specified in `repository` does not use a custom cert,
adding `ca_certs` will break the check script. This option is overridden by
entries in `insecure_registries` with the same address or a matching CIDR.

View File

@@ -0,0 +1,27 @@
*Optional.* An array of objects with the following format:
```yaml
client_certs:
- domain: example.com:443
cert: |
-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----
key: |
-----BEGIN RSA PRIVATE KEY-----
...
-----END RSA PRIVATE KEY-----
- domain: 10.244.6.2:443
cert: |
-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----
key: |
-----BEGIN RSA PRIVATE KEY-----
...
-----END RSA PRIVATE KEY-----
```
Each entry specifies the x509 certificate and key to use for authenticating
against the docker registry residing at the specified domain. The domain
should match the first component of `repository`, including the port.

View File

@@ -0,0 +1,3 @@
*Optional.* An array of CIDRs or `host:port` addresses
to whitelist for insecure access (either `http` or unverified `https`).
This option overrides any entries in `ca_certs` with the same address.

View File

@@ -0,0 +1 @@
*Optional.* The password to use when authenticating.

View File

@@ -0,0 +1 @@
*Optional.* A URL pointing to a docker registry mirror service.

View File

@@ -0,0 +1,2 @@
*Required.* The name of the repository, e.g.
`concourse/docker-image-resource`.

View File

@@ -0,0 +1 @@
*Optional.* The tag to track. Defaults to `latest`.

View File

@@ -0,0 +1 @@
*Optional.* The username to authenticate with when pushing.