E2E testing and CI/CD

Hi All,

Im looking to build a jenkins pipeline that will detect changes to the repository of a dash app.
The flow will roughly be

  1. Detect change in repo
  2. Determine when new deployment is finished and application is ready to be tested
  3. Run E2E tests
  4. Produce test report

For number 2 Im not sure how to determine if the application if has been deployed successfully or if the deployment stage in heroku has finished.
Is there a cli command I can run that will determine this. Or perhaps pining the server and detecting a certain status.

Thanks for your ideas.