Merge pull request #9573 from backstage/blam/deprecations/metadata

deprecations: Some deprecations for the `specs` in `scaffolder-common`
This commit is contained in:
Ben Lambert
2022-02-18 11:36:38 +01:00
committed by GitHub
19 changed files with 132 additions and 52 deletions
+14 -4
View File
@@ -15,9 +15,9 @@ export type TaskSpec = TaskSpecV1beta2 | TaskSpecV1beta3;
export interface TaskSpecV1beta2 {
// (undocumented)
apiVersion: 'backstage.io/v1beta2';
// (undocumented)
// @deprecated (undocumented)
baseUrl?: string;
// (undocumented)
// @deprecated (undocumented)
metadata?: TemplateMetadata;
// (undocumented)
output: {
@@ -26,6 +26,8 @@ export interface TaskSpecV1beta2 {
// (undocumented)
steps: TaskStep[];
// (undocumented)
templateInfo?: TemplateInfo;
// (undocumented)
values: JsonObject;
}
@@ -33,9 +35,9 @@ export interface TaskSpecV1beta2 {
export interface TaskSpecV1beta3 {
// (undocumented)
apiVersion: 'scaffolder.backstage.io/v1beta3';
// (undocumented)
// @deprecated (undocumented)
baseUrl?: string;
// (undocumented)
// @deprecated (undocumented)
metadata?: TemplateMetadata;
// (undocumented)
output: {
@@ -45,6 +47,8 @@ export interface TaskSpecV1beta3 {
parameters: JsonObject;
// (undocumented)
steps: TaskStep[];
// (undocumented)
templateInfo?: TemplateInfo;
}
// @public
@@ -116,6 +120,12 @@ export interface TemplateEntityV1beta3 extends Entity {
export const templateEntityV1beta3Validator: KindValidator;
// @public
export type TemplateInfo = {
entityRef: string;
baseUrl?: string;
};
// @public @deprecated
export type TemplateMetadata = {
name: string;
};
+18
View File
@@ -21,11 +21,23 @@ import { JsonValue, JsonObject } from '@backstage/types';
* stored in the database.
*
* @public
* @deprecated use templateInfo on the spec instead
*/
export type TemplateMetadata = {
name: string;
};
/**
* Information about a template that is stored on a task specification.
* Includes a stringified entityRef, and the baseUrl which is usually the relative path of the template definition
*
* @public
*/
export type TemplateInfo = {
entityRef: string;
baseUrl?: string;
};
/**
* An individual step of a scaffolder task, as stored in the database.
*
@@ -49,11 +61,14 @@ export interface TaskStep {
*/
export interface TaskSpecV1beta2 {
apiVersion: 'backstage.io/v1beta2';
/** @deprecated use templateInfo.baseUrl instead */
baseUrl?: string;
values: JsonObject;
steps: TaskStep[];
output: { [name: string]: string };
/** @deprecated use templateInfo instead */
metadata?: TemplateMetadata;
templateInfo?: TemplateInfo;
}
/**
@@ -64,11 +79,14 @@ export interface TaskSpecV1beta2 {
*/
export interface TaskSpecV1beta3 {
apiVersion: 'scaffolder.backstage.io/v1beta3';
/** @deprecated use templateInfo.baseUrl instead */
baseUrl?: string;
parameters: JsonObject;
steps: TaskStep[];
output: { [name: string]: JsonValue };
/** @deprecated use templateInfo instead */
metadata?: TemplateMetadata;
templateInfo?: TemplateInfo;
}
/**