I am trying to wrap my head around Travis-ci scripts but I am trying to figure out if what I want is even possible:
Repo #1: - my app to be built via travis-ci
Repo #2: - contains selenium/nightwatch tests that should run once repo #1 is finished building
So this is the workflow I am aiming for:
Is this at all possible? I've been researching this for a few days and couldn't find a way to trigger a separate repo to build.
Any help is appreciated.
Thanks!
Trigger Travis CI builds using the API V3 by sending a POST request to /repo/{slug|id}/requests : Get an API token from your Travis CI settings page. You'll need the token to authenticate most of these API requests.
Configuration. Travis CI is configured by adding a file named . travis. yml , which is a YAML format text file, to the root directory of the repository.
There are three types of commands: Non-API Commands, General API Commands and Repository Commands. All commands take the form of travis COMMAND [ARGUMENTS] [OPTIONS] .
Possible Duplicate of: Triggering builds of dependent projects in Travis CI
Nevertheless, pasting the answer here: Yes, it is possible to trigger another Travis job after a first one succeeds. You can use the trigger-travis.sh script that is part of the plume-lib library.
The script's documentation tells how to use it -- set an environment variable and add three lines to your .travis.yml file.
You can setup repo#1 and repo#2 using different jobs and use the above approach to trigger downstream job after successfully deployment has completed using job 1
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With