API call to Pass/Fail a build?

Is there an API call that would allow me to Pass or Fail a specific build by any chance?

I’m looking at the possibility of running our UI/E2E tests outside of a CircleCI build and would like to mark the CircleCI as Passed or Failed depending on the result of the tests.

Thanks for any info!!

That sounds like the “manual job approval” functionality: https://circleci.com/blog/manual-job-approval-and-scheduled-workflow-runs/

Yeah, it’s related to that. However, I’d like to “approve” the build via an api call, not manually.

Not directly no.

If the test happen fast enough, you can have CircleCI just wait during a build for the results of the external tests.

Otherwise, after the external tests finish, use the CircleCI API to kick off a new Workflow run using a Git tag that is the same commit as the commit that kicked off the original build.

The latter method is definitely hacky but the best I could think of with our current API.

Ok, thanks for the reply.

I’ve created this idea in hopes that maybe it could be created?

1 Like