Skip to content

Releases: OctopusDeployLabs/SpaceCloner

Better Variable Matching

03 Nov 16:06
Compare
Choose a tag to compare

The variable matching with previous releases was too simplistic and resulted in variables not being cloned over. The variable matching logic has been re-written to now match a source variable with a destination variable by comparing.

  • Name
  • Sensitive vs non-sensitive
  • Environment Scoping
  • Machine Scoping
  • Role Scoping

For projects, additional scoping matching is added

  • Process Scoping
  • Step Scoping
  • Channel Scoping

If you modify the scoping on the source, or change from sensitive to non-sensitive (or vice versa) the cloner will see that as a new value and attempt to copy it over.

Because of this updated logic the parameter AddAdditionalVariableValuesOnExistingVariableSets has been removed.

57% fewer dummy values for accounts

21 Oct 13:23
Compare
Choose a tag to compare

To make it easier to clone accounts, the account cloner will now clone the following values instead of generating dummy values.

  • Azure Accounts
    • Subscription Number
    • Tenant Id
    • Client Id
  • AWS Accounts
    • Access key

The description will have the following text appended to it (this text is added after any description).

image

Please note, the account cloner only copies accounts it does not find. Any existing accounts will be left alone. You can remove that extra text in the description. It won't be added again.

Step template package reference bug fix

20 Oct 19:33
Compare
Choose a tag to compare
  • Support the certificate variable type (still doesn't clone certs, but supports the variable type now)
  • Fixes a bug where step templates packages weren't getting cloned correctly with the built-in feed
  • Fixes a bug where the azure cloner attempted to create a GUID object rather than a GUID string
  • Will now show 401 unauthorized error instead of unable to read response stream error
  • Tested against a 2020.5.x instance

Variable Set Bug Fix

28 Sep 12:51
Compare
Choose a tag to compare

Fixing a minor bug with variable set cloning. Previously, if the variable already existed in the variable set no new variables would ever be added, even if the parameter AddAdditionalVariableValuesOnExistingVariableSets was set to $true.

Copy Library Variable Set in Same Space

24 Sep 14:55
Compare
Choose a tag to compare

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

Version check improvements

18 Sep 14:40
Compare
Choose a tag to compare

Added the ability to skip the version check. By default, if the version check is skipped it will pause for 20 seconds to let you cancel the run. You can elect to skip that pause as well.

The two new parameters.

  • IgnoreVersionCheckResult - Indicates if the script should ignore version checks rules and proceed with the clone. This should only be used for cloning to test instances of Octopus Deploy. The default is false.
  • SkipPausingWhenIgnoringVersionCheckResult - When IgnoreVersionCheckResult is set to true the script will pause for 20 seconds when it detects a difference to let you cancel. You can skip that check by setting this to true. This should only be used for cloning to test instances of Octopus Deploy. The default is false.

These parameters were added to help the Octopus Advisory Team set up test instances of EAP releases of Octopus Deploy. Typically EAP releases are on a newer minor version, 2020.5.0-rcxxx while the GA release is 2020.3.6.

This release fixed two bugs

  • Version checker properly checks the minor version, not just the major version
  • Explicit default values for all the pass-through parameters in the CloneSpaceProject.ps1 script.

Project Child Syncing Improvements

03 Sep 19:27
Compare
Choose a tag to compare

The project child syncing functionality of the space cloner is now more robust. It now supports the following use cases:

  • Sync just the deployment process between a parent project and child project
  • Sync just the runbook processes between the parent project and child project
  • Select specific runbooks to clone
  • Sync the channel version rules
  • Sync the release version setting

In addition, a new file ProjectSyncer.ps1 has been created. It is designed to make it easier to sync projects in the same space. Fewer variables to worry about.

In this example, the project syncer will only clone the runbooks "Spin Up Azure SQL Server Database" and "Delete Azure SQL Server Database" from the parent project "DBUp SQL Server" to "DBUp Clone Tester". It won't sync the deployment process.

ProjectSyncer.ps1 `
        -SourceOctopusUrl "https://samples.octopus.app" `
        -SourceOctopusApiKey "API KEY!" `
        -SourceSpaceName "Target - SQL Server" `
        -ParentProjectName "DBUp SQL Server" `
        -ChildProjectsToSync "DbUp Clone Tester" `
        -RunbooksToClone "Spin Up Azure SQL Server Database,Delete Azure SQL Server Database" `
        -OverwriteExistingVariables $true `
        -AddAdditionalVariableValuesOnExistingVariableSets $true `
        -OverwriteExistingCustomStepTemplates $false `
        -OverwriteExistingLifecyclesPhases $false `
        -CloneProjectChannelRules $true `
        -CloneProjectRunbooks $true `
        -CloneProjectVersioningReleaseCreationSettings $true `
        -CloneProjectDeploymentProcess $false

Package cloning

18 Aug 21:18
Compare
Choose a tag to compare

This release adds:

  • The ability to clone the latest packages from the source server to the destination server.
  • If a package has build information associated with it, that is also uploaded.
  • The CloneSpaceProject script will find the package(s) for each step and add them to the list to get cloned.

Please note: This is using a very simple download mechanism, it isn't the fastest in the world. Bigger packages will slow down runtimes. You can exclude packages by setting PackagesToClone to $null or excluding it altogether.

Bugs fixed:

  • Downloading files now work when running the script on Linux / MacOS. The code uses System.IO.Path.Combine instead of hardcoding the forward or backslash.

Script Module Fixes

13 Aug 21:31
Compare
Choose a tag to compare

This release fixes the following bugs in the space cloner:

  1. Script modules are now cloned when using the CloneSpaceProject.ps1 script. Previously all script modules were skipped.
  2. Script modules are now being assigned to the project when cloning. Script modules and library variable sets were stored in the same array. The code was only looking at library variable sets.
  3. Process Owner clone is now being cloned; before it was skipping it.
  4. The scope is being overwritten along with the value when the option OverwriteExistingVariables is set to $True. Previously it was just overwriting the value. Sensitive values are still left as-is.
  5. Fixed an issue reported by a user when Octopus was located in a virtual directory.

Support for Runbooks++ and Execution Containers

04 Aug 20:09
Compare
Choose a tag to compare

New Features:

  • Support for execution containers
  • Support for runbook environment scoping

Bug Fixes:

  • Added prefix "Warning" for all warning messages
  • Added prefix "Critical Message" for all critical messages
  • Fixed issue where azure account id was not found when cloning azure web apps
  • Fixed issue where azure account id was not found when cloning K8s with Azure auth
  • Will create a unique temporary image to help prevent "file is being used by another process."
  • Will attempt to delete the temporary image, if it fails it will gracefully fail and warn the user
  • Fixed an issue where the deployment targets weren't getting pulled from the right source