Best way to have one job connect to the servers started in 2 other jobs

Hey there CircleCi gang

I’m trying to run end to end tests on a relatively complex web app setup. Let me describe a simpler version here :

  • I have a ruby web app that i build in a job and start. The job uses the standard ruby docker image
  • I have a node web app that i build in a job and start. The job uses the standard node docker image
  • I have a script that will query both servers and run a bunch of tests.

My approach has been to create a workflow with 3 jobs : i start the two server jobs and then run the script job (the script job marks the two other jobs as required)

However, when the third job is started the two jobs it “requires” have already been shut down.

I’m wondering how I can do this better. I’m think about combining the 3 jobs into one, but then I can’t find a docker image that will let me build both a ruby and node app. The last option i see is going directly with a “machine” instead of docker. However that means a quite slow startup and installing dependencies manually.

What’s the simplest way to get this 3 jobs to work together ?

PS : the actual setup is an end to end selenium script run through browserstack on a react app. That react app exposes a ruby API, that itself relies on an elixir microservice.