Travis CI - Running Command on Job Cancellation

Rob

My team and I are currently building a project with Travis CI, which initiates a script on remote server. When we click to cancel builds in the Travis UI, the Travis build stops but the script on the remote server continues to run.

Is it possible to automatically run a command after cancelling builds, so that we can tell the remote server to stop executing the script?

Rob

Thank you to Travis CI support for this email response:

When a build or job is manually cancelled (or terminated by one of our workers for a different reason) it is killed without any chance of cleanup. So no, there is no special after_cancelled hook and after_failure as well as after_script are not executed when manually cancelling. This has to do with the way our build lifecycle is implemented and making an after_cancel possible requires quite some changes.

We are aware of this issue. It has been raised in our public tracker https://github.com/travis-ci/travis-ci/issues/4221 and is also being discussed internally. Unfortunately I cannot give you any time frame when we will address this issue but we will update the public ticket once there is progress.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Getting gcc command not found when running the Makefile on travis CI

From Dev

Getting gcc command not found when running the Makefile on travis CI

From Dev

running sh script on travis CI: The command exited with 1

From Dev

Running Redis on Travis CI

From Dev

GitHub - Travis ci job rejected

From Dev

Travis CI job failing with unknown result "configured"

From Dev

travis-ci job with bintray dependencies

From Dev

Travis-CI running two android emulators

From Dev

Travis-CI running two android emulators

From Dev

Grails: command not found with Travis-CI

From Dev

Travis CI suddenly fails: conda command not found

From Dev

Run grunt build command on Travis CI

From Dev

Running tests with API authentication in Travis CI without exposing API passwords

From Dev

Django app failing in Travis CI: server not running on localhost

From Dev

Django app failing in Travis CI: server not running on localhost

From Dev

EntityManagerException while running in Travis CI, Spring Boot and PostgreSQL

From Dev

Building failing at Travis-CI due to composer command call

From Dev

travis-ci encrypt command is asking for login --pro

From Dev

How to run a command only if is the master branch in travis-ci?

From Dev

Travis CI: The command "bundle exec rake" exited with 1

From Dev

Travis-ci command "./gradlew build" exited with 1

From Dev

Building failing at Travis-CI due to composer command call

From Dev

Travis-CI - add another task to the sbt command

From Dev

Travis CI Build failure due to failed to execute openssl command

From Dev

Travis CI: line 57 error: pytest#: command not found

From Dev

Pentaho running job through command line

From Dev

Configuring Jenkins CI Job and FreeFileSync Batch Using Windows Batch Command

From Dev

Chromedriver on Travis-CI

From Dev

Travis CI, pip, and pygame

Related Related

  1. 1

    Getting gcc command not found when running the Makefile on travis CI

  2. 2

    Getting gcc command not found when running the Makefile on travis CI

  3. 3

    running sh script on travis CI: The command exited with 1

  4. 4

    Running Redis on Travis CI

  5. 5

    GitHub - Travis ci job rejected

  6. 6

    Travis CI job failing with unknown result "configured"

  7. 7

    travis-ci job with bintray dependencies

  8. 8

    Travis-CI running two android emulators

  9. 9

    Travis-CI running two android emulators

  10. 10

    Grails: command not found with Travis-CI

  11. 11

    Travis CI suddenly fails: conda command not found

  12. 12

    Run grunt build command on Travis CI

  13. 13

    Running tests with API authentication in Travis CI without exposing API passwords

  14. 14

    Django app failing in Travis CI: server not running on localhost

  15. 15

    Django app failing in Travis CI: server not running on localhost

  16. 16

    EntityManagerException while running in Travis CI, Spring Boot and PostgreSQL

  17. 17

    Building failing at Travis-CI due to composer command call

  18. 18

    travis-ci encrypt command is asking for login --pro

  19. 19

    How to run a command only if is the master branch in travis-ci?

  20. 20

    Travis CI: The command "bundle exec rake" exited with 1

  21. 21

    Travis-ci command "./gradlew build" exited with 1

  22. 22

    Building failing at Travis-CI due to composer command call

  23. 23

    Travis-CI - add another task to the sbt command

  24. 24

    Travis CI Build failure due to failed to execute openssl command

  25. 25

    Travis CI: line 57 error: pytest#: command not found

  26. 26

    Pentaho running job through command line

  27. 27

    Configuring Jenkins CI Job and FreeFileSync Batch Using Windows Batch Command

  28. 28

    Chromedriver on Travis-CI

  29. 29

    Travis CI, pip, and pygame

HotTag

Archive