Repository navigation
Inflight variable and parameters doc updates #3555
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| --- | ||
| layout: src/layouts/Default.astro | ||
| pubDate: 2026-03-05 | ||
| modDate: 2026-10-12 | ||
| modDate: 2026-11-04 | ||
| title: Project templates | ||
| subtitle: An overview of project templates | ||
| icon: fa-solid fa-layer-group | ||
|
|
@@ -127,7 +127,7 @@ If your license changes after you've published a template version, Octopus doesn | |
| Project templates don't yet support parameter scoping or sensitive parameter default values. We're still shaping how parameters, variables, and scoping work together and expect this area to evolve. We'd love your [feedback](#feedback). | ||
| ::: | ||
|
|
||
| To create a parameter, navigate to **Parameters** on your project template and add a new parameter. | ||
| To create a parameter, navigate to **Parameters** on your project template and select **Add parameter**. You can also [create a parameter or variable from the step that uses it](#create-from-step). | ||
|
|
||
| :::figure | ||
|  | ||
|
|
@@ -171,6 +171,44 @@ Scoping is fixed at the template level. The same scoping rules apply to every pr | |
|  | ||
| ::: | ||
|
|
||
| ## Create a parameter or variable from a step {#create-from-step} | ||
|
|
||
| Create a parameter or variable while you configure a step in the template's deployment process, so you don't have to switch to **Parameters** or **Variables** and back. Whichever you create is inserted into the field you're working in. | ||
|
|
||
| The **Create Parameter Value** drawer asks you to choose a **Type**: | ||
|
|
||
| - **Variable**: the value is fixed by the project template, and every project created from it gets the same value. | ||
| - **Parameter**: the value is supplied by each project that uses the template. | ||
|
|
||
| To create a parameter or variable from a step: | ||
|
|
||
| 1. In your project template, open the step you want to configure. | ||
| 2. In a text field or the script editor, select the **Insert a variable or parameter** button (**#\{\}**). | ||
| 3. In the search box, enter a name for the parameter or variable. | ||
| 4. Select the **Create Variable/Parameter** button, which shows the name you entered. The **Create Parameter Value** drawer opens. | ||
| 5. In **Type**, select **Variable** or **Parameter**. | ||
| 6. Enter the details for the value. A variable takes a value and optional scopes. A parameter takes a **Label** and optional **Help text** and **Default value**. | ||
| 7. Select **Create and Insert**. | ||
| 8. Commit your changes to the project template. | ||
|
|
||
| :::figure | ||
|  | ||
| ::: | ||
|
|
||
| The new variable appears under **Variables**, or the new parameter under **Parameters**, and the field you started from references it. | ||
|
|
||
| :::div{.hint} | ||
| A variable is committed to the template's branch as soon as you select **Create and Insert**. A parameter isn't saved until you commit your other changes to the template. Because the variable is saved first, you can only scope it to parameters that have already been committed. | ||
| ::: | ||
|
|
||
| :::div{.hint} | ||
| Some values can only be supplied by the project, such as worker pools and target tags. For those, the drawer skips the **Type** choice and creates a parameter. | ||
| ::: | ||
|
|
||
| :::div{.hint} | ||
| On a protected branch you can still create a parameter, but not a variable. On a tag or commit you can't create a variable. Switch to an unprotected branch to create one. | ||
| ::: | ||
|
|
||
| ## Project settings | ||
|
|
||
| Project templates let you set a few project-level defaults that flow through to every project created from the template. Configure these in **Settings** on the project template. | ||
|
|
@@ -216,5 +254,7 @@ Project templates are in Public Preview and we're actively shaping how the featu | |
|
|
||
| ## Version notes | ||
|
|
||
| - Creating a parameter or variable from a step in the process editor is available from [PLACEHOLDER: the first self-hosted Octopus Server version that includes creating variables and parameters from the process editor, with build number — needs: release version from Travis]. | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Need to add the final build number here |
||
|
|
||
| - [Channels](#channels) and [Lifecycles](#lifecycles) in Project Templates are available from Octopus Server version `2026.4.4005`. | ||
| - Retention policies in project template lifecycles are applied from Octopus Server version `2026.4.7884`. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| --- | ||
| layout: src/layouts/Default.astro | ||
| pubDate: 2026-03-16 | ||
| modDate: 2026-10-12 | ||
| modDate: 2026-11-04 | ||
| title: Templated projects | ||
| subtitle: How to create and manage projects from a project template | ||
| icon: fa-solid fa-layer-group | ||
|
|
@@ -68,6 +68,8 @@ Template values are the parameters the template owner has defined to let you cus | |
|  | ||
| ::: | ||
|
|
||
| To use a project variable as a template value, select the **Insert a variable** button (**#\{\}**) next to the field. If the variable doesn't exist yet, select **Create Variable** to create it without leaving the page. It's saved to the project's variables and inserted into the field. For the fields in the drawer, see [Create a variable from the process editor](/docs/projects/variables/getting-started#create-from-process-editor). | ||
|
|
||
| After you've provided the required values, you can create a release as usual. | ||
|
|
||
| :::div{.hint} | ||
|
|
@@ -104,3 +106,7 @@ When a new version of the template is published, you'll receive the update. How | |
| ## Limitations | ||
|
|
||
| Some features are not yet supported for templated projects. For a full list, see [Troubleshooting](/docs/platform-hub/templates/project-templates/troubleshooting). | ||
|
|
||
| ## Version notes | ||
|
|
||
| - Creating a project variable from the **Template values** page is available from [PLACEHOLDER: the first self-hosted Octopus Server version that includes creating variables and parameters from the process editor, with build number — needs: release version from Travis]. | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Need to add the final build number here |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| --- | ||
| layout: src/layouts/Default.astro | ||
| pubDate: 2024-03-06 | ||
| modDate: 2024-08-28 | ||
| modDate: 2026-11-04 | ||
| title: Getting started with variables | ||
| icon: fa-solid fa-play | ||
| description: A guide to getting started with variables in Octopus Deploy. | ||
|
|
@@ -46,6 +46,63 @@ In this example, we'll add a variable to a Hello World project that runs a scrip | |
|
|
||
| When a release of the project is deployed, the script step will run with the string *Hello, Test* on the Test environment, and with the string *Hello, Production*, on the Production environment. | ||
|
|
||
| ## Create a variable from the process editor \{#create-from-process-editor} | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we be replacing the example above with these steps? Then new users will be encouraged to use the new feature.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think we can outright replace it since there might be new users that are on older versions, we could swap them around so the new method is first on the page |
||
|
|
||
| You can create a project variable without leaving the step you're editing. The variable is saved to the project and inserted into the field you're working in, so you don't have to switch to **Project Variables** and back. This example builds the same Hello World script as the previous section. | ||
|
|
||
| **Before you begin** | ||
|
|
||
| You'll need: | ||
|
|
||
| - A [project](/docs/projects) with a deployment process. | ||
| - Permission to edit variables in the project. | ||
| - For a project that stores its variables in Git, an unprotected branch selected in the branch switcher. | ||
| - Octopus Deploy on version `>= REPLACE_ME_WITH_VERSION_NUMBER`. | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Need to add the final build number here |
||
|
|
||
| To create a variable from the process editor: | ||
|
|
||
| 1. In your project, select **Process**. | ||
| 2. Select **Add Step**, then select **Run a Script**. | ||
| 3. In the **Script** section, enter the following PowerShell into the script editor, followed by a space: | ||
|
|
||
| ```powershell | ||
| Write-Host | ||
| ``` | ||
|
|
||
| 4. Select the **Insert a variable** button (**#\{\}**) in the script editor. | ||
| 5. In the search box, enter *Greeting*. | ||
| 6. Select **Create “Greeting” Variable**. The **Create Variable** drawer opens with *Greeting* already in **Variable name**. | ||
|
|
||
| :::figure | ||
|  | ||
| ::: | ||
|
|
||
| 7. In **Type**, keep **Text** selected. | ||
| 8. In **Value 1**, enter *Hello, Test*. | ||
| 9. Select **Add scope**, then select **Environments**. | ||
| 10. In **Environments**, select *Test*. | ||
| 11. Select **Add Value**. | ||
| 12. In **Value 2**, enter *Hello, Production*. | ||
| 13. Select **Add scope**, then select **Environments**. | ||
| 14. In **Environments**, select *Production*. | ||
|
|
||
| :::figure | ||
|  | ||
| ::: | ||
|
|
||
| 15. Select **Create and Insert**. | ||
| 16. Select **Save** to save the step. | ||
|
|
||
| The drawer closes, `$Greeting`(if using Powershell syntax) appears in the script after `Write-Host`, and *Greeting* is listed with both values under **Project Variables**. When a release is deployed, the step prints *Hello, Test* on the Test environment and *Hello, Production* on the Production environment. | ||
|
|
||
| :::div{.hint} | ||
| Fields that take a variable rather than free text, such as a certificate or account field, have their own **Create Variable** button next to the field. It opens the same drawer, offers only the variable types the field accepts, and selects the new variable in the field when you select **Create and Insert**. | ||
| ::: | ||
|
|
||
| :::div{.hint} | ||
| If your project stores variables in Git and you're viewing a protected branch, a tag, or a commit, the drawer is read-only. Switch to an unprotected branch to create the variable. | ||
| ::: | ||
|
|
||
| ## Scoping variables \{#scoping-variables} | ||
|
|
||
| The variables that you define for your projects in Octopus can be scoped in the following ways: | ||
|
|
@@ -249,6 +306,10 @@ If you have many configuration settings for your application and are using a var | |
|
|
||
| If the answer to either question is yes, consider an external store for your variables. This might be a source control repository, a configuration management system, or a database. | ||
|
|
||
| ## Version notes | ||
|
|
||
| - Creating a project variable from the process editor is available from [PLACEHOLDER: the first self-hosted Octopus Server version that includes creating variables from the process editor, with build number — needs: release version from Travis]. | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Need to add the final build number here |
||
|
|
||
| ## Learn more | ||
|
|
||
| - [Using variables in your scripts](/docs/deployments/custom-scripts) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to add the final build number here