Skip to main content

Account and Application Templates

This content is for Harness FirstGen. Switch to NextGen.Harness includes an account-wide Template Library, called the Shared Template Library, and an Application-wide Template Library.

Only members of a Harness User Group with the Manage Template Library permission may create, edit, and delete Account and Application-level templates. Members of a User Group with this permission disabled can view and link to templates only.

Before You Begin

Shared Template Library and Application Template Library

The Shared Template Library is available from Setup and the Application Template Library is available in each Application.

Using templates from either source works the same way, and both options are available in Harness components, but Application templates may be used within their Application only.

For example, when you click Add Command in the Service, you see the option to select a template from the Application or Shared Template Library.

Template YAML

When you look at the code for an Application containing Services or Workflows using linked templates, the YAML for the template information of the command is displayed like this:

- type: SHELL_SCRIPT  
name: DocExample
sweepingOutputScope: null
connectionAttributes: null
publishAsVar: false
commandPath: null
scriptType: BASH
host: null
scriptString: echo "Hello" ${name}
timeoutMillis: 600000
sshKeyRef: null
executeOnDelegate: true
sweepingOutputName: null
tags: ''
templateUri: AccountName/DocExample:latest
- name: name

Next Steps