{"id":32394,"date":"2022-12-22T18:52:31","date_gmt":"2022-12-22T18:52:31","guid":{"rendered":"https:\/\/www.devopsschool.com\/blog\/?p=32394"},"modified":"2022-12-23T05:44:07","modified_gmt":"2022-12-23T05:44:07","slug":"octopus-deploy-variable-scope-and-precedence","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/octopus-deploy-variable-scope-and-precedence\/","title":{"rendered":"Octopus Deploy: Variable Scope and Precedence"},"content":{"rendered":"\n<p>Since variables can be scoped in many different ways, there needs to be a predictable, deterministic order in which they are resolved. The list below is the priority in which variable scopes take precedence. The top items are higher priority than the bottom ones:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>The current step\/action (most specific).<\/li>\n\n\n\n<li>The current machine.<\/li>\n\n\n\n<li>Roles applied to the current machine and targeted by the current step.<\/li>\n\n\n\n<li>Roles applied to the current machine.<\/li>\n\n\n\n<li>The target tenant&nbsp;(if tenant-features are enabled).<\/li>\n\n\n\n<li>The target tenant-tag (if tenant-features are enabled).<\/li>\n\n\n\n<li>The target environment.<\/li>\n\n\n\n<li>The target channel (if channels are enabled).<\/li>\n\n\n\n<li>The current deployment process or runbook process.<\/li>\n\n\n\n<li>The project.<\/li>\n\n\n\n<li>No scope (least specific).<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>Since variables can be scoped in many different ways, there needs to be a predictable, deterministic order in which they are resolved. The list below is the priority in which variable scopes take precedence. The top items are higher priority than the bottom ones:<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","_joinchat":[],"footnotes":""},"categories":[2],"tags":[],"class_list":["post-32394","post","type-post","status-publish","format-standard","hentry","category-uncategorised"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/32394","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=32394"}],"version-history":[{"count":1,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/32394\/revisions"}],"predecessor-version":[{"id":32395,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/32394\/revisions\/32395"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=32394"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=32394"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=32394"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}