# Does skipping everything else in a job skip deploy?

**URL:** <https://travis-ci.community/t/does-skipping-everything-else-in-a-job-skip-deploy/6461>\
**Category:** Travis CI Discussions & Feedback\
**Tags:** travis-build\
**Created:** [December 13, 2019, 2:06pm UTC](https://travis-ci.community/t/does-skipping-everything-else-in-a-job-skip-deploy/6461 "2019-12-13T14:06:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dwhswenson](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/dwhswenson/32/4869_2.png) [@dwhswenson](https://travis-ci.community/u/dwhswenson)\
**Post date:** [December 13, 2019, 2:06pm UTC](https://travis-ci.community/t/does-skipping-everything-else-in-a-job-skip-deploy/6461/1 "2019-12-13T14:06:31Z")

</div>

The title is the short version. Unless I’m missing something, overriding phases with `skip` prevented the deployment from happening. (Not sure which category is best to post here, but since my problem came about because of config imports, I’m putting under that.)

Context: I’m developing [a tool](http://github.com/dwhswenson/autorelease) to implement a complex Python release cycle based on Travis stages. I’ve been copying parts of this into projects ever since stages were released; the release of config imports allows me to keep all the fancy Travis stages is a single, unified location (yay! thanks!)

As I’ve been migrating my projects over to this, I recently made it so my imported config jobs skip everything except the phases are used in that stage. But when I did this, the deploy phase didn’t run.

The recycle cycle also includes a test deployment job (directly using twine in the script phase), so I know the credentials are working. It’s the final deployment job, which uses dpl, that didn’t work. And it didn’t even seem to download the stuff for dpl.

Here’s the relevant build: [https://travis-ci.org/openpathsampling/openpathsampling/builds/624268394](https://travis-ci.org/openpathsampling/openpathsampling/builds/624268394), particularly the `deploy pypi` job.

The possibilities I’ve thought of are:

1. doing nothing looks like a job failure to deploy (but reports passing!)
2. skipping something else (maybe `after_script`?) causes deploy to be skipped
3. I found a bug

Maybe I’m missing something else? If it isn’t a bug, it would be really helpful if the docs at [https://docs.travis-ci.com/user/job-lifecycle/](https://docs.travis-ci.com/user/job-lifecycle/) could be updated.

---

<div class="post-metadata">

**Author:** ![BanzaiMan](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/banzaiman/32/67_2.png) [@BanzaiMan](https://travis-ci.community/u/BanzaiMan)\
**Post date:** [December 13, 2019, 4:16pm UTC](https://travis-ci.community/t/does-skipping-everything-else-in-a-job-skip-deploy/6461/2 "2019-12-13T16:16:27Z")

</div>

Thanks for the report. I don’t think we tested this use case, so it is quite possible that you’ve come across a bug.

Could you try not skipping `after_success` and see if that makes any difference? Something simple like: `after_success: 'true'` should be sufficient for testing my hypothesis.

---

<div class="post-metadata">

**Author:** ![dwhswenson](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/dwhswenson/32/4869_2.png) [@dwhswenson](https://travis-ci.community/u/dwhswenson)\
**Post date:** [December 13, 2019, 10:36pm UTC](https://travis-ci.community/t/does-skipping-everything-else-in-a-job-skip-deploy/6461/3 "2019-12-13T22:36:45Z")

</div>

Yep, that seems to fix it! Different repo (did this on the new Autorelease tool itself; I found the problem on the project that is my most widely-used, so I didn’t spam users by cutting another release there.)

The one caveat is that the project where this works only does local config-imports (so it can test itself), instead of bringing in the configs from a github repo. But that’s the only uncontrolled variable I can think of, and you’ll know whether it matters.

Successful deployment: [https://travis-ci.org/dwhswenson/autorelease/builds/624827334](https://travis-ci.org/dwhswenson/autorelease/builds/624827334)

---

<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:** [December 14, 2019, 12:06am UTC](https://travis-ci.community/t/does-skipping-everything-else-in-a-job-skip-deploy/6461/4 "2019-12-14T00:06:09Z")

</div>

According to [https://github.com/travis-ci/travis-build/blob/master/lib/travis/build/addons/deploy.rb#L18](https://github.com/travis-ci/travis-build/blob/master/lib/travis/build/addons/deploy.rb#L18), `deploy:` is implemented as a build addon which runs its functionality after `after_success:`’ payload.

So deployment is skipped if you skip `after_success:`.
