diff --git a/plugins/scaffolder-backend/api-report.md b/plugins/scaffolder-backend/api-report.md
index b059a30d9b..1b2676cd00 100644
--- a/plugins/scaffolder-backend/api-report.md
+++ b/plugins/scaffolder-backend/api-report.md
@@ -40,6 +40,7 @@ export type ActionContext = {
output(name: string, value: JsonValue): void;
createTemporaryDirectory(): Promise;
templateInfo?: TemplateInfo;
+ isDryRun?: boolean;
};
// @public
@@ -550,6 +551,8 @@ export interface TaskContext {
// (undocumented)
getWorkspaceName(): Promise;
// (undocumented)
+ isDryRun?: boolean;
+ // (undocumented)
secrets?: TaskSecrets;
// (undocumented)
spec: TaskSpec;
@@ -665,6 +668,7 @@ export class TaskWorker {
export type TemplateAction = {
id: string;
description?: string;
+ supportsDryRun?: boolean;
schema?: {
input?: Schema;
output?: Schema;
diff --git a/plugins/scaffolder/api-report.md b/plugins/scaffolder/api-report.md
index 229737eaf6..f7314390df 100644
--- a/plugins/scaffolder/api-report.md
+++ b/plugins/scaffolder/api-report.md
@@ -25,6 +25,7 @@ import { default as React_2 } from 'react';
import { RouteRef } from '@backstage/core-plugin-api';
import { ScmIntegrationRegistry } from '@backstage/integration';
import { TaskSpec } from '@backstage/plugin-scaffolder-common';
+import { TaskStep } from '@backstage/plugin-scaffolder-common';
import { TemplateEntityV1beta3 } from '@backstage/plugin-scaffolder-common';
// @public
@@ -226,6 +227,8 @@ export type RouterProps = {
// @public
export interface ScaffolderApi {
+ // (undocumented)
+ dryRun?(options: ScaffolderDryRunOptions): Promise;
// (undocumented)
getIntegrationsList(
options: ScaffolderGetIntegrationsListOptions,
@@ -256,6 +259,8 @@ export class ScaffolderClient implements ScaffolderApi {
useLongPollingLogs?: boolean;
});
// (undocumented)
+ dryRun(options: ScaffolderDryRunOptions): Promise;
+ // (undocumented)
getIntegrationsList(
options: ScaffolderGetIntegrationsListOptions,
): Promise;
@@ -274,6 +279,37 @@ export class ScaffolderClient implements ScaffolderApi {
streamLogs(options: ScaffolderStreamLogsOptions): Observable;
}
+// @public (undocumented)
+export interface ScaffolderDryRunOptions {
+ // (undocumented)
+ content: {
+ path: string;
+ base64Content: string;
+ }[];
+ // (undocumented)
+ secrets: JsonObject;
+ // (undocumented)
+ template: JsonValue;
+ // (undocumented)
+ values: JsonObject;
+}
+
+// @public (undocumented)
+export interface ScaffolderDryRunResponse {
+ // (undocumented)
+ content: Array<{
+ path: string;
+ base64Content: string;
+ executable: boolean;
+ }>;
+ // (undocumented)
+ log: Array;
+ // (undocumented)
+ output: ScaffolderTaskOutput;
+ // (undocumented)
+ steps: TaskStep[];
+}
+
// @public
export const ScaffolderFieldExtensions: React_2.ComponentType;
diff --git a/plugins/scaffolder/src/index.ts b/plugins/scaffolder/src/index.ts
index fc132f644c..c42dc95f9e 100644
--- a/plugins/scaffolder/src/index.ts
+++ b/plugins/scaffolder/src/index.ts
@@ -25,6 +25,8 @@ export type {
ListActionsResponse,
LogEvent,
ScaffolderApi,
+ ScaffolderDryRunOptions,
+ ScaffolderDryRunResponse,
ScaffolderGetIntegrationsListOptions,
ScaffolderGetIntegrationsListResponse,
ScaffolderOutputLink,
diff --git a/plugins/scaffolder/src/types.ts b/plugins/scaffolder/src/types.ts
index 1291cd9951..1044d36823 100644
--- a/plugins/scaffolder/src/types.ts
+++ b/plugins/scaffolder/src/types.ts
@@ -150,6 +150,7 @@ export interface ScaffolderStreamLogsOptions {
after?: number;
}
+/** @public */
export interface ScaffolderDryRunOptions {
template: JsonValue;
values: JsonObject;
@@ -157,6 +158,7 @@ export interface ScaffolderDryRunOptions {
content: { path: string; base64Content: string }[];
}
+/** @public */
export interface ScaffolderDryRunResponse {
content: Array<{
path: string;