Create MTA Application

Action ID: mta:createApplication
NPM Package:

@backstage-community/backstage-plugin-scaffolder-backend-module-mta

Description

Create application in MTA

Input Schema

No input schema defined for this action.

Output Schema

No output schema defined for this action.

Usage Examples

Create an MTA application during service scaffolding

This example creates an application in MTA as part of a typical scaffolding flow. It fetches a project skeleton with fetch:template, creates the MTA application, publishes the new repository with publish:github, and registers it with catalog:register.

Copy
steps:
  - id: fetch-base
    action: fetch:template
    input:
      url: ./skeleton
      targetPath: .
      values:
        name: ${{ parameters.name }}
        owner: ${{ parameters.owner }}
        description: ${{ parameters.description }}

  - id: create-mta-app
    action: mta:createApplication

  - id: publish-repo
    action: publish:github
    input:
      repoUrl: github.com?owner=${{ parameters.owner }}&repo=${{ parameters.name }}
      defaultBranch: main
      protectDefaultBranch: true
      repoVisibility: private

  - id: register
    action: catalog:register
    input:
      repoContentsUrl: ${{ steps['publish-repo'].output.repoContentsUrl }}
      catalogInfoPath: catalog-info.yaml

Create an MTA application only when requested

This example creates the MTA application conditionally based on a template parameter. Use it when teams can opt in to MTA provisioning while the rest of the workflow still runs, including fetch:template, publish:github, and catalog:register.

Copy
steps:
  - id: fetch-base
    action: fetch:template
    input:
      url: ./skeleton
      targetPath: .
      values:
        name: ${{ parameters.name }}
        owner: ${{ parameters.owner }}
        system: ${{ parameters.system }}
        lifecycle: production

  - id: publish-repo
    action: publish:github
    input:
      repoUrl: github.com?owner=${{ parameters.owner }}&repo=${{ parameters.name }}
      defaultBranch: main
      protectDefaultBranch: true
      repoVisibility: internal

  - id: create-mta-app
    if: ${{ parameters.createInMta }}
    action: mta:createApplication

  - id: register
    action: catalog:register
    input:
      repoContentsUrl: ${{ steps['publish-repo'].output.repoContentsUrl }}
      catalogInfoPath: catalog-info.yaml