Graham Christensen
5c90edd19f
Merge pull request #1103 from DeterminateSystems/runcommand/dynamic
...
Dynamic RunCommand
2022-04-19 10:09:47 -04:00
Cole Helbling
928ba9e854
Controller/{Jobset,Project}: error when enabling dynamic runcommand but it's disabled elsewhere
2022-02-11 14:35:52 -05:00
Graham Christensen
4f9aea9434
t/Hydra/Plugin/gitea.t: explain why we loop a few times
...
Co-authored-by: Cole Helbling <cole.e.helbling@outlook.com>
2022-02-10 12:02:29 -05:00
Graham Christensen
e709a17508
gitea.t: try opening the file a few times
2022-02-10 11:01:09 -05:00
Graham Christensen
845e6d4760
captureStdoutStderr*: move to Hydra::Helper::Exec which helps avoid some environment variable fixation problems
2022-02-09 14:28:50 -05:00
Graham Christensen
d8b56f022d
RunCommand: print a warning if the hook isn't run because the project / jobset doens't have it enabled
2022-02-01 10:58:54 -05:00
Graham Christensen
38514ae494
fanout tests: capture warnings and test their relevance
2022-02-01 10:58:54 -05:00
Graham Christensen
0810f5debc
finish making the dynamic hooks only run on project & jobset agreement
2022-02-01 10:58:54 -05:00
Graham Christensen
0c96172c28
RunCommand: only run dynamic runcommand hooks if the project AND jobset agree they should be enabled
2022-02-01 10:58:54 -05:00
Graham Christensen
3cce0c5ef6
Only run dynamic runcommand hooks if the jobset enables them
2022-02-01 10:57:30 -05:00
Graham Christensen
216d8bee35
DynamicRunCommand: don't run if the build failed
2022-02-01 10:57:30 -05:00
Graham Christensen
1a30a0c2f1
Dynamic RunCommand: validate that the job's out exists, is a file (or points to a file) which is executable.
2022-02-01 10:57:30 -05:00
Graham Christensen
c2be27e82b
fanout.t: switch to makeAndEvaluateJobset
2022-02-01 10:57:30 -05:00
Graham Christensen
e7f68045f4
DynamicRunCommand: pull out the function determining if a build is
...
eligible for execution under dynamic run commands.
2022-02-01 10:57:30 -05:00
Graham Christensen
e56c49333f
RunCommand: Add a WIP execution of dynamic commands
...
This in-progress feature will run a dynamically generated set of
buildFinished hooks, which must be nested under the `runCommandHook.*`
attribute set. This implementation is not very good, with some to-dos:
1. Only run if the build succeeded
2. Verify the output is named $out and that it is an executable file
(or a symlink to a file)
3. Require the jobset itself have a flag enabling the feature, since
this feature can be a bit dangerous if various people of different
trust levels can create the jobs.
2022-02-01 10:57:30 -05:00
Graham Christensen
ea311a0eb4
RunCommand: enable the plugin if dynamicruncommand is set
2022-02-01 10:57:30 -05:00
Cole Helbling
8eab7b8543
Helper/Nix: constructRunCommandLogPath: take RunCommandLog as input
...
This way we ensure that it actually exists in the database, rather than
blindly trusting user-generated input.
2022-01-31 08:58:33 -08:00
Cole Helbling
38896db6b6
t/RunCommand: init http.t
...
Test that we can indeed visit the pages of a valid runcommand log and
not of an invalid one.
2022-01-31 08:58:33 -08:00
Cole Helbling
47c1f89d5a
t/RunCommand: fixup basic.t to use uuid
2022-01-31 08:58:33 -08:00
Cole Helbling
3e722f1d0a
t/RunCommand: remove duplicate use
2022-01-28 13:07:11 -08:00
Cole Helbling
988e79c6e5
t/RunCommand: test that the log file exists on the filesystem
2022-01-28 13:07:11 -08:00
Graham Christensen
b2cdde0901
DeclarativeJobsets: test basic functionality
2022-01-15 13:46:32 -05:00
Graham Christensen
a5d1d36fa6
Tests: restructure to more closely mirror the sources
...
t/ had lots of directories and files mirroring src/lib/Hydra. This moves
those files under t/Hydra
2022-01-10 15:34:52 -05:00