Need a Help > Any DevOps here? I am new to Jenk...
# random
w
Need a Help > Any DevOps here? I am new to Jenkins, I want to roll back the deployment if the integration test case fails. Env is Node.js #help
m
can you not run the tests before the deployment?
w
Those are postman scripts wrapped with nodejs, it should run after deployment only.
w
Are these integration tests or post-deployment validations?
w
You can say post-deployment validations
m
jenkins is more or less a task runner, so you'll have to build rollback logic yourself. If you're using jenkinsfiles & pipelines, you can do something like
Copy code
post { 
  failure { 
    rollback_logic_here 
  }
}
see also: https://stackoverflow.com/questions/23551742/how-do-i-run-a-task-on-failure-in-jenkins