Create Torque App

Action ID: torque:create-app
NPM Package:

@qtorque/backstage-plugin-torque-backend

Description

Creates a new Torque application using specified service name, asset and blueprint repositories, and configurations.

Input Schema

PropertyTypeDescriptionRequired
repoTypestring-
assetRepostringThe asset repo that will be connected to Torque
namespacestringThe namespace of the environment runner
serviceNamestringThe name of service that will be created in Torque
blueprintNamestringThe name of a blueprint you that will be a source for sandbox environment
blueprintRepostringThe blueprints repo that will be connected to Torque
serviceAccountstring-

Output Schema

No output schema defined for this action.

Usage Examples

Create a Torque app for a GitHub-hosted Node API

Creates a Torque application for a Node.js service using GitHub repositories. Use after fetch:template to generate source files.

Copy
steps:
  - id: fetchBase
    action: fetch:template
    input:
      url: ./skeleton
      targetPath: ./service
      values:
        name: ${{ parameters.serviceName }}

  - id: createTorqueApp
    action: torque:create-app
    input:
      serviceName: ${{ parameters.serviceName }}
      assetRepo: https://github.com/acme/platform-node-api
      blueprintRepo: https://github.com/acme/torque-blueprints
      namespace: platform-runner
      blueprintName: node-api-sandbox
      serviceAccount: torque-runner
      repoType: github

Create a Torque app using GitLab repos and a custom namespace

Creates a Torque application pointing to GitLab repositories with a dedicated environment runner namespace. Run after fetch:template.

Copy
steps:
  - id: fetchSkeleton
    action: fetch:template
    input:
      url: ./templates/node-service
      targetPath: ./service
      values:
        serviceName: ${{ parameters.serviceName }}

  - id: torqueCreateGitLab
    action: torque:create-app
    input:
      serviceName: ${{ parameters.serviceName }}
      assetRepo: https://gitlab.com/acme/payments-service
      blueprintRepo: https://gitlab.com/acme/torque-blueprints
      namespace: env-runner-payments
      blueprintName: payments-blueprint
      repoType: gitlab

Create a Torque app for a service with a specific runner service account

Creates a Torque application and binds it to a specific Kubernetes service account for the environment runner. Use after fetch:template.

Copy
steps:
  - id: fetchTemplate
    action: fetch:template
    input:
      url: ./scaffold/base
      targetPath: ./service
      values:
        name: ${{ parameters.serviceName }}

  - id: torqueCreateWithSA
    action: torque:create-app
    input:
      serviceName: ${{ parameters.serviceName }}
      assetRepo: https://github.com/acme/orders-api
      blueprintRepo: https://github.com/acme/torque-blueprints
      namespace: orders-runner
      blueprintName: orders-sandbox
      serviceAccount: torque-orders-sa

Create a Torque app with fully parameterized repos and blueprint

Creates a Torque application using repositories and a blueprint name provided by the template parameters. Place after fetch:template.

Copy
steps:
  - id: fetchBaseFiles
    action: fetch:template
    input:
      url: ./base
      targetPath: ./service
      values:
        service: ${{ parameters.serviceName }}

  - id: torqueCreateParameterized
    action: torque:create-app
    input:
      serviceName: ${{ parameters.serviceName }}
      assetRepo: ${{ parameters.assetRepo }}
      blueprintRepo: ${{ parameters.blueprintRepo }}
      namespace: ${{ parameters.namespace }}
      blueprintName: ${{ parameters.blueprintName }}

Create a Torque app using Azure DevOps blueprints and GitHub assets

Creates a Torque application where the asset repo is on GitHub and the blueprints repo is on Azure DevOps. Run after fetch:template.

Copy
steps:
  - id: fetchServiceTemplate
    action: fetch:template
    input:
      url: ./service-template
      targetPath: ./service
      values:
        name: ${{ parameters.serviceName }}

  - id: torqueCreateMixedRepos
    action: torque:create-app
    input:
      serviceName: ${{ parameters.serviceName }}
      assetRepo: https://github.com/acme/catalog-service
      blueprintRepo: https://dev.azure.com/acme/platform/_git/torque-blueprints
      namespace: catalog-runner
      blueprintName: catalog-sandbox
      serviceAccount: torque-catalog-sa
      repoType: github