Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions scaffolder-templates/create-tenant/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ spec:
enum: ['dev', 'prod']

steps:
- id: createDevTenant
name: Create Dev tenant
- id: devTenantCheck
name: Check if Dev tenant
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The path is parameterizable, I think. so this should work:

path: {{ "proxy/tenant-manager-dev/api/tenant" if parameters.tenant_environment === 'dev' else "proxy/tenant-manager/api/tenant" }}

if: ${{parameters.tenant_environment === 'dev'}}
action: http:backstage:request
input:
Expand All @@ -52,8 +52,8 @@ spec:
"skipFailures": false
}

- id: createProdTenant
name: Create Prod tenant
- id: ProdTenantCheck
name: Check if Prod tenant
if: ${{parameters.tenant_environment === 'prod'}}
action: http:backstage:request
input:
Expand All @@ -67,6 +67,6 @@ spec:
"tenantEnvironment": "prod",
"skipFailures": false
}

output:
resp: ${{ steps.createDevTenant.output.body }} ${{ steps.createProdTenant.output.body }}
resp: ${{ steps.devTenantCheck.output.body }} ${{ steps.ProdTenantCheck.output.body }}
10 changes: 5 additions & 5 deletions scaffolder-templates/delete-tenant/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ spec:
ui:widget: radio

steps:
- id: deleteDevTenant
name: Delete Dev tenant
- id: devTenantCheck
name: Check if Dev tenant
if: ${{parameters.tenant_environment === 'dev'}}
action: http:backstage:request
input:
Expand All @@ -51,8 +51,8 @@ spec:
"skipFailures": false
}

- id: deleteProdTenant
name: Delete Prod tenant
- id: ProdTenantCheck
name: Check if Prod tenant
if: ${{parameters.tenant_environment === 'prod'}}
action: http:backstage:request
input:
Expand All @@ -67,4 +67,4 @@ spec:
}

output:
resp: ${{ steps.deleteDevTenant.output.body }} ${{ steps.deleteProdTenant.output.body }}
resp: ${{ steps.devTenantCheck.output.body }} ${{ steps.ProdTenantCheck.output.body }}