{"action":"created","issue":{"url":"https://api.github.com/repos/MicrosoftDocs/vsts-docs/issues/2623","repository_url":"https://api.github.com/repos/MicrosoftDocs/vsts-docs","labels_url":"https://api.github.com/repos/MicrosoftDocs/vsts-docs/issues/2623/labels{/name}","comments_url":"https://api.github.com/repos/MicrosoftDocs/vsts-docs/issues/2623/comments","events_url":"https://api.github.com/repos/MicrosoftDocs/vsts-docs/issues/2623/events","html_url":"https://github.com/MicrosoftDocs/vsts-docs/issues/2623","id":386365423,"node_id":"MDU6SXNzdWUzODYzNjU0MjM=","number":2623,"title":"Azure Pipelines - Job Custom Condition - Syntax for parameters in Job Status Functions","user":{"login":"thoaingan","id":7240365,"node_id":"MDQ6VXNlcjcyNDAzNjU=","avatar_url":"https://avatars1.githubusercontent.com/u/7240365?v=4","gravatar_id":"","url":"https://api.github.com/users/thoaingan","html_url":"https://github.com/thoaingan","followers_url":"https://api.github.com/users/thoaingan/followers","following_url":"https://api.github.com/users/thoaingan/following{/other_user}","gists_url":"https://api.github.com/users/thoaingan/gists{/gist_id}","starred_url":"https://api.github.com/users/thoaingan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thoaingan/subscriptions","organizations_url":"https://api.github.com/users/thoaingan/orgs","repos_url":"https://api.github.com/users/thoaingan/repos","events_url":"https://api.github.com/users/thoaingan/events{/privacy}","received_events_url":"https://api.github.com/users/thoaingan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"vtbassmatt","id":714283,"node_id":"MDQ6VXNlcjcxNDI4Mw==","avatar_url":"https://avatars3.githubusercontent.com/u/714283?v=4","gravatar_id":"","url":"https://api.github.com/users/vtbassmatt","html_url":"https://github.com/vtbassmatt","followers_url":"https://api.github.com/users/vtbassmatt/followers","following_url":"https://api.github.com/users/vtbassmatt/following{/other_user}","gists_url":"https://api.github.com/users/vtbassmatt/gists{/gist_id}","starred_url":"https://api.github.com/users/vtbassmatt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vtbassmatt/subscriptions","organizations_url":"https://api.github.com/users/vtbassmatt/orgs","repos_url":"https://api.github.com/users/vtbassmatt/repos","events_url":"https://api.github.com/users/vtbassmatt/events{/privacy}","received_events_url":"https://api.github.com/users/vtbassmatt/received_events","type":"User","site_admin":false},"assignees":[{"login":"vtbassmatt","id":714283,"node_id":"MDQ6VXNlcjcxNDI4Mw==","avatar_url":"https://avatars3.githubusercontent.com/u/714283?v=4","gravatar_id":"","url":"https://api.github.com/users/vtbassmatt","html_url":"https://github.com/vtbassmatt","followers_url":"https://api.github.com/users/vtbassmatt/followers","following_url":"https://api.github.com/users/vtbassmatt/following{/other_user}","gists_url":"https://api.github.com/users/vtbassmatt/gists{/gist_id}","starred_url":"https://api.github.com/users/vtbassmatt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vtbassmatt/subscriptions","organizations_url":"https://api.github.com/users/vtbassmatt/orgs","repos_url":"https://api.github.com/users/vtbassmatt/repos","events_url":"https://api.github.com/users/vtbassmatt/events{/privacy}","received_events_url":"https://api.github.com/users/vtbassmatt/received_events","type":"User","site_admin":false},{"login":"andyjlewis","id":14275472,"node_id":"MDQ6VXNlcjE0Mjc1NDcy","avatar_url":"https://avatars2.githubusercontent.com/u/14275472?v=4","gravatar_id":"","url":"https://api.github.com/users/andyjlewis","html_url":"https://github.com/andyjlewis","followers_url":"https://api.github.com/users/andyjlewis/followers","following_url":"https://api.github.com/users/andyjlewis/following{/other_user}","gists_url":"https://api.github.com/users/andyjlewis/gists{/gist_id}","starred_url":"https://api.github.com/users/andyjlewis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andyjlewis/subscriptions","organizations_url":"https://api.github.com/users/andyjlewis/orgs","repos_url":"https://api.github.com/users/andyjlewis/repos","events_url":"https://api.github.com/users/andyjlewis/events{/privacy}","received_events_url":"https://api.github.com/users/andyjlewis/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2018-11-30T21:56:54Z","updated_at":"2018-12-03T14:36:12Z","closed_at":null,"author_association":"NONE","body":"I'm trying to configure a Pipeline Job to run under a custom condition, and I'm having a hard time writing the correct syntax for the custom condition.\r\n\r\nI have 3 jobs in total:\r\n- 1st Job Name: Deployment\r\n- 2nd Job Name: Validation\r\n- 3rd Job Name: Rollback\r\n\r\nI want the Rollback job to run only if Deployment was successful and Validation failed. Therefore, I wrote the variable expression like so:\r\n![image](https://user-images.githubusercontent.com/7240365/49316938-3713bb80-f4b8-11e8-85d0-6cc418f809c5.png)\r\n\r\nThis syntax obviously isn't correct. Below is the error it provides. Please advise on what the expression should look like.\r\n\r\nThank you!\r\n\r\n##[Error 1]\r\nException Message: Unexpected symbol: ')'. Located at position 27 within expression: and(succeeded('Deployment'), failed('Validation')). For more help, refer to https://go.microsoft.com/fwlink/?linkid=842996 (type ParseException)\r\nException Stack Trace:    at Microsoft.TeamFoundation.DistributedTask.Expressions.ExpressionParser.HandleEndParameter(ParseContext context) in C:\\t\\a\\_work\\6\\s\\DistributedTask\\Client\\WebApi\\Expressions\\ExpressionParser.cs:line 254\r\n   at Microsoft.TeamFoundation.DistributedTask.Expressions.ExpressionParser.CreateTree(ParseContext context) in C:\\t\\a\\_work\\6\\s\\DistributedTask\\Client\\WebApi\\Expressions\\ExpressionParser.cs:line 44\r\n   at Microsoft.TeamFoundation.DistributedTask.Expressions.ExpressionParser.CreateTree(String expression, ITraceWriter trace, IEnumerable`1 namedValues, IEnumerable`1 functions) in C:\\t\\a\\_work\\6\\s\\DistributedTask\\Client\\WebApi\\Expressions\\ExpressionParser.cs:line 18\r\n   at Microsoft.VisualStudio.Services.ReleaseManagement.Server.Processors.PhaseConditionEvaluator.ShouldExecutePhase(IVssRequestContext requestContext, ReleaseEnvironment releaseEnvironment, DeployPhaseSnapshot deployPhaseSnapshot, AutomationEngineInput automationEngineInput) in C:\\t\\a\\_work\\6\\s\\ReleaseManagement\\Service\\ReleaseManagement2\\Server\\Processors\\PhaseConditionEvaluator.cs:line 26\r\n   at Microsoft.VisualStudio.Services.ReleaseManagement.Server.Processors.DeployPhaseRunner.Run(Release release, ReleaseEnvironment releaseEnvironment, ReleaseEnvironmentStep deployStep, DeployPhaseSnapshot snapshotToProcess) in C:\\t\\a\\_work\\6\\s\\ReleaseManagement\\Service\\ReleaseManagement2\\Server\\Processors\\DeployPhaseRunner.cs:line 265\r\n   at Microsoft.VisualStudio.Services.ReleaseManagement.Server.Processors.DeployPhaseOrchestrator.RunDeployPhase(Release release, ReleaseEnvironment releaseEnvironment, ReleaseEnvironmentStep deployStep, DeployPhaseSnapshot snapshotToProcess) in C:\\t\\a\\_work\\6\\s\\ReleaseManagement\\Service\\ReleaseManagement2\\Server\\Processors\\DeployPhaseOrchestrator.cs:line 465\r\n   at Microsoft.VisualStudio.Services.ReleaseManagement.Server.Processors.DeployPhaseOrchestrator.MoveWorkflowForward(Release release, ReleaseEnvironment releaseEnvironment, ReleaseEnvironmentStep deployStep, ReleaseDeployPhase deployPhase, Func`5 runDeployPhase, Action`4 acceptStep, Action`3 rejectStep) in C:\\t\\a\\_work\\6\\s\\ReleaseManagement\\Service\\ReleaseManagement2\\Server\\Processors\\DeployPhaseOrchestrator.cs:line 297\r\n   at Microsoft.VisualStudio.Services.ReleaseManagement.Server.Processors.DeployPhaseOrchestrator.<>c__DisplayClass10_0.<HandleDeployPhaseCompletion>b__0(Release r, ReleaseEnvironment e, ReleaseEnvironmentStep s, ReleaseDeployPhase p) in C:\\t\\a\\_work\\6\\s\\ReleaseManagement\\Service\\ReleaseManagement2\\Server\\Processors\\DeployPhaseOrchestrator.cs:line 162\r\n   at Microsoft.VisualStudio.Services.ReleaseManagement.Server.Processors.DeployPhaseOrchestrator.UpdateDeployPhaseAndMoveWorkflowForward(Int32 releaseId, Int32 deployStepId, Int32 releaseDeployPhaseId, DeployPhaseStatus deployPhaseStatus, DeploymentOperationStatus operationStatus, Action`4 moveWorkflowForward, Action`4 handleException, Boolean shouldUpdateIfAnyStatus) in C:\\t\\a\\_work\\6\\s\\ReleaseManagement\\Service\\ReleaseManagement2\\Server\\Processors\\DeployPhaseOrchestrator.cs:line 401 \r\n\r\n"},"comment":{"url":"https://api.github.com/repos/MicrosoftDocs/vsts-docs/issues/comments/443731059","html_url":"https://github.com/MicrosoftDocs/vsts-docs/issues/2623#issuecomment-443731059","issue_url":"https://api.github.com/repos/MicrosoftDocs/vsts-docs/issues/2623","id":443731059,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MzczMTA1OQ==","user":{"login":"vtbassmatt","id":714283,"node_id":"MDQ6VXNlcjcxNDI4Mw==","avatar_url":"https://avatars3.githubusercontent.com/u/714283?v=4","gravatar_id":"","url":"https://api.github.com/users/vtbassmatt","html_url":"https://github.com/vtbassmatt","followers_url":"https://api.github.com/users/vtbassmatt/followers","following_url":"https://api.github.com/users/vtbassmatt/following{/other_user}","gists_url":"https://api.github.com/users/vtbassmatt/gists{/gist_id}","starred_url":"https://api.github.com/users/vtbassmatt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vtbassmatt/subscriptions","organizations_url":"https://api.github.com/users/vtbassmatt/orgs","repos_url":"https://api.github.com/users/vtbassmatt/repos","events_url":"https://api.github.com/users/vtbassmatt/events{/privacy}","received_events_url":"https://api.github.com/users/vtbassmatt/received_events","type":"User","site_admin":false},"created_at":"2018-12-03T14:36:12Z","updated_at":"2018-12-03T14:36:12Z","author_association":"COLLABORATOR","body":"Specifically, see [the Dependencies section](https://docs.microsoft.com/en-us/azure/devops/pipelines/process/conditions?view=vsts&tabs=yaml#dependencies).\r\n\r\nSomething like: `and(eq(dependencies.Deployment.result, 'Succeeded'), eq(dependencies.Validation.result, 'Failed'))`"}}
{"actor":{"display_login":"vtbassmatt"}}