# Allowed to fail job, if canceled, the whole build is marked as canceled

**URL:** <https://travis-ci.community/t/allowed-to-fail-job-if-canceled-the-whole-build-is-marked-as-canceled/10335>\
**Category:** Travis CI Discussions & Feedback\
**Tags:** web-ui, bug\
**Created:** [October 28, 2020, 1:13pm UTC](https://travis-ci.community/t/allowed-to-fail-job-if-canceled-the-whole-build-is-marked-as-canceled/10335 "2020-10-28T13:13:01Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![native-api](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/native-api/32/430_2.png) [@native-api](https://travis-ci.community/u/native-api)\
**Post date:** [October 28, 2020, 8:37pm UTC](https://travis-ci.community/t/allowed-to-fail-job-if-canceled-the-whole-build-is-marked-as-canceled/10335/4 "2020-10-28T20:37:16Z")

</div>

> [@popovicsandras](#):
>
> I’m trying to have the Travis CI to work with a monorepo, where we don’t necessarily need to run every job, since not everything were changed. Unfortunately, as far as I know, with Travis I can’t create jobs dynamically

1. The best idea I have for a monorepo is described as “workaround” in [How to skip jobs based on the files changed in a subdirectory? - #15 by native-api](https://travis-ci.community/t/how-to-skip-jobs-based-on-the-files-changed-in-a-subdirectory/2979/15)

2. Alternatively, you can check at job start if it needs to be run and quit it early (with `travis_terminate` or by making the rest of your logic a no-op if you need further automatic steps like saving the cache to run) if it doesn’t. Currently, you can only do this as early as at `before_install:` (but still, it’s better than nothing). [Run a chunk of user code before the stock installation logic](https://travis-ci.community/t/run-a-chunk-of-user-code-before-the-stock-installation-logic/4141) is an FR that would let you do it earlier with minimal wasted time.

---

_[View the full topic](https://travis-ci.community/t/allowed-to-fail-job-if-canceled-the-whole-build-is-marked-as-canceled/10335)._
