Skip to content

Commit 3d5b05e

Browse files
authored
Add docs for nuget source override variable (#3053)
* Add docs for nuget source override variable * Lint
1 parent 2487b9f commit 3d5b05e

1 file changed

Lines changed: 60 additions & 54 deletions

File tree

src/pages/docs/projects/variables/system-variables.md

Lines changed: 60 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
layout: src/layouts/Default.astro
33
pubDate: 2023-01-01
4-
modDate: 2025-05-12
4+
modDate: 2026-03-06
55
title: System variables
66
icon: fa-solid fa-desktop
77
description: System variables are variables provided by Octopus that can be used in your deployments.
@@ -10,7 +10,7 @@ navOrder: 20
1010

1111
This page lists built-in [variables](/docs/projects/variables/) provided by Octopus that can be used in your deployment [custom scripts](/docs/deployments/custom-scripts).
1212

13-
Most of the variables listed here are available in modern versions of Octopus and Calamari. However, some are only available from a specific version. See [Older versions](#older-versions) for more detail on when variables became available.
13+
Most of the variables listed here are available in modern versions of Octopus and Calamari. However, some are only available from a specific version. See [Older versions](#older-versions) for more detail on when variables became available.
1414

1515
:::div{.warning}
1616
**All variables are strings**
@@ -62,12 +62,12 @@ Packages, including changes, associated with the release. See below. This is a c
6262

6363
Build and version control details associated with the release. This is a collection.
6464

65-
:::div{.hint}
65+
:::div{.hint}
6666

6767
The `Octopus.Release.Package` and `Octopus.Release.Builds` variables:
6868

69-
* will only be populated if [build information](/docs/packaging-applications/build-servers/build-information) has been pushed from the build server.
70-
* is only available to be used by the project [release notes](/docs/releases/release-notes), it is not accessible from the project deployment steps.
69+
- will only be populated if [build information](/docs/packaging-applications/build-servers/build-information) has been pushed from the build server.
70+
- is only available to be used by the project [release notes](/docs/releases/release-notes), it is not accessible from the project deployment steps.
7171

7272
:::
7373

@@ -101,30 +101,30 @@ public class Commit
101101

102102
The packages in a release are available as a collection which can be [iterated over](/docs/projects/variables/variable-substitutions/#repetition). e.g.
103103

104-
```
104+
```text
105105
#{each package in Octopus.Release.Package}
106106
This release contains #{package.PackageId} #{package.Version}
107107
#{/each}
108108
```
109109

110110
A particular package can be selected by indexing on the package ID:
111111

112-
```
112+
```text
113113
#{Octopus.Release.Package[Acme.Web].Version}
114114
```
115115

116116
The variables available for packages are:
117117

118-
| Name | Example|
119-
| -------------------- | -------|
120-
|`PackageId`| `#{package.PackageId}` |
121-
|`Version`| `#{package.Version}` |
122-
|`Commits`| This is a collection. See below. |
123-
|`WorkItems`| This is a collection. See below. |
118+
| Name | Example |
119+
| ----------- | --------------------------------- |
120+
| `PackageId` | `#{package.PackageId}` |
121+
| `Version` | `#{package.Version}` |
122+
| `Commits` | This is a collection. See below. |
123+
| `WorkItems` | This is a collection. See below. |
124124

125125
On each package, the commits associated with that package are available as a collection which can be iterated over. e.g.:
126126

127-
```
127+
```text
128128
#{each package in Octopus.Release.Package}
129129
#{each commit in package.Commits}
130130
- [#{commit.CommitId}](#{commit.LinkUrl}) - #{commit.Comment}
@@ -134,42 +134,42 @@ On each package, the commits associated with that package are available as a col
134134

135135
A particular commit can be selected by indexing on the commit ID (when using git the commit ID is the commit hash):
136136

137-
```
137+
```text
138138
package.Commits[685afd4161d085e6e5f56a66e72e2298e402b114].Comment
139139
```
140140

141141
The variables available for commits are:
142142

143-
| Name | Example|
144-
| -------------------- | -------|
145-
|`CommitId`| `#{commit.CommitId}` |
146-
|`LinkUrl`| `#{commit.LinkUrl}` |
147-
|`Comment`| `#{commit.Comment}` |
143+
| Name | Example |
144+
| ---------- | ---------------------- |
145+
| `CommitId` | `#{commit.CommitId}` |
146+
| `LinkUrl` | `#{commit.LinkUrl}` |
147+
| `Comment` | `#{commit.Comment}` |
148148

149149
If the Octopus instance has one or more of the [Issue Tracker integrations](/docs/releases/issue-tracking) enabled, the commit messages will be parsed for issues. Any issues found will be displayed with the build information, and also available as variables:
150150

151-
```
151+
```text
152152
#{each issue in package.WorkItems}
153153
- [#{issue.Id}](#{issue.LinkUrl})
154154
#{/each}
155155
```
156156

157157
A particular issue can be selected by indexing on the ID:
158158

159-
```
159+
```text
160160
package.WorkItems[4465].LinkUrl
161161
```
162162

163163
The variables available for issues are:
164164

165-
| Name | Example|
166-
| -------------------- | -------|
167-
|`Id`| `#{issue.Id}` |
168-
|`LinkUrl`| `#{issue.LinkUrl}` |
165+
| Name | Example |
166+
| --------- | ------------------ |
167+
| `Id` | `#{issue.Id}` |
168+
| `LinkUrl` | `#{issue.LinkUrl}` |
169169

170170
There is also a distinct list of issues across all packages available in:
171171

172-
```
172+
```text
173173
#{each workItem in Octopus.Release.WorkItems}
174174
- [#{workItem.Id}](#{workItem.LinkUrl}) - #{workItem.Description}
175175
#{/each}
@@ -202,15 +202,15 @@ public class BuildPackage
202202

203203
The builds in a release are available as a collection which can be [iterated over](/docs/projects/variables/variable-substitutions/#repetition). e.g.
204204

205-
```
205+
```text
206206
#{each build in Octopus.Release.Builds}
207207
This release contains resources contributed by the build #{build.BuildUrl}
208208
#{/each}
209209
```
210210

211211
Builds have a zero-based integer index, meaning the first build can be selected at index 0:
212212

213-
```
213+
```text
214214
Octopus.Release.Builds[0].BuildUrl
215215
```
216216

@@ -289,21 +289,21 @@ Example: `#{build.Packages[0].Version}`
289289
For projects that have [version control](/docs/projects/version-control) enabled, information about the branch and commit from which the release was created is also available.
290290

291291
`Octopus.Release.Git.BranchName`
292-
292+
293293
The branch name.
294-
294+
295295
Example: *features/some-new-feature*
296296

297297
`Octopus.Release.Git.CommitHash`
298-
299-
The commit hash.
300-
298+
299+
The commit hash.
300+
301301
Example: *0c708fdec272bc4446c6cabea4f0022c2b616eba*
302302

303303
`Octopus.Release.Git.Ref`
304-
304+
305305
The git reference.
306-
306+
307307
Example: *Version 1*
308308

309309
## Deployment
@@ -432,15 +432,15 @@ Example: *Tenant type/External, Upgrade ring/Early adopter*
432432

433433
`Octopus.Deployment.Trigger.Id`
434434

435-
The ID of the Trigger that created the deployment. It is possible for a deployment to be triggered due to multiple triggers. In this case, the variable will contain the ID of _one_ of the triggers.
435+
The ID of the Trigger that created the deployment. It is possible for a deployment to be triggered due to multiple triggers. In this case, the variable will contain the ID of *one* of the triggers.
436436

437437
Example: *ProjectTriggers-522*
438438

439439
`Octopus.Deployment.Trigger.Name`
440440

441-
The name of the Trigger that created the deployment. It is possible for a deployment to be triggered due to multiple triggers. In this case, the variable will contain the name of _one_ of the triggers.
441+
The name of the Trigger that created the deployment. It is possible for a deployment to be triggered due to multiple triggers. In this case, the variable will contain the name of *one* of the triggers.
442442

443-
*Nightly Deploy to Dev*
443+
Example: *Nightly Deploy to Dev*
444444

445445
`Octopus.Deployment.WorkerLeaseCap`
446446

@@ -748,11 +748,12 @@ public class CommitDetails
748748
public string Comment { get; set; }
749749
}
750750
```
751+
751752
There is an entry per release and it includes the release notes (**in markdown format**) and the build information for each of the packages in that release.
752753

753754
**Example:** The following iterates the changes in the deployment, printing the release version and the issues contained.
754755

755-
```
756+
```text
756757
#{each change in Octopus.Deployment.Changes}
757758
#{change.Version}
758759
#{each issue in change.WorkItems}
@@ -907,6 +908,12 @@ The syntax of the script being run in a script step.
907908

908909
Example: *PowerShell*
909910

911+
`Octopus.Action.Script.CSharp.NuGetSource`
912+
913+
Overrides the NuGet source used by the dotnet executor when running C# script steps.
914+
915+
Example: *<https://my-nuget-server/nuget>*
916+
910917
`Octopus.Action.SkipRemainingConventions`
911918

912919
If set by the user, completes processing of the action without running further conventions/scripts *(Boolean)*. This should be set as an [output variable](/docs/projects/variables/output-variables). e.g. <br /> `Set-OctopusVariable -name 'Octopus.Action.SkipRemainingConventions' -value 'True'`
@@ -1109,7 +1116,7 @@ Example: *True*
11091116

11101117
The Storage URI of the \*.cspkg file that will be deployed to the Cloud Service.
11111118

1112-
Example: https://my-storage-account/container/my-cloudservice.web.cspkg
1119+
Example: <https://my-storage-account/container/my-cloudservice.web.cspkg>
11131120

11141121
`Octopus.Action.Azure.UseCurrentInstanceCount`
11151122

@@ -1209,15 +1216,15 @@ Example: *alice*
12091216

12101217
`Octopus.Action[_name_].Output.OctopusAzureCloudServiceDeploymentID`
12111218

1212-
The ID of the completed Azure Cloud Service deployment.
1219+
The ID of the completed Azure Cloud Service deployment.
12131220

12141221
Example: *c9f52da2b00a4313b3b64bb2ad0f409f*
12151222

12161223
`Octopus.Action[_name_].Output.OctopusAzureCloudServiceDeploymentUrl`
12171224

12181225
The Url of the completed Azure Cloud Service deployment.
12191226

1220-
Example: *http://c9f52da2b00a4313b3b64bb2ad0f409f.cloudapp.net/*
1227+
Example: *<http://c9f52da2b00a4313b3b64bb2ad0f409f.cloudapp.net/>*
12211228

12221229
## Step
12231230

@@ -1259,7 +1266,6 @@ If the step failed because of an error, a full description of the error.
12591266

12601267
Example: *System.Net.SocketException: The server could not be contacted (at ...)*
12611268

1262-
12631269
## Agent
12641270

12651271
Agent-level variables describe the deployment agent or Tentacle on which the deployment is executing.
@@ -1316,7 +1322,7 @@ Example: *[https://my-octopus](https://my-octopus)*
13161322

13171323
`Octopus.Web.ServerUri`
13181324

1319-
The default URL at which the server portal can be accessed, as configured in the **Configuration ➜ Nodes** settings.
1325+
The default URL at which the server portal can be accessed, as configured in the **Configuration ➜ Nodes** settings.
13201326

13211327
*[https://my-octopus](https://my-octopus)*
13221328

@@ -1382,7 +1388,7 @@ Example: *3/13/20 6:23:38 AM +00:00*
13821388

13831389
The branch name if the runbook run was created from a branch
13841390

1385-
*branch-abc*
1391+
Example: *branch-abc*
13861392

13871393
`Octopus.RunbookRun.Git.CommitHash`
13881394

@@ -1424,7 +1430,7 @@ Example: *RunbookSnapshots-123*
14241430

14251431
The name of the snapshot.
14261432

1427-
*Snapshot EXAMPLE3*
1433+
Example: *Snapshot EXAMPLE3*
14281434

14291435
`Octopus.RunbookSnapshot.Notes`
14301436

@@ -1480,11 +1486,10 @@ Example: True
14801486

14811487
`OctopusFreeDiskSpaceOverrideInMegaBytes`
14821488

1483-
The amount (in megabytes) of available free disk space we should check for (overriding the default 500MB), failing the deployment if not enough free disk space is available.
1489+
The amount (in megabytes) of available free disk space we should check for (overriding the default 500MB), failing the deployment if not enough free disk space is available.
14841490

14851491
Example: 100
14861492

1487-
14881493
`OctopusShouldFailDeploymentOnSubstitutionFails`
14891494

14901495
If set to "True", the deployment will fail if any variable substitution fails. This variable was added in Octopus 2025.1.0.
@@ -1505,7 +1510,7 @@ Example: False
15051510

15061511
`Octopus.Action.Script.SuppressEnvironmentLogging`
15071512

1508-
To suppress/disable the environment logging that occurs from script (eg. PowerShell or Bash Script Environment Variables logging). This only suppresses script logging and does not suppress the Octopus or Calamari environment logging.
1513+
To suppress/disable the environment logging that occurs from script (eg. PowerShell or Bash Script Environment Variables logging). This only suppresses script logging and does not suppress the Octopus or Calamari environment logging.
15091514

15101515
Example: True
15111516

@@ -1523,7 +1528,7 @@ Example: True
15231528

15241529
`Octopus.Action.Package.RunScripts`
15251530

1526-
Set to `false` to prevent scripts inside packages from executing.
1531+
Set to `false` to prevent scripts inside packages from executing.
15271532

15281533
Example: True
15291534

@@ -1549,9 +1554,10 @@ Octopus will run one task at a time for a given concurrency tag. Set the variabl
15491554
Example: #{Octopus.Deployment.Tenant.Id}/#{Octopus.Project.Id}/#{Octopus.Environment.Id}
15501555

15511556
## Older versions {#older-versions}
1552-
* `Octopus.Release.Git.BranchName`, `Octopus.Release.Git.CommitHash` and `Octopus.Release.Git.Ref` is available from Octopus Deploy **2021.3** onwards.
1553-
* `Octopus.Web.ServerUri` is available from Octopus Deploy **2019.4.0** onwards.
1554-
* `Octopus.Deployment.Tenant.Id`, `Octopus.Deployment.Tenant.Name` and `Octopus.Deployment.Tenant.Tags` is available from Octopus Deploy **3.4** onwards.
1557+
1558+
- `Octopus.Release.Git.BranchName`, `Octopus.Release.Git.CommitHash` and `Octopus.Release.Git.Ref` is available from Octopus Deploy **2021.3** onwards.
1559+
- `Octopus.Web.ServerUri` is available from Octopus Deploy **2019.4.0** onwards.
1560+
- `Octopus.Deployment.Tenant.Id`, `Octopus.Deployment.Tenant.Name` and `Octopus.Deployment.Tenant.Tags` is available from Octopus Deploy **3.4** onwards.
15551561

15561562
## Learn more
15571563

0 commit comments

Comments
 (0)