feat: Add "coder projects create" command (#246)

* Refactor parameter parsing to return nil values if none computed

* Refactor parameter to allow for hiding redisplay

* Refactor parameters to enable schema matching

* Refactor provisionerd to dynamically update parameter schemas

* Refactor job update for provisionerd

* Handle multiple states correctly when provisioning a project

* Add project import job resource table

* Basic creation flow works!

* Create project fully works!!!

* Only show job status if completed

* Add create workspace support

* Replace Netflix/go-expect with ActiveState

* Fix linting errors

* Use forked chzyer/readline

* Add create workspace CLI

* Add CLI test

* Move jobs to their own APIs

* Remove go-expect

* Fix requested changes

* Skip workspacecreate test on windows
This commit is contained in:
Kyle Carberry
2022-02-12 13:34:04 -06:00
committed by GitHub
parent df13fef161
commit 154b9bce57
65 changed files with 3215 additions and 2241 deletions
+17 -6
View File
@@ -173,6 +173,14 @@ FROM
WHERE
job_id = $1;
-- name: GetProjectImportJobResourcesByJobID :many
SELECT
*
FROM
project_import_job_resource
WHERE
job_id = $1;
-- name: GetProjectVersionsByProjectID :many
SELECT
*
@@ -408,11 +416,10 @@ INSERT INTO
scope_id,
source_scheme,
source_value,
destination_scheme,
destination_value
destination_scheme
)
VALUES
($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING *;
($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING *;
-- name: InsertProject :one
INSERT INTO
@@ -428,6 +435,12 @@ INSERT INTO
VALUES
($1, $2, $3, $4, $5, $6, $7) RETURNING *;
-- name: InsertProjectImportJobResource :one
INSERT INTO
project_import_job_resource (id, created_at, job_id, transition, type, name)
VALUES
($1, $2, $3, $4, $5, $6) RETURNING *;
-- name: InsertProjectVersion :one
INSERT INTO
project_version (
@@ -454,7 +467,6 @@ INSERT INTO
default_source_value,
allow_override_source,
default_destination_scheme,
default_destination_value,
allow_override_destination,
default_refresh,
redisplay_value,
@@ -480,8 +492,7 @@ VALUES
$13,
$14,
$15,
$16,
$17
$16
) RETURNING *;
-- name: InsertProvisionerDaemon :one