6

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:

  • a PR in Repo #1 gets merged
  • Travis-ci builds Repo #1 and completes successfully & deploys
  • Travis-ci tells Repo #2 to start building
  • Repo #2 installs the repo which triggers browserstack to begin running the selenium tests

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!

Peter B
  • 128
  • 6

1 Answers1

12

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

BountyHunter
  • 1,325
  • 15
  • 30
  • I wasn't searching for the right terms but 'dependent builds' is exactly what I needed. Thanks so much BountyHunter! – Peter B Nov 16 '17 at 13:26