coder / coder/internal

prototype `coder run` implementation

Aperta
#574 0 commenti 0 reazioni 1 assegnatario Rivendicata da @dannykopping Vedi su GitHub
spike
Lingua principale
Nessun dato sulla lingua
Stelle
3
Fork
0
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.