Skip to content

Commit

Permalink
Doco updates part 1
Browse files Browse the repository at this point in the history
  • Loading branch information
BobJWalker committed Nov 15, 2021
1 parent f7d8e0f commit 7ed4ad8
Show file tree
Hide file tree
Showing 9 changed files with 99 additions and 58 deletions.
10 changes: 5 additions & 5 deletions CloneSpaceProject.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,11 @@ $IgnoreVersionCheckResult = Test-OctopusTrueFalseParameter -parameterValue $Igno
$SkipPausingWhenIgnoringVersionCheckResult = Test-OctopusTrueFalseParameter -parameterValue $SkipPausingWhenIgnoringVersionCheckResult -parameterName "SkipPausingWhenIgnoringVersionCheckResult" -defaultValue $false
$WhatIf = Test-OctopusTrueFalseParameter -parameterValue $WhatIf -parameterName "WhatIf" -defaultValue $false

$EnvironmentsToInclude = Test-OctopusIncludeExcludeFilterParameter -includeFilters $EnvironmentsToInclude -excludeFilters $EnvironmentsToExclude -parameterName "Environments"
$WorkersToInclude = Test-OctopusIncludeExcludeFilterParameter -includeFilters $WorkersToInclude -excludeFilters $WorkersToExclude -parameterName "Worker"
$TargetsToInclude = Test-OctopusIncludeExcludeFilterParameter -includeFilters $TargetsToInclude -excludeFilters $TargetsToExclude -parameterName "Target"
$TenantsToInclude = Test-OctopusIncludeExcludeFilterParameter -includeFilters $TenantsToInclude -excludeFilters $TenantsToExclude -parameterName "Tenants"
$ChannelsToInclude = Test-OctopusIncludeExcludeFilterParameter -includeFilters $ChannelsToInclude -excludeFilters $ChannelsToExclude -parameterName "Channels"
$EnvironmentsToInclude = Test-OctopusIncludeExcludeFilterParameter -includeFilters $EnvironmentsToInclude -excludeFilters $EnvironmentsToExclude -parameterName "Environments" -DefaultIncludeFilter "all"
$WorkersToInclude = Test-OctopusIncludeExcludeFilterParameter -includeFilters $WorkersToInclude -excludeFilters $WorkersToExclude -parameterName "Worker" -DefaultIncludeFilter "$null"
$TargetsToInclude = Test-OctopusIncludeExcludeFilterParameter -includeFilters $TargetsToInclude -excludeFilters $TargetsToExclude -parameterName "Target" -DefaultIncludeFilter "$null"
$TenantsToInclude = Test-OctopusIncludeExcludeFilterParameter -includeFilters $TenantsToInclude -excludeFilters $TenantsToExclude -parameterName "Tenants" -DefaultIncludeFilter "all"
$ChannelsToInclude = Test-OctopusIncludeExcludeFilterParameter -includeFilters $ChannelsToInclude -excludeFilters $ChannelsToExclude -parameterName "Channels" -DefaultIncludeFilter "all"

