Pipelines users can view the catalog of successfully loaded templates, and manage lifecycle staging of each template version.
From the Application tab go to Pipelines | Extensions & Templates, and select the Templates tab to view the list of templates.
|The named type of the template.|
|The current version of the template.|
|The success/failure status of the last sync.|
|The namespace of the template.|
|The date and time when the template was released.|
|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:
- Go to your Github repository and perform these steps:
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.
- Click Releases.
- Click Draft a new release.
- In the page that appears, click the Tag version field and enter a git tag using the format:
- The format of <
semver>must be compliant with the semantic versioning standard (Major.Minor.Patch).
- The format of <
- 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.
- In the JFrog Platform, from the Application tab go to Pipelines | Extensions & Templates, and select the Templates tab.
- 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.
- 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:
- 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.
- 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:
- 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.
- 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.
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.
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
A 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:
- From the Application module go to Pipelines | Extensions & Templates.
- Click the Sources tab, click Add Source and then click Templates.
- 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:
|The source repository path of the template source|
|The source repository branch|
|The success/failure status of the last sync|
|The time and date of the last sync|
|The username of the VCS user who made the triggering change|
|The commit SHA that triggered the last sync|
|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:
- Right-click or hover over the rightmost region of the row where the template source is listed and click the Actions icon that appears.
- Click the Sync icon.
If the Latest Status indicates that the sync failed, click Logs to view the logs of all synchronized files.