mirror of
https://github.com/coder/coder.git
synced 2025-07-06 15:41:45 +00:00
feat: Expose managed variables via API (#6134)
* WIP * hcl * useManagedVariables * fix * Fix * Fix * fix * go:build * Fix * fix: bool flag * Insert template variables * API * fix * Expose via API * More wiring * CLI for testing purposes * WIP * Delete FIXME * planVars * WIP * WIP * UserVariableValues * no dry run * Dry run * Done FIXME * Fix * Fix: CLI * Fix: migration * API tests * Test info * Tests * More tests * fix: lint * Fix: authz * Address PR comments * Fix * fix * fix
This commit is contained in:
@ -13,6 +13,7 @@ import (
|
||||
"github.com/coder/coder/coderd/autobuild/schedule"
|
||||
"github.com/coder/coder/coderd/database"
|
||||
"github.com/coder/coder/coderd/database/dbauthz"
|
||||
"github.com/coder/coder/coderd/provisionerdserver"
|
||||
)
|
||||
|
||||
// Executor automatically starts or stops workspaces.
|
||||
@ -249,10 +250,8 @@ func build(ctx context.Context, store database.Store, workspace database.Workspa
|
||||
// This must happen in a transaction to ensure history can be inserted, and
|
||||
// the prior history can update it's "after" column to point at the new.
|
||||
workspaceBuildID := uuid.New()
|
||||
input, err := json.Marshal(struct {
|
||||
WorkspaceBuildID string `json:"workspace_build_id"`
|
||||
}{
|
||||
WorkspaceBuildID: workspaceBuildID.String(),
|
||||
input, err := json.Marshal(provisionerdserver.WorkspaceProvisionJob{
|
||||
WorkspaceBuildID: workspaceBuildID,
|
||||
})
|
||||
if err != nil {
|
||||
return xerrors.Errorf("marshal provision job: %w", err)
|
||||
|
Reference in New Issue
Block a user