mirror of
https://github.com/coder/coder.git
synced 2026-09-22 05:05:20 +08:00
chore: Separate the provisionerd server into it's own package (#4940)
* chore: Separate the provisionerd server into it's own package This code should be thoroughly tested now that we understand the abstraction. I separated it to make our lives a bit easier for external provisioner daemons as well! * Add tests * Add workspace builds * Add test for workspace resources
This commit is contained in:
@@ -11,6 +11,7 @@ import (
|
||||
"github.com/coder/coder/coderd/azureidentity"
|
||||
"github.com/coder/coder/coderd/database"
|
||||
"github.com/coder/coder/coderd/httpapi"
|
||||
"github.com/coder/coder/coderd/provisionerdserver"
|
||||
"github.com/coder/coder/codersdk"
|
||||
|
||||
"github.com/mitchellh/mapstructure"
|
||||
@@ -130,7 +131,7 @@ func (api *API) handleAuthInstanceID(rw http.ResponseWriter, r *http.Request, in
|
||||
})
|
||||
return
|
||||
}
|
||||
var jobData workspaceProvisionJob
|
||||
var jobData provisionerdserver.WorkspaceProvisionJob
|
||||
err = json.Unmarshal(job.Input, &jobData)
|
||||
if err != nil {
|
||||
httpapi.Write(ctx, rw, http.StatusInternalServerError, codersdk.Response{
|
||||
|
||||
Reference in New Issue
Block a user