{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/vsts-tasks/issues/6782","repository_url":"https://api.github.com/repos/Microsoft/vsts-tasks","labels_url":"https://api.github.com/repos/Microsoft/vsts-tasks/issues/6782/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/vsts-tasks/issues/6782/comments","events_url":"https://api.github.com/repos/Microsoft/vsts-tasks/issues/6782/events","html_url":"https://github.com/Microsoft/vsts-tasks/issues/6782","id":308003705,"number":6782,"title":"Deployment Gate doesn't evaluate/exapand Variable ","user":{"login":"rmarinho","id":1235097,"avatar_url":"https://avatars3.githubusercontent.com/u/1235097?v=4","gravatar_id":"","url":"https://api.github.com/users/rmarinho","html_url":"https://github.com/rmarinho","followers_url":"https://api.github.com/users/rmarinho/followers","following_url":"https://api.github.com/users/rmarinho/following{/other_user}","gists_url":"https://api.github.com/users/rmarinho/gists{/gist_id}","starred_url":"https://api.github.com/users/rmarinho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmarinho/subscriptions","organizations_url":"https://api.github.com/users/rmarinho/orgs","repos_url":"https://api.github.com/users/rmarinho/repos","events_url":"https://api.github.com/users/rmarinho/events{/privacy}","received_events_url":"https://api.github.com/users/rmarinho/received_events","type":"User","site_admin":false},"labels":[{"id":391088230,"url":"https://api.github.com/repos/Microsoft/vsts-tasks/labels/Area:%20Release","name":"Area: Release","color":"5319e7","default":false}],"state":"open","locked":false,"assignee":{"login":"vithati","id":19663618,"avatar_url":"https://avatars2.githubusercontent.com/u/19663618?v=4","gravatar_id":"","url":"https://api.github.com/users/vithati","html_url":"https://github.com/vithati","followers_url":"https://api.github.com/users/vithati/followers","following_url":"https://api.github.com/users/vithati/following{/other_user}","gists_url":"https://api.github.com/users/vithati/gists{/gist_id}","starred_url":"https://api.github.com/users/vithati/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vithati/subscriptions","organizations_url":"https://api.github.com/users/vithati/orgs","repos_url":"https://api.github.com/users/vithati/repos","events_url":"https://api.github.com/users/vithati/events{/privacy}","received_events_url":"https://api.github.com/users/vithati/received_events","type":"User","site_admin":false},"assignees":[{"login":"vithati","id":19663618,"avatar_url":"https://avatars2.githubusercontent.com/u/19663618?v=4","gravatar_id":"","url":"https://api.github.com/users/vithati","html_url":"https://github.com/vithati","followers_url":"https://api.github.com/users/vithati/followers","following_url":"https://api.github.com/users/vithati/following{/other_user}","gists_url":"https://api.github.com/users/vithati/gists{/gist_id}","starred_url":"https://api.github.com/users/vithati/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vithati/subscriptions","organizations_url":"https://api.github.com/users/vithati/orgs","repos_url":"https://api.github.com/users/vithati/repos","events_url":"https://api.github.com/users/vithati/events{/privacy}","received_events_url":"https://api.github.com/users/vithati/received_events","type":"User","site_admin":false},{"login":"bansalaseem","id":22289943,"avatar_url":"https://avatars1.githubusercontent.com/u/22289943?v=4","gravatar_id":"","url":"https://api.github.com/users/bansalaseem","html_url":"https://github.com/bansalaseem","followers_url":"https://api.github.com/users/bansalaseem/followers","following_url":"https://api.github.com/users/bansalaseem/following{/other_user}","gists_url":"https://api.github.com/users/bansalaseem/gists{/gist_id}","starred_url":"https://api.github.com/users/bansalaseem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bansalaseem/subscriptions","organizations_url":"https://api.github.com/users/bansalaseem/orgs","repos_url":"https://api.github.com/users/bansalaseem/repos","events_url":"https://api.github.com/users/bansalaseem/events{/privacy}","received_events_url":"https://api.github.com/users/bansalaseem/received_events","type":"User","site_admin":false}],"milestone":null,"comments":2,"created_at":"2018-03-23T12:01:54Z","updated_at":"2018-04-13T04:36:09Z","closed_at":null,"author_association":"MEMBER","body":"## Environment\r\n- Server - VSTS\r\n  - devdiv account  \r\n - https://devdiv.visualstudio.com/DevDiv/Xamarin%20Forms/_apps/hub/ms.vss-releaseManagement-web.hub-explorer?releaseId=87244&definitionId=567&_a=release-logs\r\n\r\n- Agent - Hosted or Private: \r\n    \r\n    - Hosted\r\n\r\n## Issue Description\r\n\r\nI m using the Gates feature to check a REST endpoint value. My issue is when the gate is calling the rest endpoint it doesn't replace/evaluate my variable.\r\nOn  the field \"Url suffix and parameters\" I set `XamarinForms/Xamarin.Forms.ControlGallery.iOS/test_runs/$(AppCenterTestRunId)/state` where I hope *AppCenterTestRunId* is a Guid that is set in a previous task that runs on my environment.\r\n\r\nThe thing is when the Gate is evaluated my variable is still empty. I can confirm that my variable was set on my task, because I print the variables after (and before the post deployment gate) and I see that \r\nAppCenterTestRunId has a new guid. But when it evaluates I only get this:\r\n\r\n```\r\n2018-03-23T11:52:35.7529542Z GET https://api.appcenter.ms/v0.1/apps/XamarinForms/Xamarin.Forms.ControlGallery.iOS/test_runs//state\r\n\t\t\t\tResponse Code: 0\r\n\t\t\t\tResponse: An error was encountered while processing request. Exception: \r\n```\r\n[Include task name(s), screenshots and any other relevant details]\r\n\r\nRest API task on Pre and Post deployment gates\r\n\r\nI also tried this by running after my environment as post deployment gate, and in my next environment on the pipeline as a pre deployment gate but I had the same issue. \r\n\r\n### Error logs\r\n\r\n2018-03-23T11:52:35.7529542Z GET https://api.appcenter.ms/v0.1/apps/XamarinForms/Xamarin.Forms.ControlGallery.iOS/test_runs//state\r\n\t\t\t\tResponse Code: 0\r\n\t\t\t\tResponse: An error was encountered while processing request. Exception: <!DOCTYPE html>\r\n<html lang=\"en\">\r\n<head>\r\n<meta charset=\"utf-8\">\r\n<title>Error</title>\r\n</head>\r\n<body>\r\n<pre>Cannot GET /v0.1/apps/XamarinForms/Xamarin.Forms.ControlGallery.iOS/test_runs//state</pre>\r\n</body>\r\n</html>\r\n\r\nException Message: The remote server returned an error: (404) Not Found. (type WebException)\r\n\t\t\t\tEvaluation of expression 'or(eq(root['exit_code'], 0), eq(root['exit_code'], 1))' failed."},"comment":{"url":"https://api.github.com/repos/Microsoft/vsts-tasks/issues/comments/381020671","html_url":"https://github.com/Microsoft/vsts-tasks/issues/6782#issuecomment-381020671","issue_url":"https://api.github.com/repos/Microsoft/vsts-tasks/issues/6782","id":381020671,"user":{"login":"vithati","id":19663618,"avatar_url":"https://avatars2.githubusercontent.com/u/19663618?v=4","gravatar_id":"","url":"https://api.github.com/users/vithati","html_url":"https://github.com/vithati","followers_url":"https://api.github.com/users/vithati/followers","following_url":"https://api.github.com/users/vithati/following{/other_user}","gists_url":"https://api.github.com/users/vithati/gists{/gist_id}","starred_url":"https://api.github.com/users/vithati/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vithati/subscriptions","organizations_url":"https://api.github.com/users/vithati/orgs","repos_url":"https://api.github.com/users/vithati/repos","events_url":"https://api.github.com/users/vithati/events{/privacy}","received_events_url":"https://api.github.com/users/vithati/received_events","type":"User","site_admin":false},"created_at":"2018-04-13T04:36:09Z","updated_at":"2018-04-13T04:36:09Z","author_association":"MEMBER","body":"Output varaibles across phases and environments are not supported presently. And server task and gates does not support output varaibles with in phase also. Because of this previous task vairables are not replaced in present task. "}}
{"actor":{"display_login":"vithati"}}