Run app build after another app build was completed
Use case:
App called base, it builds a base docker image.
App called base-child, it depends on base docker image and extends it.
Ideally I want base-child to build after base finished.
Is there a way to do it?
As far as I can tell Baur doesnt build projects in parallel? So I suppose I could call base 0_base so it will be build before base-child due to alphabetical order.
WDYT?
Cool idea, building a base-child docker image automatically when it's base image base changed would be very handy.
We never considered to use baur for that.
A way to represent that might to declare an output of one task as the input of another task.
This adds tons of complexity though, dependencies between tasks needs to resolved, order needs to be calculated, dependency must loops must be detected etc.
Finding a more simple solution would be better. :-)
I was also thinking about supporting to specify a remote docker image as input for tasks.
The base-child build task could define the docker image myrepo/base:latest as input.
When baur is run it could check if the digest of the remote docker image changed, if yes it reruns the base-child build task.
Because the execution of the tasks is not defined, it might be that baur ran the base-child before base and would not detect a change in the same baur run, only in the following execution.
As far as I can tell Baur doesnt build projects in parallel?
You are right, it does not run tasks in parallel.
So I suppose I could call base 0_base so it will be build before base-child due to alphabetical order.
Yes that would work, all pending tasks are executed in their alphabetical order.
You still would need to ensure that baur runs the base-child task when base changed somehow.
It should work if you always pin the installed program versions and reference BASE docker images by their sha256 checksum in it's Dockerfile, to ensure that base only changes if it's Dockerfile changes.
We solved the base-child issue by defining base-child's include = ['../base/**', '**']. I just wanted to make sure it was built first, but since baur builds in alphabetical order as long as child step doesnt start with letter < than base it should be fine.
Ideally, however, it would be great to have support of dependency on apps (the whole complex thing you describe) + parallel build :)