redspread / spread

Docker to Kubernetes in one command
https://coreos.com
Apache License 2.0
1.84k stars 83 forks source link

Gitlab CI - Conditional deploys #171

Open RobinVanCauter opened 7 years ago

RobinVanCauter commented 7 years ago

When deploying with Gitlab CI a lot of projects use conditional statements within their script definition. In combination with the Gitlab CI triggers and their variables it's possible to only execute the deploy based on these variables. (Good example is a repo that's made of multiple micro-services and it's most efficient to only run the build/deploy scripts of the micro-services that have actually changed their versions)

Currently this image runs the deploy command straight from the entrypoint.sh, but flexibility would be much improved if we are able to run the command ourselves from the script section in our build definition using this image. This way we could conditionally trigger the actual deploy with spread when all requirements are met.