Skip to content

Copy Library Variable Set in Same Space

Compare
Choose a tag to compare
@BobJWalker BobJWalker released this 24 Sep 14:55

There are cases when it makes sense to copy an existing library variable set in the same space. For example, a project group gets its own library variable set. A new script, CloneLibraryVariableSet.ps1 has been added to support that use case.

The script is a cut down version of the CloneSpace.ps1 script, you provide the source variable set name and the destination variable set name. The destination variable set does not need to exist, the script will create it for you. It is also possible to use this script to clone variable sets between instances and spaces.

Z:\Code.git\SpaceCloner_Labs\CloneLibraryVariableSet.ps1 `
        -SourceOctopusUrl "https://samples.octopus.app" `
        -SourceOctopusApiKey "API KEY" `
        -SourceSpaceName "Demo" `
        -DestinationOctopusUrl "https://samples.octopus.app" `
        -DestinationOctopusApiKey "API KEY" `
        -DestinationSpaceName "Demo" `
        -SourceVariableSetName "Notification" `
        -DestinationVariableSetName "Notification_New" `
        -OverwriteExistingVariables $false `
        -AddAdditionalVariableValuesOnExistingVariableSets $false `
        -IgnoreVersionCheckResult $true `
        -SkipPausingWhenIgnoringVersionCheckResult $true