Maxime Flament
Maxime Flament

Reputation: 751

Travis CI submodules and multiple .travis.yml files

I have 3 repositories for a REST application:

The frontend and backend repositories contain the code from the application. The compose repository has the following structure:

both postgres and nginx-reverse-proxy contain Dockerfile and configuration files that are needed to build the components part of the application stack. The application directory contains frontend and backend git submodules.

The problem I have is: I have a .travis.yml file for each of the submodules (frontend and backend). Now, I want to setup one for the compose repository, in order to build all containers including frontend and backend, in order to trigger builds separately whenever a change is made to one of this two repos.

Is there a way to re-use/reference the .travis.yml files from my git submodules in my root .travis.yml that will be in the compose repo?

Upvotes: 1

Views: 368

Answers (1)

Maxime Flament
Maxime Flament

Reputation: 751

So, it seems like it's still not possible to have multiple .yml build configuration files.

I went for another solution:

I created bash scripts that I'm calling in the .travis.yml files of my submodules. In the "main" .travis.yml file of my parent repository (the one referencing submodules), I'm just calling these scripts. This way, changes to the build process are done in the bash script and are reflected on both repositories, the submodule and the parent that references submodules.

Upvotes: 1

Related Questions