Run Templates

Recognize your deployment patterns and put them into Run Templates.

A run template is a named set of environment variables along with their values.

It can be used to quickly start a new pipeline with a specific environment, for example, to deploy a branch on a particular server (e.g., staging or production).

Defined run templates are accessible in the New Pipeline button’s dropdown on Pipelines List and Pull Request pages.

Run Templates settings are available on both Project & Repository levels and can be accessed by the following path:

  • ProjectProject SettingsSNAKE CIRun Templates
  • RepositoryRepository SettingsSNAKE CIRun Templates

New Run Template

Click on the Add Template button to add a new run template.

add-template

The name of template will be used in the New Pipeline button’s dropdown on Pipelines List and Pull Request pages. The description will be used as a tooltip of the specified Run Template.

After creating a run template you will see a page where you can specify Environment Variables for this specific Run Template. These environment variables will be passed to the runner when you run a new pipeline using specified Run Template.

On this page you can also edit, modify, and delete run templates and their environment variables.

Example

Let’s define a few run templates for deploying to development, staging and production environments.

  1. Define two run templates to deploy the project to the staging and the production environments on the Project level.

    screenshot

  2. Define a run template to deploy to the development environment.

    screenshot

  3. Navigate to the Pipelines List or the Pull Request page and click on the New Pipeline button, you can see both repository and project level run templates.

    screenshot

  4. Pressing on an item from the list will pop up the dialog where you can adjust environment variables or even add a few new ones.

    Press Run to start the specified Run Template and deploy the specified branch to the specified environment.

Still have questions?

Contact us or join our Slack!



Last modified July 27, 2020