Last updated Sep 12, 2023

Rate this page:

Create a template

Standardize your software creation workflow by creating templates that integrate best practices and adhere to your organization’s standards.

Templates are cataloged as components, include boilerplate code, and can include webhooks for automating the rest of your toolchain.

Learn more about templates

Before you begin

Install the GitHub app

To take the following steps, you must be a Compass admin.

  1. In the main navigation, select Apps.

  2. Find the GitHub app and select Install.

Once the GitHub app is installed, you need to configure the GitHub app with an organization account.

Configure the GitHub app with an organization account

  1. In the main navigation, select Apps.

  2. Find the GitHub app, select Configure, and allow the app to access your Atlassian account.

  3. Select Connect GitHub, and continue to GitHub’s permissions page.

  4. In GitHub, select the organization account you want to connect to.

Once you’re connected to a GitHub organization, you’ll be taken back to the GitHub app in Compass.

Have a GitHub template repository you want to fork

Components created from a template fork that template's repository. Make sure you have a GitHub repository link to add to the template.

Create a template

Start creating a template from anywhere in Compass by pressing c t.

  1. In the main navigation, select Templates.

  2. On the Templates page, select Create.

  3. Fill out the basic information for the template.

    • Name and describe the template, to help people generally understand how to use it.
    • Give the template an owner team, so people know who to contact if they need help using it.
    • Paste a GitHub repository link from one of your connected GitHub organization(s). Components created from the template will fork this repository for boilerplate code.
      • Forking private repositories require that the repository is from your connected GitHub organization(s)
      • Forking public repositories are supported for your connected GitHub organization(s), with one exception:
        • In the case where you have multiple GitHub organizations connected, you may only fork a public repository if the repository is from your connected GitHub organization(s).
  4. Select Next.

  5. Optionally paste a webhook link to send a JSON event when a component is created from the template.

    Compass will send an HTTP POST request to the webhook, sharing a JSON payload that describes the new component. This means you can continue automation or orchestration of a new software component in your development environment.

    To see what the event looks like, refer to the JSON event preview.

    You cannot add or edit a webhook after a template is created. We’re adding this functionality soon.

  6. Optionally add one or more parameters to the template. Learn more about parameters.

    Parameters are used in conjunction with the webhook, and all parameters and their values are sent in the webhook payload as shown in JSON event preview.

  7. Select Next. You'll be taken to the template's Review page.

  8. If you're happy with everything select Create.

Next steps

  1. Add more information to the template’s Overview page.

  2. Let your team know how they can use the template.

Troubleshooting

Check that you’re adding a valid GitHub repository link from the organization(s) connected to the GitHub app. In the case where you have multiple GitHub organizations connected, you may only fork a public repository if the repository is from your connected GitHub organization(s).

I created a template, but a webhook wasn't added to it

Sometimes this happens due to a network error. Delete the template and create a new one with the webhook you want to add.

I can't add parameters

There is currently a limit of 100 parameters per template. If you need more than 100 parameters please reach out as we'd love to chat with you!

Coming soon

We're working on improving templates with the following features:

  • Bitbucket and GitLab support.

  • Edit templates after they’re created.

  • Validate webhooks as templates are created.

  • Additional parameter types, such as single select and multi-select.

  • Customize webhook events to call third-party APIs when components are created from templates (for example, create a new service in Opsgenie each time a component is created from a template).

Rate this page: