coder / coder/internal

prototype `coder run` implementation

Offen
#574 0 Kommentare 0 Reaktionen 1 zugewiesene Person Beansprucht von @dannykopping Auf GitHub ansehen
spike
Vorherrschende Sprache
Keine Sprachdaten
Sterne
3
Forks
0
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

Consider a GitHub Actions workflow job: when it runs, it spins up a VM and then executes a series of scripts on it (steps). Once the job is done, it gets torn down.

We want to enable a similar use-case for `coder run`. Much like `docker run`, `coder run` should spin up a workspace (or attach to an existing one), execute a script, stream back the `std{out,err}` streams and show the exit code.

If we could run our CI jobs on templates which mirror our development environment, we could cut out a number of issues relating to OS, tool, version incompatibilities.

For this prototype, we need to knock together a quick-n-dirty implementation so we can experiment. The goal is to be able to run a GitHub Actions workflow and call out to `coder run` to execute things like `make test` or `make lint`.

This should leverage pre-builds.

It would be especially cool if we could keep the workspace around in the case of failure, so we could shell into it and see why the scripts failed, and rerun them until they work (in the precise env in which they failed initially).

---

Note:

Instead of claiming a prebuild for each _step_ (which would run `coder run`), maybe we could hook into GitHub Actions such that `runs-on` claims the prebuild and all steps execute on that same prebuild.

We should also use the existing `codersdk` for the execution of the scripts over SSH.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.