$cloneSpaceCommandLineOptions = @{
EnvironmentsToClone = $null;
Expand Down
23 changes: 12 additions & 11 deletions docs/CloneLibraryVariableSetParameterReference.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,24 +27,25 @@ You can have variables, deployment process steps, or infrastructure items (worke
- `ErrorUnlessPartialMatch`: An **Error** will be thrown unless a partial match on the scoping is found. For example, the source has `Development` and `Test`, an error will be thrown unless the destination has `Development` OR `Test`.
- `SkipUnlessPartialMatch`: The item (variable, account, step, etc.) will be excluded or skipped unless a partial match is found. For example, the source has `Development` and `Test`, the item will be skipped unless `Development` OR `Test`.
- `IgnoreMismatch`: The item will be cloned regardless of matching.

The parameters are:

- `VariableChannelScopingMatch`: How to handle when a variable in a project or library variable set is scoped to 1 to N Channels in the source but not all environments are in the destination. Default is `SkipUnlessExactMatch`.
- `VariableEnvironmentScopingMatch`: How to handle when a variable in a project or library variable set is scoped to 1 to N Environments in the source but not all environments are in the destination. Default is `SkipUnlessExactMatch`.
- `VariableProcessOwnerScopingMatch`: How to handle when a variable in a project or library variable set is scoped to 1 to N Deployment or Runbooks in the source but not all environments are in the destination. Default is `SkipUnlessExactMatch`.
- `VariableActionScopingMatch`: How to handle when a variable in a project or library variable set is scoped to 1 to N Deployment Steps in the source but not all environments are in the destination. Default is `SkipUnlessExactMatch`.
- `VariableMachineScopingMatch`: How to handle when a variable in a project or library variable set is scoped to 1 to N Deployment Targets in the source but not all environments are in the destination. Default is `SkipUnlessExactMatch`.
- `VariableAccountScopingMatch`: How to handle when a variable in a project or library variable set is scoped to an Account in the source but not all environments are in the destination. Default is `SkipUnlessExactMatch`.
- `VariableCertificateScopingMatch`: How to handle when a variable in a project or library variable set is scoped to an Certificate in the source but not all environments are in the destination. Default is `SkipUnlessExactMatch`.
- `IgnoreMismatchOnNewLeaveExistingAlone`: The item will be cloned when it is new and scoping doesn't match. Otherwise it will leave that already exists alone.

The variable scoping parameters are:
- `VariableChannelScopingMatch`: How to handle when a variable in a project or library variable set is scoped to 1 to N Channels in the source but not all environments are in the destination. Default is `SkipUnlessPartialMatch`.
- `VariableEnvironmentScopingMatch`: How to handle when a variable in a project or library variable set is scoped to 1 to N Environments in the source but not all environments are in the destination. Default is `SkipUnlessPartialMatch`.
- `VariableProcessOwnerScopingMatch`: How to handle when a variable in a project or library variable set is scoped to 1 to N Deployment or Runbooks in the source but not all environments are in the destination. Default is `SkipUnlessPartialMatch`.
- `VariableActionScopingMatch`: How to handle when a variable in a project or library variable set is scoped to 1 to N Deployment Steps in the source but not all environments are in the destination. Default is `SkipUnlessPartialMatch`.
- `VariableMachineScopingMatch`: How to handle when a variable in a project or library variable set is scoped to 1 to N Deployment Targets in the source but not all environments are in the destination. Default is `SkipUnlessPartialMatch`.
- `VariableTenantTagsScopingMatch`: How to handle when a step in a project or library variabe set is scoped to to 1 to N Tenant Tags in the source but not all Tenant Tags are in the destination. Default is `SkipUnlessPartialMatch`.
- `VariableAccountScopingMatch`: How to handle when a variable in a project or library variable set is scoped to an Account in the source but not all environments are in the destination. Default is `SkipUnlessPartialMatch`.
- `VariableCertificateScopingMatch`: How to handle when a variable in a project or library variable set is scoped to an Certificate in the source but not all environments are in the destination. Default is `SkipUnlessPartialMatch`.

See more how this works in the [How Scope Cloning Works Documentation](HowScopeCloningWorks.md).

## Options

The values for these options are either `True`, `False` or `null`. Null will cause the default parameter to be used.

- `OverwriteExistingVariables`: Indicates if all existing variables (except sensitive variables) should be overwritten. The default is `false`.
- `OverwriteExistingVariables`: Indicates if all existing variables (except sensitive variables) should be overwritten. The default is `false`. Options are `true`, `false`, or `AddNewWithDefaultValue`. See how [Variable Matching Works](HowVariableMatchingWorks.md)
- `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`.
- `WhatIf`: Set to `$true` if you want to see everything this script will do without it actually doing the work. Set to `$false` to have it do the work. Defaults to `$false`.
15 changes: 10 additions & 5 deletions docs/CloneSpaceParameterReference.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,22 +59,27 @@ You can have variables, deployment process steps, or infrastructure items (worke
- `ErrorUnlessPartialMatch`: An **Error** will be thrown unless a partial match on the scoping is found. For example, the source has `Development` and `Test`, an error will be thrown unless the destination has `Development` OR `Test`.
- `SkipUnlessPartialMatch`: The item (variable, account, step, etc.) will be excluded or skipped unless a partial match is found. For example, the source has `Development` and `Test`, the item will be skipped unless `Development` OR `Test`.
- `IgnoreMismatch`: The item will be cloned regardless of matching.
- `IgnoreMismatchOnNewLeaveExistingAlone`: The item will be cloned when it is new and scoping doesn't match. Otherwise it will leave that already exists alone.

The parameters are:

The process scoping parameters are:
- `ProcessEnvironmentScopingMatch`: How to handle when a step in a deployment or runbook process is scoped to 1 to N Environments in the source but not all environments are in the destination. Default is `SkipUnlessPartialMatch`.
- `ProcessChannelScopingMatch`: How to handle when a step in a deployment or runbook process is scoped to to 1 to N Channels in the source but not all Channels are in the destination. Default is `SkipUnlessPartialMatch`.
- `ProcessTenantTagsScopingMatch`: How to handle when a step in a deployment or runbook process is scoped to to 1 to N Tenant Tags in the source but not all Tenant Tags are in the destination. Default is `SkipUnlessPartialMatch`.

The variable scoping parameters are:
- `VariableChannelScopingMatch`: How to handle when a variable in a project or library variable set is scoped to 1 to N Channels in the source but not all environments are in the destination. Default is `SkipUnlessPartialMatch`.
- `VariableEnvironmentScopingMatch`: How to handle when a variable in a project or library variable set is scoped to 1 to N Environments in the source but not all environments are in the destination. Default is `SkipUnlessPartialMatch`.
- `VariableProcessOwnerScopingMatch`: How to handle when a variable in a project or library variable set is scoped to 1 to N Deployment or Runbooks in the source but not all environments are in the destination. Default is `SkipUnlessPartialMatch`.
- `VariableActionScopingMatch`: How to handle when a variable in a project or library variable set is scoped to 1 to N Deployment Steps in the source but not all environments are in the destination. Default is `SkipUnlessPartialMatch`.
- `VariableMachineScopingMatch`: How to handle when a variable in a project or library variable set is scoped to 1 to N Deployment Targets in the source but not all environments are in the destination. Default is `SkipUnlessPartialMatch`.
- `VariableAccountScopingMatch`: How to handle when a variable in a project or library variable set is scoped to an Account in the source but not all environments are in the destination. Default is `SkipUnlessExactMatch`.
- `VariableCertificateScopingMatch`: How to handle when a variable in a project or library variable set is scoped to an Certificate in the source but not all environments are in the destination. Default is `SkipUnlessExactMatch`.
- `VariableTenantTagsScopingMatch`: How to handle when a step in a project or library variabe set is scoped to to 1 to N Tenant Tags in the source but not all Tenant Tags are in the destination. Default is `SkipUnlessPartialMatch`.
- `VariableAccountScopingMatch`: How to handle when a variable in a project or library variable set is scoped to an Account in the source but not all environments are in the destination. Default is `SkipUnlessPartialMatch`.
- `VariableCertificateScopingMatch`: How to handle when a variable in a project or library variable set is scoped to an Certificate in the source but not all environments are in the destination. Default is `SkipUnlessPartialMatch`.

The infrastructure scoping parameters are:
- `InfrastructureEnvironmentScopingMatch`: How to handle when a Deployment Target or Account is scoped to 1 to N Environments in the source but not all environments are in the destination. Default is `SkipUnlessPartialMatch`.
- `InfrastructureTenantScopingMatch`: How to handle when a Deployment Target or Account is scoped to 1 to N Tenants in the source but not all environments are in the destination. Default is `SkipUnlessPartialMatch`.
- `VariableTenantTagsScopingMatch`: How to handle when a Deployment Target or Account is scoped to to 1 to N Tenant Tags in the source but not all Tenant Tags are in the destination. Default is `SkipUnlessPartialMatch`.

See more how this works in the [How Scope Cloning Works Documentation](HowScopeCloningWorks.md).

Expand All @@ -84,7 +89,7 @@ The values for these options are either `True`, `False` or `null`. Null will ca

- `OverwriteExistingCustomStepTemplates`: Indicates if existing custom step templates (not community step templates) should be overwritten. Useful when you make a change to a step template, you want to move over to another instance. Defaults to `false`.
- `OverwriteExistingLifecyclesPhases`: Indicates you want to overwrite the phases on existing lifecycles. This is useful when you have an updated lifecycle you want to be applied another space/instance. You will want to leave this to false if the destination lifecycle has different phases. The default is `false`. You can also send in `NeverCloneLifecyclePhases` which means it will never clone a lifecycle phase ever. This is useful when you need to have instances with completely separate environments.
- `OverwriteExistingVariables`: Indicates if all existing variables (except sensitive variables) should be overwritten. This setting is applied to to project variables, library variable sets, and tenant variables. The default is `false`.
- `OverwriteExistingVariables`: Indicates if all existing variables (except sensitive variables) should be overwritten. The default is `false`. Options are `true`, `false`, or `AddNewWithDefaultValue`. See how [Variable Matching Works](HowVariableMatchingWorks.md)
- `CloneProjectChannelRules`: Indicates if the project channel rules should be cloned and overwrite existing channel rules. The default is `false`.
- `CloneProjectDeploymentProcess`: Indicates if the project deployment process should be cloned. Set this to `false` to only clone project runbooks. The default is `true`.
- `CloneProjectRunbooks`: Indicates if project runbooks should be cloned. Set this to `false` to only clone the project deployment process. The default is `true`.
Expand Down
Loading

0 comments on commit 7ed4ad8

Please sign in to comment.