continuous-integrationcypresstekton

Mark failed Cypress test in Tekton as failure


I have integrated a Cypress test as a task in Tekton Pipeline. Issue that I am experiencing is that Cypress sometimes even if there is failed test it is marked by Tekton as success.

Is there a way to tell Tekton to mark it as failure if Cypress have failed tests?


Solution

  • You should exit with non-0, to mark a step as failed.

    If Tekton marks a task as succeeded, in your pipelinerun/taskrun: exit code was 0.