Manually set the workflow status

Is it possible to manually set the final status of a workflow?

I want to skip builds under certain conditions. In these conditions, I want all jobs within the workflow to halt, and the workflow to be set as “NOT RUN” (https://circleci.com/docs/2.0/workflows/#states). It looks like I can either end the build with a circleci step halt, which ends the job with a successful status, or exit with a non-zero code, to fail the build. Neither state reflects what I’m trying to show however; that the build/tests weren’t run.

Thanks.

Hi,

It is not possible to set “Not RUN” status manually, but as you said, you can use non-zero exit code to show job as failed and may be used that failed job as a dependency on other jobs, so that other jobs don’t get triggered.

Also, please check when step which can be used for conditional logic.

https://circleci.com/docs/2.0/reusing-config/#the-when-step

Regards,
Pawan Bahuguna