diff --git a/plugins/scaffolder-backend/sample-templates/springboot-template/template.yaml b/plugins/scaffolder-backend/sample-templates/springboot-template/template.yaml index 681e8e7f51..1bc19db2db 100644 --- a/plugins/scaffolder-backend/sample-templates/springboot-template/template.yaml +++ b/plugins/scaffolder-backend/sample-templates/springboot-template/template.yaml @@ -11,3 +11,16 @@ spec: processor: cookiecutter type: service path: '.' + schema: + required: + - component_id + - description + properties: + component_id: + title: Name + type: string + description: Unique name of the component + description: + title: Description + type: string + description: Description of the component diff --git a/plugins/scaffolder-backend/src/service/router.ts b/plugins/scaffolder-backend/src/service/router.ts index 888bce0d2a..abe12c94eb 100644 --- a/plugins/scaffolder-backend/src/service/router.ts +++ b/plugins/scaffolder-backend/src/service/router.ts @@ -106,7 +106,7 @@ export async function createRouter( { name: 'Run the templater', handler: async (ctx: StageContext<{ skeletonDir: string }>) => { - const resultDir = await templater.run({ + const { resultDir } = await templater.run({ directory: ctx.skeletonDir, dockerClient, logStream: ctx.logStream, diff --git a/plugins/scaffolder/src/api.ts b/plugins/scaffolder/src/api.ts index 585a49ad78..0e4df2fd41 100644 --- a/plugins/scaffolder/src/api.ts +++ b/plugins/scaffolder/src/api.ts @@ -52,7 +52,8 @@ export class ScaffolderApi { headers: { 'Content-Type': 'application/json', }, - body: JSON.stringify({ template, values }), + // TODO(shmidt-i): when repo picker is implemented, take isOrg from it + body: JSON.stringify({ template, ...values, isOrg: true }), }); if (response.status !== 201) {