coder / coder/internal

prototype `coder run` implementation

Abierto
#574 0 comentarios 0 reacciones 1 asignado Reclamado por @dannykopping Ver en GitHub
spike
Lenguaje dominante
Sin datos de lenguaje
Estrellas
3
Forks
0
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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.

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.