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: .IPAddress. 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. Output variables from deployments triggered by a Deploy a Release step are captured and exposed as output variables on the Deploy a Release step. Changing website ports using output variables.When referencing this value, the result will be indeterministic, but it allows scripts to use the value without knowing which deployment target set it.įor some practical examples of using output variables, and how scoping rules are applied, see the following blog posts: A variable is created with no scope, and no differentiator in the name.This way Web01 will always get the value Web01 set, and Web02 will get the value Web02 set. A variable is created that is scoped to the deployment target.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.Note that for each output variable/deployment target combination: In this scenario, the following output variables would be captured: Name Which value should be used in subsequent steps? Imagine that an output variable was set by a script which ran on two deployment targets (Web01 and Web02) in parallel, and that both set it to a different value. Output variables become more complex when multiple deployment targets are involved, but they can still be used. .Notes - notes entered in response to the manual step..InstallationDirectoryPath - the path that the package was deployed to.Here are some examples of commonly used built-in output variables: In addition to variables that you create yourself using Set-OctopusVariable, Octopus also makes a number of built-in variables available. Set_octopusvariable("Password", "correct horse battery staple", True)Īfter a step runs, Octopus captures the output variables, and keeps them for use in subsequent steps.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |