mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
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:
+17
-6
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user