Provisioning: Add bulk move job (#108762)
* Add move job to spec * Add move worker * Single commit mode * Add initial integration tests * Format code * Improve test setup * Add fixes for integration tests * Implement move operation * Format file * Fix API documentation
This commit is contained in:
@@ -3078,11 +3078,12 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"action": {
|
||||
"description": "Possible enum values:\n - `\"delete\"` deletes files in the remote repository\n - `\"migrate\"` acts like JobActionExport, then JobActionPull. It also tries to preserve the history.\n - `\"pr\"` adds additional useful information to a PR, such as comments with preview links and rendered images.\n - `\"pull\"` replicates the remote branch in the local copy of the repository.\n - `\"push\"` replicates the local copy of the repository in the remote branch.",
|
||||
"description": "Possible enum values:\n - `\"delete\"` deletes files in the remote repository\n - `\"migrate\"` acts like JobActionExport, then JobActionPull. It also tries to preserve the history.\n - `\"move\"` moves files in the remote repository\n - `\"pr\"` adds additional useful information to a PR, such as comments with preview links and rendered images.\n - `\"pull\"` replicates the remote branch in the local copy of the repository.\n - `\"push\"` replicates the local copy of the repository in the remote branch.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"delete",
|
||||
"migrate",
|
||||
"move",
|
||||
"pr",
|
||||
"pull",
|
||||
"push"
|
||||
@@ -3104,6 +3105,14 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"move": {
|
||||
"description": "Move when the action is `move`",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/com.github.grafana.grafana.pkg.apis.provisioning.v0alpha1.MoveJobOptions"
|
||||
}
|
||||
]
|
||||
},
|
||||
"pr": {
|
||||
"description": "Pull request options",
|
||||
"allOf": [
|
||||
@@ -3229,6 +3238,27 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"com.github.grafana.grafana.pkg.apis.provisioning.v0alpha1.MoveJobOptions": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"paths": {
|
||||
"description": "Paths to be deleted. Examples: - dashboard.json (for a file) - a/b/c/other-dashboard.json (for a file) - nested/deep/ (for a directory) FIXME: we should validate this in admission hooks",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"default": ""
|
||||
}
|
||||
},
|
||||
"ref": {
|
||||
"description": "Ref to the branch or commit hash that should move",
|
||||
"type": "string"
|
||||
},
|
||||
"targetPath": {
|
||||
"description": "Destination path for the move (e.g. \"new-location/\")",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"com.github.grafana.grafana.pkg.apis.provisioning.v0alpha1.PullRequestJobOptions": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
||||
Reference in New Issue
Block a user