How to checkout or relinquish a license with cycle-cli

How to checkout or relinquish a license with cycle-cli

(This article is applicable to Cycle 2.5.0 and earlier versions)

Cycle-cli is the command line interface for executing Features, Playlists or Group test files. For more detailed information on cycle-cli read this article.

This article focuses on using cycle-cli to checkout and/or relinquish a licence. This is especially valuable when executing cycle-cli in parallel within a Continuous Integration pipeline.

Checking out a license at the beginning of a pipeline ensures all executions are using the same license without overlapping conflicts.

Relinquishing the license at the end of a pipeline frees that license up immediately for other users/jobs. 

Checkout

The command line argument for checking out a license in cycle is --license-checkout. It is best practice when using cycle-cli to include your Personal Access Token. Instructions for finding and using your Personal Access Token can be found in the linked article referenced earlier.

Example:

C:\Program Files (x86)\TryonSolutions\Cycle>cycle-cli -a 0010-1000-1010-3df5 --license-checkout

Example output after executing a command line checkout.

Validated sample_cycle_user@tryonsolutions.com Success
License 64123-2e48-42d0-12g6-13142r4 Expires 2020-01-11T18:44:53Z Success
Now this license has been reserved for this cycle user until the expire date or it is relinquished.
 

Relinquish

The command line argument for relinquishing a license in cycle is --license-relinquish. It is best practice when using cycle-cli to include your Personal Access Token. Instructions for finding and using your Personal Access Token can be found in the linked article referenced earlier.

Example:

C:\Program Files (x86)\TryonSolutions\Cycle>cycle-cli -a 0010-1000-1010-3df5 --license-relinquish

Example output after executing a command line relinquish.

Success

Now this license has been relinquished and added back into your team's available pool.

Adding to a CI Pipeline

Using Jenkins as an example, the checkout and relinquish can be added a stages at the beginning and end or your pipeline respectively. This ensures that your parallel jobs run with the same license without conflict while not holding a license any longer than necessary.

stage('License Checkout') {
steps {
bat '"C:\\Program Files (x86)\\TryonSolutions\\Cycle\\cycle-cli" -a 0010-1000-1010-3df5 --license-checkout'
}
}
.
[Pipeline stage 1]
.
[Pipeline stage 2]
.
[Pipeline stage 3]
.
stage('License Relinquish') {
steps {
bat '"C:\\Program Files (x86)\\TryonSolutions\\Cycle\\cycle-cli" -a 0010-1000-1010-3df5 --license-relinquish'
}
}
    • Related Articles

    • How to use Scenario tag filters

      Cycle 2.5 introduces the ability to filter tags during Feature and Playlist execution. This allows the Cycle user more control over which Scenarios within a Feature or Playlist are executed while also allowing more flexibility when assigning tags to ...
    • How to reset an unresponsive Cycle license locally

        (This article is applicable to Cycle 2.5.0 and earlier versions) Problem Cycle may show a license ID in preferences but behaves as if there is no license or that its license has expired. The symptoms may include Cycle spinning indefinitely on the ...
    • How To Update Jira Statuses With Jenkins Pipeline In Cycle Appliance

      The Cycle Appliance provides a platform that facilitates continuous testing and continuous integration through cloud-based infrastructure running Jenkins in Azure. A key aspect of continuous testing and continuous integration is giving your ...
    • How To Post Jenkins Pipeline Results from the Cycle Appliance to Slack

      The Cycle Appliance provides a platform that facilitates continuous testing and continuous integration through cloud-based infrastructure running Jenkins in Azure. A key aspect of continuous testing and continuous integration is giving your ...
    • How to delete a user with an active license

      Problem For reasons such as hardware, project, or organizational changes it may be necessary to delete a Cycle user this is still showing an active license in the User Portal. Solution The Cycle User Portal provides Client Administrators the ...