From c971afbf211166b79f208e59436a1943e5d22a71 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Wed, 10 Aug 2022 14:18:15 +0200 Subject: [PATCH] scaffolder-backend: deprecate publish:file action Signed-off-by: Patrik Oldsberg --- .changeset/fresh-rockets-yell.md | 5 +++++ plugins/scaffolder-backend/api-report.md | 2 +- .../src/scaffolder/actions/builtin/publish/file.ts | 5 +++++ 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 .changeset/fresh-rockets-yell.md diff --git a/.changeset/fresh-rockets-yell.md b/.changeset/fresh-rockets-yell.md new file mode 100644 index 0000000000..b8f597206e --- /dev/null +++ b/.changeset/fresh-rockets-yell.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-scaffolder-backend': patch +--- + +The `publish:file` action has been deprecated in favor of testing templates using the template editor instead. Note that this action is not and was never been installed by default. diff --git a/plugins/scaffolder-backend/api-report.md b/plugins/scaffolder-backend/api-report.md index de9a9e677f..7c24bdc572 100644 --- a/plugins/scaffolder-backend/api-report.md +++ b/plugins/scaffolder-backend/api-report.md @@ -303,7 +303,7 @@ export function createPublishBitbucketServerAction(options: { token?: string | undefined; }>; -// @public +// @public @deprecated export function createPublishFileAction(): TemplateAction<{ path: string; }>; diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/file.ts b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/file.ts index 2d2cb85930..52376e39a3 100644 --- a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/file.ts +++ b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/file.ts @@ -29,6 +29,7 @@ import { createTemplateAction } from '../../createTemplateAction'; * production, as it writes the files to the local filesystem of the scaffolder. * * @public + * @deprecated This action will be removed, prefer testing templates using the template editor instead. */ export function createPublishFileAction() { return createTemplateAction<{ path: string }>({ @@ -47,6 +48,10 @@ export function createPublishFileAction() { }, }, async handler(ctx) { + ctx.logger.warn( + '[DEPRECATED] This action will be removed, prefer testing templates using the template editor instead.', + ); + const { path } = ctx.input; const exists = await fs.pathExists(path);