Pause For Duration

Action ID: debug:wait
NPM Package:

@backstage/plugin-scaffolder-backend

Description

Waits for a certain period of time.

Input Schema

PropertyTypeDescriptionRequired
minutesnumberWaiting period in minutes.
secondsnumberWaiting period in seconds.
millisecondsnumberWaiting period in milliseconds.

Output Schema

No output schema defined for this action.

Usage Examples

Wait 30 seconds before registering the component

Adds a short pause after publishing to GitHub to allow repository metadata to settle before registering in the catalog. Place this between publish:github and catalog:register.

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

  - id: publish
    action: publish:github
    input:
      repoUrl: github.com?owner=acme-org&repo=${{ parameters.repoName }}

  - id: wait-for-github
    action: debug:wait
    input:
      seconds: 30

  - id: register
    action: catalog:register
    input:
      catalogInfoUrl: ${{ steps.publish.output.remoteUrl }}/blob/main/catalog-info.yaml

Simulate a slow step during template testing with minutes

Introduces a longer artificial delay to test how the template behaves under slow operations. Use this after fetch:template when you want to observe step progress in the UI.

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

  - id: slow-down
    action: debug:wait
    input:
      minutes: 2

  - id: publish
    action: publish:github
    input:
      repoUrl: github.com?owner=acme-org&repo=${{ parameters.repoName }}

Add a short millisecond pause to avoid rate limits

Uses a subsecond delay to reduce the chance of hitting API rate limits between rapid actions. Place this after fetch:template and before publishing.

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

  - id: tiny-wait
    action: debug:wait
    input:
      milliseconds: 750

  - id: publish
    action: publish:github
    input:
      repoUrl: github.com?owner=acme-org&repo=${{ parameters.repoName }}

Combine minutes and seconds for a precise pause

Waits for a precise window using both minutes and seconds, useful when external automation needs a specific amount of time to complete before continuing. Inserted between publish:github and catalog:register.

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

  - id: publish
    action: publish:github
    input:
      repoUrl: github.com?owner=acme-org&repo=${{ parameters.repoName }}

  - id: precise-wait
    action: debug:wait
    input:
      minutes: 1
      seconds: 30

  - id: register
    action: catalog:register
    input:
      catalogInfoUrl: ${{ steps.publish.output.remoteUrl }}/blob/main/catalog-info.yaml

Parameterize the wait based on user input

Lets users set the pause duration at runtime by passing a parameter. Useful to align with environment specific delays after fetch:template.

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

  - id: configurable-wait
    action: debug:wait
    input:
      seconds: ${{ parameters.waitSeconds }}

  - id: publish
    action: publish:github
    input:
      repoUrl: github.com?owner=acme-org&repo=${{ parameters.repoName }}

Other actions in @backstage/plugin-scaffolder-backend