Add old_name property to Resource schema
See: https://github.com/spring-projects/sts4/issues/633
This commit is contained in:
@@ -238,6 +238,7 @@ public class PipelineYmlSchema implements YamlSchema {
|
||||
addProp(t_resource, "tags", t_strings);
|
||||
addProp(t_resource, "webhook_token", t_ne_string);
|
||||
addProp(t_resource, "icon", t_ne_string);
|
||||
addProp(t_resource, "old_name", t_ne_string);
|
||||
|
||||
AbstractType t_image_resource = f.ybean("ImageResource");
|
||||
{
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
*Optional* The old name of the resource. If configured, the history of the old resource will be inherited to the new one. Once the pipeline is set, this field can be removed as the history has been transferred.
|
||||
|
||||
This can be used to rename a resource without losing its history, like so:
|
||||
|
||||
```
|
||||
resources:
|
||||
- name: new-name
|
||||
old_name: current-name
|
||||
type: git
|
||||
source: uri: "https://github.com/vito/booklit"
|
||||
```
|
||||
|
||||
After the pipeline is set, the resource was successfully renamed, so the `old_name` field can be removed from the resource:
|
||||
|
||||
```
|
||||
resources:
|
||||
- name: new-name
|
||||
type: git
|
||||
source: uri: "https://github.com/vito/booklit"
|
||||
```
|
||||
Reference in New Issue
Block a user