Skip to content

Commit

Permalink
Spellings
Browse files Browse the repository at this point in the history
  • Loading branch information
steve-fenton-octopus committed Nov 6, 2023
1 parent d9f0eb4 commit c41bb4b
Show file tree
Hide file tree
Showing 87 changed files with 456 additions and 382 deletions.
73 changes: 73 additions & 0 deletions dictionary-octopus.txt
Original file line number Diff line number Diff line change
@@ -1,39 +1,74 @@
actionid
apikey
apikeys
argparse
astro
bootstrap
bootstrapped
bootstrapper
bufio
COMPUTERNAME
createartifact
cryptodome
cscfg
cspkg
csvfile
cutover
datetime
dateutil
deallocate
deallocated
deploymentprocess
deploymentprocesses
DONTVALIDATEPATH
echoerror
elif
environmentids
eprintfn
Fargate
fieldnames
filedata
FIPS
getenv
hasattr
Hashtable
HKEY
HKLM
hotfix
hotfixes
HSTS
icontains
IGNORECASE
includesystem
ioutil
Itoa
ITSM
jwks
kustomization
kustomize
libraryset
librarysets
libraryvariablesets
lifecycles
Linq
lstrip
machinepolicies
machinepolicy
maxage
mozroots
msiexec
MTTR
Netscaler
nologs
noninteractive
notcontains
NTLM
nupkg
O_WRONLY
Octo
octobak
Octopub
octopusartifact
octopusdeploy
octopusid
octopuslabs
Expand All @@ -45,27 +80,65 @@ OIDC
onlylogs
passout
pkcs
printfn
printhighlight
Println
printverbose
printwait
printwarning
PROGRAMFILES
projectgroup
projectgroups
projecttriggers
querystring
quickstart
reprioritize
reprovisioned
reprovisioning
RSASSA
rstrip
Runbook
runbook
runbookprocesses
runbookruns
runbooks
runbooksnapshot
runbooksnapshots
runbooksnapshottemplate
Schannel
scopeduserrole
scopeduserroles
SIEM
signingkeys
Sprintf
sthumb
strconv
struct
swaggerui
systemprofile
tabpanel
tagset
tagsets
Tasklogs
Trivy
typeof
unmarshal
upgradelog
upgrader
urllib
userrole
userroles
utcnow
variableset
Voltron
WCAG
webfonts
WEBSVR
WIXUI
woah
workertools
writeheader
writerow
xlarge
xmark
xvzf
8 changes: 4 additions & 4 deletions src/pages/docs/deployments/custom-scripts/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,13 @@ The precise details depend on the context within which your script is running, h
4. Any artifacts published by your scripts are transferred back to the Octopus Server.
5. The temporary work directory is cleaned up.

### Working directories {#Customscripts-Workingdirectories}
### Working directories

When Calamari executes your scripts, it does so within the context of a working directory. The working directory is a temporary location stored under the home folder you configure when setting up a deployment target or worker.

If you're executing a script contained within a package, the package contents will be uncompressed and copied to this directory, but the working directory is the directory containing the script within it. After the script has finished executing, the working directory will be cleaned up. Learn about [copying the contents of the working directory](/docs/support/copy-working-directory).

### Security and permissions {#Customscripts-Securityandpermissions}
### Security and permissions

When scripts are executed, it is in the context of the account that the Tentacle agent or SSH session is running as. Learn about [running Tentacle as a different user account](/docs/infrastructure/deployment-targets/tentacle/windows/running-tentacle-under-a-specific-user-account).

Expand All @@ -88,7 +88,7 @@ For example, when Calamari invokes PowerShell.exe, it uses the `Unrestricted` ex

Learn about [script integrity](/docs/security/script-integrity).

### Developing and testing scripts {#Customscripts-Testingscripts}
### Developing and testing scripts

We recommend the following approaches for developing and testing your scripts, in order of preference:

Expand All @@ -104,7 +104,7 @@ We recommend the following approaches for developing and testing your scripts, i
1. If you are using PowerShell, Octopus has built-in support for PowerShell debugging. Learn about [debugging PowerShell scripts on remote machines using Octopus](/docs/deployments/custom-scripts/debugging-powershell-scripts/debugging-powershell-scripts-on-remote-machines).
2. For all scripting languages, you can tell Octopus to preserve the script and its entire working directory so you can run it interactively. Learn about [copying the working directory](/docs/support/copy-working-directory).

### Scripts that block deployments {#Customscripts-Scriptsthatblockdeployments}
### Scripts that block deployments

Sometimes a script launches a service or application that runs continuously. In this case the script does not complete until the application is terminated. When the script is run in an Octopus process, the Octopus task will continue executing until the script exits. In most cases this is undesirable. In order to avoid this behavior the service or application should be launched in a separate process or session, allowing the rest of the process to continue executing. For example:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ Progress messages will display and update a progress bar on your deployment task
<details data-group="deployments-custom-scripts-logging-messages">
<summary>PowerShell</summary>

