Add support for missing GitSource properties:
- private_key_user - private_key_passphrase - forward_agent - tag_regex - submodule_credentials - git_crypt_key - https_tunnel - commit_filter - version_depth
This commit is contained in:
@@ -524,23 +524,47 @@ public class PipelineYmlSchema implements YamlSchema {
|
||||
AbstractType t_git_repo_uri = f.yatomic("GitRepoUri");
|
||||
t_git_repo_uri.setCustomContentAssistant(new GithubRepoContentAssistant(github));
|
||||
t_git_repo_uri.parseWith(GithubValueParsers.uri(github));
|
||||
|
||||
AbstractType t_https_tunnel = f.ybean("HttpsTunnel");
|
||||
addProp(t_https_tunnel, "proxy_host", t_ne_string).isRequired(true);
|
||||
addProp(t_https_tunnel, "proxy_port", t_pos_integer).isRequired(true);
|
||||
addProp(t_https_tunnel, "proxy_user", t_ne_string);
|
||||
addProp(t_https_tunnel, "proxy_password", t_ne_string);
|
||||
|
||||
AbstractType t_commit_filters = f.ybean("CommitFilters");
|
||||
addProp(t_commit_filters, "exclude", f.yseq(t_ne_string));
|
||||
addProp(t_commit_filters, "include", f.yseq(t_ne_string));
|
||||
|
||||
AbstractType source = f.ybean("GitSource");
|
||||
addProp(source, "uri", t_git_repo_uri).isPrimary(true);
|
||||
addProp(source, "branch", t_ne_string); //It's more complicated than that! Its only required in 'put' step. So we'll check this as a contrain in put steps!
|
||||
addProp(source, "branch", t_ne_string); //It's more complicated than that! Its only required in 'put' step. So we'll check this as a contraint in put steps!
|
||||
addProp(source, "private_key", t_ne_string);
|
||||
addProp(source, "private_key_user", t_ne_string);
|
||||
addProp(source, "private_key_passphrase", t_ne_string);
|
||||
addProp(source, "forward_agent", t_boolean);
|
||||
addProp(source, "username", t_ne_string);
|
||||
addProp(source, "password", t_string);
|
||||
addProp(source, "paths", t_strings);
|
||||
addProp(source, "ignore_paths", t_strings);
|
||||
addProp(source, "skip_ssl_verification", t_boolean);
|
||||
addProp(source, "tag_filter", t_string);
|
||||
addProp(source, "tag_filter", t_ne_string);
|
||||
addProp(source, "tag_regex", t_ne_string);
|
||||
addProp(source, "fetch_tags", t_boolean);
|
||||
addProp(source, "submodule_credentials", f.yseq(f.ybean("SubmoduleCredential",
|
||||
f.yprop("host", t_ne_string).isRequired(true),
|
||||
f.yprop("username", t_ne_string).isRequired(true),
|
||||
f.yprop("password", t_ne_string).isRequired(true)
|
||||
)));
|
||||
addProp(source, "git_config", t_pair_list);
|
||||
addProp(source, "disable_ci_skip", t_boolean);
|
||||
addProp(source, "commit_verification_keys", t_strings);
|
||||
addProp(source, "commit_verification_key_ids", t_strings);
|
||||
addProp(source, "gpg_keyserver", t_string);
|
||||
addProp(source, "gpg_keyserver", t_ne_string);
|
||||
addProp(source, "git_crypt_key", t_ne_string);
|
||||
addProp(source, "https_tunnel", t_https_tunnel);
|
||||
addProp(source, "commit_filter", t_commit_filters);
|
||||
addProp(source, "version_depth", t_strictly_pos_integer);
|
||||
source.require(Constraints.mutuallyExclusive("tag_filter", "tag_regex"));
|
||||
|
||||
AbstractType get = f.ybean("GitGetParams");
|
||||
addProp(get, "depth", t_pos_integer);
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
*Optional.* Array containing strings that should cause a commit to be skipped
|
||||
@@ -0,0 +1 @@
|
||||
*Optional.* Array continuing strings that *MUST* be included in commit messages for the commit to not be skipped
|
||||
@@ -0,0 +1,7 @@
|
||||
*Optional.* Object containing commit message filters
|
||||
|
||||
* `commit_filter.exclude`: *Optional.* Array containing strings that should
|
||||
cause a commit to be skipped
|
||||
* `commit_filter.include`: *Optional.* Array continuing strings that
|
||||
*MUST* be included in commit messages for the commit to not be
|
||||
skipped
|
||||
@@ -0,0 +1 @@
|
||||
*Optional*. Enables ForwardAgent SSH option when set to true. Useful when using proxy/jump hosts. Defaults to false.
|
||||
@@ -0,0 +1,4 @@
|
||||
*Optional.* Base64 encoded
|
||||
[git-crypt](https://github.com/AGWA/git-crypt) key. Setting this
|
||||
will unlock / decrypt the repository with `git-crypt`. To get the key simply
|
||||
execute `git-crypt export-key -- - | base64` in an encrypted repository.
|
||||
@@ -0,0 +1,8 @@
|
||||
*Optional.* Information about an HTTPS proxy that will be used to tunnel SSH-based git commands over.
|
||||
|
||||
Has the following sub-properties:
|
||||
* `proxy_host`: *Required.* The host name or IP of the proxy server
|
||||
* `proxy_port`: *Required.* The proxy server's listening port
|
||||
* `proxy_user`: *Optional.* If the proxy requires authentication, use this username
|
||||
* `proxy_password`: *Optional.* If the proxy requires authenticate,
|
||||
use this password
|
||||
@@ -0,0 +1 @@
|
||||
*Optional*. To unlock `private_key` if it is protected by a passphrase
|
||||
@@ -0,0 +1 @@
|
||||
*Optional*. Enables setting User in the ssh config.
|
||||
@@ -0,0 +1,9 @@
|
||||
*Optional*. List of credentials for HTTP(s) auth when pulling/pushing private git submodules which are not stored in the same git server as the container repository. Example:
|
||||
|
||||
```
|
||||
submodule_credentials:
|
||||
- host: github.com
|
||||
username: git-user
|
||||
password: git-password
|
||||
- <another-configuration>
|
||||
```
|
||||
@@ -0,0 +1,2 @@
|
||||
*Optional*. If specified, the resource will only detect commits that have a tag matching the expression that have been made against the branch.
|
||||
Patterns are grep compatible (extended matching enabled, matches entire lines only). Ignored if `tag_filter` is also specified.
|
||||
@@ -0,0 +1 @@
|
||||
*Optional.* The number of versions to return when performing a check
|
||||
@@ -0,0 +1 @@
|
||||
*Required.* The host name or IP of the proxy server
|
||||
@@ -0,0 +1 @@
|
||||
*Optional.* If the proxy requires authenticate, use this password
|
||||
@@ -0,0 +1 @@
|
||||
*Required.* The proxy server's listening port
|
||||
@@ -0,0 +1 @@
|
||||
*Optional.* If the proxy requires authentication, use this username
|
||||
Reference in New Issue
Block a user