{"id":32045,"date":"2017-05-18T02:30:13","date_gmt":"2017-05-18T10:30:13","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/visualstudioalm\/?p=32045"},"modified":"2019-02-14T15:51:40","modified_gmt":"2019-02-14T23:51:40","slug":"defining-variables-while-creating-a-release-in-rm-a-k-a-draft-releases","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/devops\/defining-variables-while-creating-a-release-in-rm-a-k-a-draft-releases\/","title":{"rendered":"Defining variables while creating a Release in RM"},"content":{"rendered":"<p><font size=\"3\">We have had a number of customers ask us how they can create \/ define variables while creating a Release, similar to how they can do this while queueing a Build.&nbsp; So I thought I would write a quick blog that explains how this can be done.<\/font><\/p>\n<p><font size=\"3\">For reference, below is the screenshot of how this can be achieved while queueing a build:<\/font><\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/6\/2019\/05\/image383.png\"><img decoding=\"async\" title=\"image\" style=\"border-top: 0px;border-right: 0px;border-bottom: 0px;padding-top: 0px;padding-left: 0px;border-left: 0px;padding-right: 0px\" border=\"0\" alt=\"image\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2017\/05\/image_thumb353.png\" width=\"467\" height=\"384\"><\/a><\/p>\n<p>In RM, let say that we have a Release Definition called MyReleaseDefinition, and we want to change the value of variable a1 to \u201cfoo2\u201d for a particular release.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/6\/2019\/05\/image386.png\"><img decoding=\"async\" title=\"image\" style=\"border-top: 0px;border-right: 0px;border-bottom: 0px;padding-top: 0px;padding-left: 0px;border-left: 0px;padding-right: 0px\" border=\"0\" alt=\"image\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2017\/05\/image_thumb356.png\" width=\"559\" height=\"298\"><\/a><\/p>\n<p>This can be achieved by creating and editing a <strong>Draft Release <\/strong>using the steps below:<\/p>\n<p>1. Create the release in <strong>Draft <\/strong>mode.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/6\/2019\/05\/image387.png\"><img decoding=\"async\" title=\"image\" style=\"border-top: 0px;border-right: 0px;border-bottom: 0px;padding-top: 0px;padding-left: 0px;border-left: 0px;padding-right: 0px\" border=\"0\" alt=\"image\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2017\/05\/image_thumb357.png\" width=\"544\" height=\"306\"><\/a><\/p>\n<p>2. Edit the variable that you want to change e.g. edit the value of a1 to \u201cfoo2\u201d:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/6\/2019\/05\/image388.png\"><img decoding=\"async\" title=\"image\" style=\"border-top: 0px;border-right: 0px;border-bottom: 0px;padding-top: 0px;padding-left: 0px;border-left: 0px;padding-right: 0px\" border=\"0\" alt=\"image\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2017\/05\/image_thumb358.png\" width=\"535\" height=\"340\"><\/a><\/p>\n<p>You can also do a whole bunch of other operations on the release in Draft mode e.g. add other variables, change task parameters, etc.<\/p>\n<p>3. Save the Draft release<\/p>\n<p>4. Start the release<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/6\/2019\/05\/image389.png\"><img decoding=\"async\" title=\"image\" style=\"border-top: 0px;border-right: 0px;border-bottom: 0px;padding-top: 0px;padding-left: 0px;border-left: 0px;padding-right: 0px\" border=\"0\" alt=\"image\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2017\/05\/image_thumb359.png\" width=\"244\" height=\"133\"><\/a><\/p>\n<p>Hope this helps!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We have had a number of customers ask us how they can create \/ define variables while creating a Release, similar to how they can do this while queueing a Build.&nbsp; So I thought I would write a quick blog that explains how this can be done. For reference, below is the screenshot of how [&hellip;]<\/p>\n","protected":false},"author":123,"featured_media":45953,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[226,1],"tags":[],"class_list":["post-32045","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ci","category-devops"],"acf":[],"blog_post_summary":"<p>We have had a number of customers ask us how they can create \/ define variables while creating a Release, similar to how they can do this while queueing a Build.&nbsp; So I thought I would write a quick blog that explains how this can be done. For reference, below is the screenshot of how [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/posts\/32045","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/users\/123"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/comments?post=32045"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/posts\/32045\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/media\/45953"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/media?parent=32045"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/categories?post=32045"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/tags?post=32045"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}