rust-vmm / rust-vmm-ci

Apache License 2.0
18 stars 33 forks source link

autogenerate pipeline from json #70

Closed andreeaflorescu closed 3 years ago

andreeaflorescu commented 3 years ago

Instead of having a static pipeline.yml, autogenerate it from a JSON configuration. The json approach is taken because we also want to be able to run tests locally, and thus the json can be parsed once for generating the pipeline, and one for generating a local test run (as shown in test_run.py). For all the local tests to pass we also need to adjust test_commit_format.py to not require Buildkite environment variables.

This is still WIP (need to write docs).

andreeaflorescu commented 3 years ago

Tested with: https://github.com/andreeaflorescu/kvm-ioctls/pull/5

andreeaflorescu commented 3 years ago

To run the tests locally, you just need to call the test_run.py script.

To run the Buildkite CI using the dynamic pipeline, you need to update the Buildkite configuration and run: ./rust-vmm-ci/.buildkite/generate_pipeline.py | buildkite-agent pipeline upload

The generate_pipeline.py allows overriding some value & extending some others through environment variables. For example, we can extend the docker plugin specification as follows: DOCKER_PLUGIN_CONFIG="devices: [ "/dev/kvm" ]" ./rust-vmm-ci/.buildkite/generate_pipeline.py | buildkite-agent pipeline upload

All these are going to be properly documented once we agree on the high level design.

andreeaflorescu commented 3 years ago

Changes implemented in #76. Closing this.