Update registry_mirror schema

See: https://github.com/spring-projects/sts4/issues/752
This commit is contained in:
Kris De Volder
2022-04-27 12:32:02 -07:00
parent 809db5715e
commit a626e5813e
7 changed files with 63 additions and 5 deletions

View File

@@ -48,6 +48,7 @@ import org.springframework.ide.vscode.commons.yaml.schema.YTypeUtil;
import org.springframework.ide.vscode.commons.yaml.schema.YTypedProperty;
import org.springframework.ide.vscode.commons.yaml.schema.YValueHint;
import org.springframework.ide.vscode.commons.yaml.schema.YamlSchema;
import org.springframework.ide.vscode.commons.yaml.schema.constraints.Constraint;
import org.springframework.ide.vscode.commons.yaml.schema.constraints.Constraints;
import org.springframework.ide.vscode.concourse.ConcourseModel.ResourceModel;
import org.springframework.ide.vscode.concourse.ConcourseModel.StepModel;
@@ -596,6 +597,12 @@ public class PipelineYmlSchema implements YamlSchema {
}
//docker-image:
{
AbstractType registry_mirror = f.ybean("RegistryMirror");
addProp(registry_mirror, "host", t_ne_string).isPrimary(true);
addProp(registry_mirror, "username", t_ne_string);
addProp(registry_mirror, "password", t_ne_string);
AbstractType source = f.ybean("DockerImageSource");
addProp(source, "repository", t_ne_string).isPrimary(true);
addProp(source, "tag", t_ne_string);
@@ -605,7 +612,7 @@ public class PipelineYmlSchema implements YamlSchema {
addProp(source, "aws_secret_access_key", t_ne_string);
addProp(source, "aws_session_token", t_ne_string);
addProp(source, "insecure_registries", t_strings);
addProp(source, "registry_mirror", t_ne_string);
addProp(source, "registry_mirror", registry_mirror);
addProp(source, "ca_certs", f.yseq(f.ybean("CaCertsEntry",
f.yprop("domain", t_ne_string),
f.yprop("cert", t_ne_string)

View File

@@ -1 +1 @@
*Optional.* A URL pointing to a docker registry mirror service.
*Optional.* Hostname and credentials pointing to a docker registry mirror service.

View File

@@ -0,0 +1 @@
A hostname pointing to a Docker registry mirror service. Note that this is only used if no registry hostname prefix is specified in the `repository` key. If the `repository` contains a registry hostname, such as `my-registry.com/foo/bar`, the `registry_mirror` is ignored and the explicitly declared registry in the `repository` key is used.

View File

@@ -0,0 +1 @@
A password to use when authenticating to the mirror.

View File

@@ -0,0 +1 @@
A username to use when authenticating to the mirror.