Add support for missing properties in...
... CF resource 'put' params in Concourse Editor. Adding support for the following: - vars - vars_files - docker_username - docker_password - show_app_log - no_start See: https://github.com/spring-projects/sts4/issues/330
This commit is contained in:
@@ -745,6 +745,13 @@ public class PipelineYmlSchema implements YamlSchema {
|
||||
addProp(put, "path", t_ne_string);
|
||||
addProp(put, "current_app_name", t_ne_string);
|
||||
addProp(put, "environment_variables", t_string_params);
|
||||
addProp(put, "vars", t_params);
|
||||
addProp(put, "vars_files", t_strings);
|
||||
addProp(put, "docker_username", t_ne_string);
|
||||
addProp(put, "docker_password", t_ne_string);
|
||||
addProp(put, "show_app_log", t_boolean);
|
||||
addProp(put, "no_start", t_boolean);
|
||||
put.require(Constraints.mutuallyExclusive("no_start", "current_app_name"));
|
||||
|
||||
resourceTypes.def("cf", source, get, put);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
*Optional*. This should be the users password when authenticating against a protected docker registry.
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
*Optional*. This is used as the username to authenticate against a protected docker registry.
|
||||
@@ -0,0 +1 @@
|
||||
*Optional*. Deploys the app but does not start it. This parameter is ignored when `current_app_name` is specified.
|
||||
@@ -0,0 +1,2 @@
|
||||
*Optional*. Tails the app log during startup, useful to debug issues when using blue/green deploys together with the `current_app_name` option.
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
*Optional*. Map of variables to pass to manifest
|
||||
@@ -0,0 +1 @@
|
||||
*Optional*. List of variables files to pass to manifest.
|
||||
@@ -4561,7 +4561,7 @@ public class ConcourseEditorTest {
|
||||
editor.assertHoverContains("verbose", "Invoke `cf` cli using `CF_TRACE=true`");
|
||||
}
|
||||
|
||||
@Test public void cfPutParamsHovers() throws Exception {
|
||||
@Test public void cfPutParamsReconcileAndHovers() throws Exception {
|
||||
Editor editor = harness.newEditor(
|
||||
"resources:\n" +
|
||||
"- name: pws\n" +
|
||||
@@ -4576,12 +4576,30 @@ public class ConcourseEditorTest {
|
||||
" current_app_name: the-name\n" +
|
||||
" environment_variables:\n" +
|
||||
" key: value\n" +
|
||||
" key2: value2\n"
|
||||
" key2: value2\n" +
|
||||
" vars: {}\n" +
|
||||
" vars_files: []\n" +
|
||||
" docker_username: mike\n" +
|
||||
" docker_password: ((secret))\n" +
|
||||
" show_app_log: true\n" +
|
||||
" no_start: false\n"
|
||||
);
|
||||
|
||||
editor.assertProblems(
|
||||
"current_app_name|Only one of 'no_start' and 'current_app_name' should be defined",
|
||||
"no_start|Only one of 'no_start' and 'current_app_name' should be defined"
|
||||
);
|
||||
|
||||
editor.assertHoverContains("manifest", "Path to a application manifest file");
|
||||
editor.assertHoverContains("path", "Path to the application to push");
|
||||
editor.assertHoverContains("current_app_name", "zero-downtime deploy");
|
||||
editor.assertHoverContains("environment_variables", "Environment variables");
|
||||
editor.assertHoverContains("vars", "variables to pass");
|
||||
editor.assertHoverContains("vars_files", "variables files to pass");
|
||||
editor.assertHoverContains("docker_username", "username to authenticate");
|
||||
editor.assertHoverContains("docker_password", "password when authenticating");
|
||||
editor.assertHoverContains("show_app_log", "Tails the app log");
|
||||
editor.assertHoverContains("no_start", "does not start it");
|
||||
}
|
||||
|
||||
@Test public void bug_152918825_no_reconciling_for_double_parens_placeholders() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user