Cloud customer?
Start for Free >
Upgrade in MyJFrog >
What's New in Cloud >

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 | Extensions & Templates, and select the Templates tab to view the list of templates.

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. Go to your Github repository and perform these steps:
    1. In Github, go to the templates repository.

      System template files should be stored in the template source repository in a specific order for them to be uploaded to Pipelines. For more information, see Structure of Template Source Repository.

    2. Click Releases.

    3. Click Draft a new release.
    4. In the page that appears, click the Tag version field and enter a git tag using the format: <template_namespace>/<template_name>@<semver>.
    5. Click Publish release.
      When the new version is published, Pipelines automatically syncs and makes this version available for release, as shown in the next steps.
  2. In the JFrog Platform, from the Application tab go to Pipelines | Extensions & Templates, and select the Templates tab.
  3.  To release a specific template, either right-click or hover over the rightmost region of the row where the template is listed to reveal the Actions icon, and then click Release.

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


    The template is released and can now be used in a pipeline source.

Viewing the Version Log

To view version logs:

  1. Either right-click or 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. When a template version is retired, pipeline sources using the retired version should be updated to use a different version of the template.

To retire a template version:

  1. Either right-click or hover over the rightmost region of the row where the template version is listed to reveal the Actions, and click Retire 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 Retired At column 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:

Either right-click or 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.

Viewing Documentation

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


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

  • Only by an administrator user or a user with resource manager permissions can add a template source.
  • 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 | Extensions & Templates.
  2. Click the Sources tab, click Add Source and then click Templates.

  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 | Extensions & Templates, and click the 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
Type
The source type

Sync Template Source

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

  1. Right-click or hover over the rightmost region of the row where the template source is listed and click the Actions icon that appears.
  2. Click the Sync icon.

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

  • No labels
Copyright © 2021 JFrog Ltd.