retrohacker / dante

Build tests against Docker images by harnessing the power of layers
44 stars 4 forks source link

Proposal: inventory.yml stage key #3

Open retrohacker opened 8 years ago

retrohacker commented 8 years ago

It would be nice to have a stage key that controls the order the -j flag builds images in. For example:

images:
  - name: "wblankenship/dockeri.co:server"
    path: "./dockerico/server"
    test: ["./dockerico/tests/http","./dockerico/tests/badges"]
    alias: ["wblankenship/dockeri.co:latest"]
    stage: 1
  - name: "wblankenship/dockeri.co:database"
    path: "./dockerico/database"
    test: "./dockerico/tests/db"
    stage: 2

The above yml file would cause dante to wait to built the database image until the server image has completed building.

For repos with many images, and several base images, this would allow for a parallel build without worrying about race conditions.