Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ hydra/api/api.gen.go: hydra/api/hydra-api.yaml
.PHONY: hydra/api/hydra-api.yaml
hydra/api/hydra-api.yaml:
mkdir -p $(shell dirname $@)
curl https://raw.githubusercontent.com/NixOS/hydra/master/hydra-api.yaml > $@
curl https://raw.githubusercontent.com/DeterminateSystems/hydra/runcommand/dynamic/hydra-api.yaml > $@

# TODO
# test:
Expand Down
142 changes: 140 additions & 2 deletions hydra/api/api.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

52 changes: 50 additions & 2 deletions hydra/api/hydra-api.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions hydra/resource_hydra_jobset.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,12 @@ func resourceHydraJobset() *schema.Resource {
MinItems: 1,
Elem: inputSchema(),
},
"enable_dynamic_run_command": {
Description: "Whether or not to enable dynamic RunCommands for the jobset. Must be enabled by the server and parent project.",
Type: schema.TypeBool,
Optional: true,
Default: false,
},
},
}
}
Expand Down Expand Up @@ -360,6 +366,11 @@ func createJobsetPutBody(project string, jobset string, d *schema.ResourceData)
}
}

enableDynamicRunCommand := d.Get("enable_dynamic_run_command").(bool)
if enableDynamicRunCommand {
body.EnableDynamicRunCommand = &enableDynamicRunCommand
}

return &body, diags
}

Expand Down
Loading