Cloud customer?
 Upgrade in MyJFrog >

Search





Overview


A Pipelines user can view and manage lifecycle staging of each template version. In addition, a user can view the YAML and documentation for each template source.

Page Contents


Managing Templates

Pipelines users can view the catalog of successfully loaded templates, and manage lifecycle staging of each template version.

Viewing Templates

From the Application tab go to Pipelines | Templates, and select the Templates tab. The list of templates most recently synced from template sources are shown under Latest.

Name
The named type of the template.
Version
The current version of the template.
Status
The success/failure status of the last sync
Namespace
The namespace of the template.
Released at
The date and time when the template was released.
Retired at
The date and time when the template was retired.

Releasing Template Versions

When a template is added, it is added as the latest version of the template. However, whenever the template source syncs, the latest template can change. If you want to keep a specific version of a template, you have the option of releasing that version of the template.

A template that has been properly Git tagged with semantic version information can be formally released. When a template is released, it can be referenced by its version number. That version of the template continues to be available even after a new latest version has been synced from the template source.

After a version of a template is released, it cannot be changed. If any changes are to be made, a new release should be created.

To release the latest version of a template:

  1. Create a git tag in the template source repository using the format: <template namespace>/<template name>@<template version>.
    For example: shippable/foo@1.0.1.
  2. After a git tag is created in the template source, on the Templates page, in the Latest section, hover over the rightmost region of the row where the template is listed to reveal the Release icon, and then click.

  3. In the subsequent  Release Template  dialog, select the release tag from the dropdown, then click Confirm.


    The template is released and appears in the Released section. This template can now be used in a pipeline source.

Viewing the Version Log

  1. In Released, hover over the rightmost region of the row where the template is listed to reveal the Actions icon, and click Logs from the drop-down list.
  2. The Sync Logs for the released template is displayed.

Retiring Template Versions

Administrators can retire template versions, making them unavailable for further use. You can select an advance date for a version's retirement. Pipeline sources using a retired version of a template should be updated to use a different version of the template.

To retire a template version:

  1. In Released, hover over the rightmost region of the row where the template version is listed to reveal the Actions, and click Edit Retired Date from the drop-down list.
  2. In the resulting RETIRE TEMPLATE dialog, click the Pick a Date (From) box to reveal the calendar, select a date when the template is to be retired, then click Save.

The row of the Retired At is updated to show the retirement date.

  • If required, a template that is already retired can be unretired by changing the retire date to a future date. Unretired templates can be used in pipeline sources again.
  • If the template version has been scheduled for retirement, the logs show the upcoming retirement date with a warning. If a template version has already been retired, pipeline sync fails with an error.

Viewing YAML

To view the Template Definition and Values Example YAML, do one of the following:

  • In Released, hover over the rightmost region of the row where the template version is listed to reveal the Actions, and click View YAML from the drop-down list.


    or

  • In Latest, hover over the rightmost region of the row where the template is listed to reveal the View YAML icon, and then click.

Viewing Documentation

If you included a readme file along with your template files, you can view the contents of this file. To do this, in Latest, hover over the rightmost region of the row where the template is listed to reveal the Documentation icon, and then click.


Managing Template Sources

Template Source represents a source control repository (such as GitHub or BitBucket) where Pipelines template definition files can be found. A template source connects to the repository through an administration integration.

After a template source is added, Pipelines automatically loads all template definition files from that repository and its subdirectories. 

Adding a Template Source

A template source can be added only by an administrator user or a user with resource manager permissions. 

  • Only one template source can be added at this time.
  • When a template source is added, it is also added to Artifactory.

Prerequisites for template sources

  • An administration integration must be available for the source control account.
  • The source code repository for your templates must be structured according to the Structure of Template Source Repository.

To add a Template Source:

  1. From the  Application  module go to  Pipelines | Templates.
  2. Select the Template Sources tab, then click Add Template Source .
  3. In the resulting Add Template Source display, select the source control account integration, enter the repository path and branch, then click Create Source.

Pipelines then syncs the template source to load the templates. 

Viewing Template Sources

To view the the list of configured template sources, from the Application tab go to Pipelines | Templates, and click the Template Sources tab.

The tab displays the list of configured template sources that Pipelines will load templates from.

Each row of the template sources list includes the following:

Repository
The source repository path of the template source
Branch
The source repository branch
Latest Status
The success/failure status of the last sync
Last Sync
The time and date of the last sync
Changed By
The username of the VCS user who made the triggering change
Context
The commit SHA that triggered the last sync

Sync Template Source

When any of the pipeline config files have changed, you may need to manually sync the pipeline source to reload:

  1. Hover over the rightmost region of the row where the template source is listed to reveal the Actions, and click Sync from the drop-down list
  2. Click the Sync icon.

If the Latest Status indicates that the sync failed, click Logs to view the logs of all synchronized files.




Copyright © 2021 JFrog Ltd.