```ps PowerShell
```powershell
Update-Progress 10
Update-Progress 50 "Woah, we're halfway there!"
```
Expand Down Expand Up @@ -133,8 +133,8 @@ Octopus.updateProgress 50 "Woah, we're halfway there!"
<summary>Python3</summary>

```python
updateprogress(10)
updateprogress(50, 'Woah, we\'re halfway there!')
update_progress(10)
update_progress(50, 'Woah, we\'re halfway there!')
```

</details>
Expand Down Expand Up @@ -176,7 +176,7 @@ let updateProgress (percentage: int) message =
def encode(value):
return base64.b64encode(value.encode('utf-8')).decode('utf-8')

def updateprogress(progress, message=None):
def update_progress(progress, message=None):
encodedProgress = encode(str(progress))
encodedMessage = encode(message)

Expand All @@ -188,12 +188,12 @@ def updateprogress(progress, message=None):
<summary>Bash</summary>

```bash
function encode_servicemessagevalue
function encode_service_message_value
{
echo -n "$1" | openssl enc -base64 -A
}

echo "##octopus[progress percentage='$(encode_servicemessagevalue "$1")' message='$(encode_servicemessagevalue "$2")']"
echo "##octopus[progress percentage='$(encode_service_message_value "$1")' message='$(encode_service_message_value "$2")']"
```

</details>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ You can define your parameters in the **Script Parameters** field using the form
Don't forget to correctly delimit your parameters correctly for the scripting engine. In the example above we have surrounded the parameter value in double-quotes to handle cases where the Environment Name has spaces: `"#{Octopus.Environment.Name}"`
:::

## Passing parameters to PowerShell scripts {#Customscripts-PassingparameterstoPowerShellscripts}
## Passing parameters to PowerShell scripts

You can pass parameters to PowerShell scripts as if you were calling the script yourself from PowerShell, using positional or named parameters.

Expand All @@ -66,7 +66,7 @@ Param (
Write-Host "$Environment storage path: $StoragePath"
```

## Passing parameters to C# scripts {#Customscripts-PassingparameterstoC#scripts}
## Passing parameters to C# scripts

You can pass parameters to C# scripts [as described here for the dotnet-script engine](https://github.com/dotnet-script/dotnet-script#passing-arguments-to-scripts).

Expand All @@ -84,7 +84,7 @@ var storagePath = Args[1]
Console.WriteLine("{0} storage path: {1}", environment, storagePath);
```

## Passing parameters to Bash scripts {#Customscripts-PassingparameterstoBashscripts}
## Passing parameters to Bash scripts

You can pass parameters to Bash scripts [as described in Bash manual.](https://www.gnu.org/software/bash/manual/bash.html#Positional-Parameters)

Expand All @@ -102,7 +102,7 @@ storagePath="$2"
echo "$environment storage path: $storagePath"
```

## Passing parameters to F# scripts {#Customscripts-PassingparameterstoF#scripts}
## Passing parameters to F# scripts

