Consider replacing build.sh with something else
Build.sh is pretty much build around the use of drush make and while it can do composer builds too there are many other options available that can take care of that part. One such tool is http://magephp.com/ which itself is also based on composer / symphony.
How about a GNU makefile?
that could be one option too.
Basically what we would need:
- Tool where we can define our custom commands
- Something that is easy to configure (e.g. yaml)
- single command that can be run from the CI tool
- Handles environment specific configurations
- ...
Might be also good to consider: https://github.com/capistrano/capistrano
There are symfony deployment recipes around as an example.
In my company, we're now about to switch from build.sh to Capistrano. "We" are using Capistrano for non-Drupal projects so this is a natural choice for us.
I have also looked into Deployer, which is a PHP based tool that seems to work in a similar way to Capistrano. That one has the advantage of not adding non-PHP dependencies.
https://deployer.org/