-
Notifications
You must be signed in to change notification settings - Fork 5
OctopusInvalidVariableNameCheck
OctoLintInvalidVariableNames
returns a warning if any project variables are named incorrectly, according to a specified regular expression.
Without established naming conventions, variable name collisions are possible. A common example is when a project and a variable set have the same variable name scoped to the same environment. When a name collision occurs, Octopus Deploy will do its best to pick the "right one" using an algorithm. But sometimes, the variables are scoped equally. If this occurs, Octopus will choose project-defined variables ahead of library-defined ones.
The recommendation is to avoid name collisions in the first place by following these naming standards.
Project.[Component].[Name]
- for example, Project.Database.UserName
.
[ProjectName].[Component].[Name]
- for example, OctoPetShopWebUI.URL.Port
.
[TemplateShortName].[Component].[Name]
- for example, SlackNotification.Message.Body
.
Library.[LibrarySetName].[Component].[Name]
- for example, Library.Notification.Slack.Message
.
Note: These naming conventions only apply to variables used for a deployment or runbook run. Variables used for configuration file replacement have a specific naming convention to follow. The above naming convention makes it easier to distinguish between the two.
Consider changing the variable names to valid ones that match your convention.