You can pass parameters to FSharp scripts [as described by the F# documentation.](https://docs.microsoft.com/en-us/dotnet/fsharp/tools/fsharp-interactive/#using-the-fsi-object-in-f-code)

Expand All @@ -120,7 +120,7 @@ let storagePath = fsi.CommandLineArgs.[2]
printfn "$s storage path: $s" environment storagePath
```

## Passing parameters to Python3 scripts {#Customscripts-Passingparameterstopythonscripts}
## Passing parameters to Python3 scripts

You can pass parameters to python scripts [as described by the python documentation.](https://docs.python.org/3/tutorial/interpreter.html#argument-passing)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ print(connectionString)
To see the F# API available to your F# scripts, take a look at our [F# signature file](https://github.com/OctopusDeploy/Calamari/tree/master/source/Calamari.Common/Features/Scripting/FSharp/Bootstrap.fsi).
:::

## Variables in PowerShell scripts {#Customscripts-VariablesinPowerShellscripts}
## Variables in PowerShell scripts

In PowerShell we have pre-defined some script-scoped variables for you as a convenience. Consider the same example as before, a variable named "MyApp.ConnectionString" will be available as both:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Octopus can execute Python scripts on SSH targets provided the following criteri

- Python is version 3.4+
- Python3 is on the path for the SSH user executing the deployment
- pip is installed or the pycryptodome python package is installed
- pip is installed or the PyCryptodome Python package is installed

## F#

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ These output variables are captured as variables with the following name pattern
Octopus.Action[Deploy Release Step Name].Output.Deployment[Child Step Name].VariableName
```

and for [machine-specific output variables](/docs/projects/variables/output-variables/#Outputvariables-Outputfrommultiplemachines):
and for [machine-specific output variables](/docs/projects/variables/output-variables/#output-from-multiple-deployment-targets):

```
Octopus.Action[Deploy Release Step Name].Output.Deployment[Child Step Name][Machine Name].VariableName
Expand Down
2 changes: 1 addition & 1 deletion src/pages/docs/projects/deployment-process/artifacts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ After the script runs the files will be uploaded to Octopus Server and made avai
![](/docs/projects/deployment-process/images/artifacts-access.png "width=500")
:::

## Collecting artifacts using scripts \{#Artifacts-Collectingartifactsusingscripts}
## Collecting artifacts using scripts

You can collect artifacts using any of the scripting languages supported by Octopus. In each scripting language you can specify the path to the file you want to collect as an artifact as an absolute path, or a path relative to the current working directory. By default, the file name will be used as the artifact name, but you can provide a custom name for the artifact as an alternative.

Expand Down
18 changes: 9 additions & 9 deletions src/pages/docs/projects/variables/output-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ set_octopusvariable("Password", "correct horse battery staple", True)

</details>

## System output variables {#Outputvariables-Systemoutputvariables}
## System output variables

After a step runs, Octopus captures the output variables, and keeps them for use in subsequent steps. In addition to variables that you create yourself using `Set-OctopusVariable`, Octopus also makes a number of built-in variables available. Here are some examples of commonly used built-in output variables:

Expand All @@ -159,7 +159,7 @@ After a step runs, Octopus captures the output variables, and keeps them for use
- `Octopus.Action[StepName].Output.Manual.ResponsibleUser.DisplayName`
- `Octopus.Action[StepName].Output.Manual.ResponsibleUser.EmailAddress`

## Output from multiple deployment targets {#Outputvariables-Outputfrommultiplemachines}
## Output from multiple deployment targets {#output-from-multiple-deployment-targets}

Output variables become more complex when multiple deployment targets are involved, but they can still be used.

Expand All @@ -180,24 +180,24 @@ Note that for each output variable/deployment target combination:

- A variable is created with the deployment target name contained in the variable name: this allows you to reference output variables from set by one deployment target from another deployment target.
- A variable is created that is [scoped](/docs/projects/variables/#scoping-variables) to the deployment target. This way Web01 will always get the value Web01 set, and Web02 will get the value Web02 set.
- A variable is created with no scope, and no differentiator in the name. When referencing this value, the result will be indeterministic, but it allows scripts to use the value without knowing which deployment target set it.
- A variable is created with no scope, and no differentiator in the name. When referencing this value, the result will be non-deterministic, but it allows scripts to use the value without knowing which deployment target set it.

For some practical examples of using output variables, and how scoping rules are applied, see the following blog posts:

- [Fun with output variables](https://octopus.com/blog/fun-with-output-variables)
- [Changing website ports using output variables](http://octopus.com/blog/changing-website-port-on-each-deployment)

## Output from deploy a release steps {#Outputvariables-Outputfromdeployareleasesteps}
## Output from deploy a release steps

Output variables from deployments triggered by a _Deploy a Release_ step are captured and exposed as output variables on the _Deploy a Release_ step.

To get the value of an output variable from a _Deploy a Release_ step, use the `Output.Deployment` variable on the _Deploy a Release_ step. For example, if your _Deploy a Release_ step is named "Deploy Web Project", the target step in the child project is named "Update IP Address", and the variable name is "IPAddress", you would use the following variable to access it in the parent project: `Octopus.Action[Deploy Web Project].Output.Deployment[Update IP Address].IPAddress`.

## Setting output variables using scripts {#Outputvariables-Settingoutputvariablesusingscripts}
## Setting output variables using scripts

You can set output variables using any of the scripting languages supported by Octopus. In each case we make special functions available to your scripts by bootstrapping them with a template defined in the [open-source Calamari project](https://github.com/OctopusDeploy/Calamari).

### PowerShell {#Outputvariables-PowerShell}
### PowerShell

[PowerShell Bootstrapping](https://github.com/OctopusDeploy/Calamari/tree/master/source/Calamari.Common/Features/Scripting/WindowsPowerShell/)

Expand All @@ -214,7 +214,7 @@ For example:
Set-OctopusVariable -name "TestResult" -value "Passed"
```

### C# {#Outputvariables-C#}
### C#

[Dotnet Script Bootstrapping](https://github.com/OctopusDeploy/Calamari/tree/master/source/Calamari.Common/Features/Scripting/DotnetScript)

Expand All @@ -226,7 +226,7 @@ From a C# script, you can use the `public static void SetVariable(string name, s
SetVariable("TestResult", "Passed");
```

### Bash {#Outputvariables-Bash}
### Bash

[Bash Bootstrapping](https://github.com/OctopusDeploy/Calamari/tree/master/source/Calamari.Common/Features/Scripting/Bash)

Expand All @@ -238,7 +238,7 @@ In a Bash script you can use the `set_octopusvariable` function to set the name
set_octopusvariable "TestResult" "Passed"
```

### F# {#Outputvariables-F#}
### F#

[FSharp Bootstrapping](https://github.com/OctopusDeploy/Calamari/tree/master/source/Calamari.Common/Features/Scripting/FSharp)

Expand Down
Loading

0 comments on commit c41bb4b

Please sign in to comment.