orbitalci / orbital

Orbital is a self-hosted CI system for solo/small consulting dev teams. Written in Rust.
GNU General Public License v3.0
29 stars 2 forks source link

Rust code #226

Closed tjtelan closed 4 years ago

tjtelan commented 4 years ago

The majority of the files changed are due to moving the go code into the legacy directory and deleting the vendored google proto code.

The cli dir includes 2 binaries. A for-reference partial implementation of the ocelot grpc client which I wrote first, and the main orb client which is mostly where feedback is useful.


The code is split up into workspaces, and split out into various crates so they could be reused throughout the codebase without causing circular dependencies.

The top-level orb command is stubbed out based on past designs and conversations.

cargo run -- operator start will foreground start a server that is wired up to the build grpc service, and in another terminal, cargo run -- build will send a call to the service. This is not yet wired to real build functionality.

The main cli path that works is cargo run -- dev

Intended to simulate the future remote builder workflow (main diff: it does not include cloning code) using the same libraries that the build service will use eventually. It will read a file named orb.yml from a given path and create a container with a volume mounted docker socket, and the given path in a container's /orbital-work directory.

Run that command in the repo root, and you'll build according to the orb.yml, which includes a docker build using the new Dockerfile

Give some insight for how the git repo parser works, for when we use it to send backend calls.

Give testable interface for how the builder will communicate with its docker engine on its host. Works for simple commands only, and on Linux hosts. Shiplift's issue 155 prevents container exec commands from succeeding on MacOS hosts.

Use vagrant up to start a VM from the Vagrantfile. I manually tested that building containers from the cli works.

I haven't written tests yet, but we discussed trying to get some doc tests in soon.

Resolves #217 Resolves #207 Resolves #221 Resolves #114 Resolves #199 Closes #179 - Won't fix.