244300c1ad
RunCommand: remove unused and problematic imports
...
Since breaking the filename construction out to a helper function,
Hydra::Model::DB is no longer used. Importing Hydra::Helper::Nix,
however, has the potential to break tests, so just use the functions we
need without importing the entire module.
2022-01-28 13:07:11 -08:00
fdf6f4d3da
RunCommand: use IPC::Run3::run3 instead
...
run3 just seems to do better handling for what we want to do, and
requires less deep-reaching changes to this plugin to get it to play
nice, as IPC::Run::run would.
2022-01-28 13:07:11 -08:00
1554750acc
RunCommand: use make_path over mkdir
...
This will make all necessary parent directories a la `mkdir -p`.
2022-01-28 13:03:15 -08:00
bf3c46ed43
RunCommand: use IPC::Run to spawn the command
...
This allows `logPath`s with spaces and other characters that might
otherwise cause problems inside a `system()` call.
2022-01-28 13:03:15 -08:00
bb16f4fb10
RunCommand: set umask when creating log paths
...
This uses the somewhat restrictive umask of 0027 so that people outside
the user or group cannot read the files. This also helps to inhibit
TOCTOU where someone else has a handle to our file before we chmod it
and after we close it.
2022-01-28 13:03:15 -08:00
5d3912962b
RunCommand: use helper functions to ensure filenames and paths are the same
...
Otherwise, it's possible someone updates the format in one place but not
the others, leading to broken or incorrect functionality.
2022-01-28 13:03:15 -08:00
4cb5e6cd94
RunCommand: Capture the output of the commands
2022-01-28 13:00:17 -08:00
c8dc6a9419
Plugins: get project and jobset information from the project and jobset tables
2022-01-15 15:58:02 -05:00
17c6bd4fd8
DeclarativeJobsets: get the jobset name from the jobset table
2022-01-15 13:46:32 -05:00
5b35a597b4
RunCommand: update project / jobset name refs
2022-01-13 20:44:51 -05:00
3874db4fb7
PathInput: make the hash part of the revision
2022-01-10 11:23:22 -05:00
5bb3e2be78
Record the errno if exec fails
2022-01-07 15:05:33 -05:00
4ce8239cea
RunCommand: create run logs for each execution
2022-01-07 15:05:33 -05:00
a14501c616
Tasks: only execute the event if the plugin is interested in it
2021-12-21 20:57:53 -05:00
d2f03ca050
fixup foreach
2021-12-14 10:16:25 -05:00
4dfe787bc2
perlcritic: each() called at line 752, column 35. The each function may cause undefined behavior when operating on the hash while iterating. Use a foreach loop over the hash's keys or values instead.
2021-12-14 10:16:25 -05:00
7dcf6a01c6
JSON -> JSON::MaybeXS
2021-12-13 15:37:56 -05:00
26b197ea62
RunCommand: calculate all the commands to run against before starting
2021-12-08 20:29:32 -05:00
2ce0ab9f51
RunCommand: move JSON generation to its own function
2021-12-08 20:09:48 -05:00
f0d0358ee4
Merge pull request #1043 from DeterminateSystems/perl-warnings
...
Fixup Perl warnings around undefined variables
2021-10-20 10:48:05 -04:00
a887b3d346
fixup! EmailNotification: address Use of uninitialized value in numeric eq (==)
2021-10-20 10:40:08 -04:00
a36d23c1dd
fixup! BitBucketStatus: address Use of uninitialized value in numeric eq (==)
2021-10-20 10:40:08 -04:00
3c38629fad
GitHubPulls: output sorted json without using jq
2021-10-20 10:05:31 -04:00
30d36da057
CoverityScan: fixup tarballshandle introduced in 21e1ff0da1
2021-10-19 22:04:57 -04:00
093e235bf0
GithubRefs: fixup "my" variable $type masks earlier declaration in same scope
2021-10-19 22:02:41 -04:00
31cf249aed
S3Backup: check for bzip2 and xz Nix Config support (Use of uninitialized value ::Config::xz in concatenation)
2021-10-19 21:52:39 -04:00
bf692c9e8c
BitBucketStatus: address Use of uninitialized value in numeric eq (==)
2021-10-19 21:52:39 -04:00
4fd90ec784
EmailNotification: address Use of uninitialized value in numeric eq (==)
2021-10-19 21:52:39 -04:00
01112e9bd3
GitInput: deal with undefined deepClone
2021-10-19 21:52:39 -04:00
741590c923
perlcritic: explicitly assign the result of readdir/file reads
2021-09-07 21:55:55 -04:00
c603ae35f0
perlcritic: Don't conditionally declare variables
2021-09-07 21:35:01 -04:00
21e1ff0da1
perlcritic: don't open files as bare words
2021-09-06 22:20:17 -04:00
4677a7c894
perlcritic: use strict, use warnings
2021-09-06 22:13:33 -04:00
ca4b8d449f
BitBucketStatus: tbuild -> build (typo)
2021-09-06 21:12:13 -04:00
5e10648a98
CoverityScan: $b -> $build (perlcritic)
2021-08-20 21:52:32 -04:00
c929f5cac0
SlackNotification: $build -> $topbuild, $b -> $build (perlcritic)
2021-08-20 21:52:32 -04:00
b4f9807290
GithubStatus: $build -> $topbuild, $b -> $build (perlcritic)
2021-08-20 21:52:32 -04:00
5c9d8794b1
GiteaStatus: $build -> $topbuild, $b -> $build (perlcritic)
2021-08-20 21:52:32 -04:00
3920bf1df3
BitBucketStatus: $build -> $topbuild, $b -> $build (perlcritic)
2021-08-20 21:52:32 -04:00
bcf37ab705
GitlabStatus: $build -> $topbuild, $b -> $build (perlcritic)
2021-08-20 21:52:32 -04:00
b4a19fd3c8
HIpChatNotification: $build -> $topbuild, $b -> $build (perlcritic)
2021-08-20 21:52:32 -04:00
0d4ce15c62
EmailNotification: $build -> $topbuild, $b -> $build (perlcritic)
2021-08-20 21:52:32 -04:00
0f88014631
CircleCiNotification: $b -> $build (perlcritic)
2021-08-20 21:52:32 -04:00
593af41808
Declarative jobsets: move event handling to a plugin
...
Declarative jobsets were sort of tucked in to the event hanlder
itself. It turned out that it could have been implemented as a
plugin without much trouble.
2021-08-12 12:48:18 -04:00
df7dab1291
GitInput: Include deepClone option in the cache key
...
Without this commit, two jobsets using the same repository as input,
but different `deepClone` options, end up incorrectly sharing the same
"checkout" for a given (`uri`, `branch`, `revision`) tuple. The
presence or absence of `.git` is determined by the jobset execution
order.
This patch adds the missing `isDeepClone` boolean to the cache key.
The database upgrade script empties the `CachedGitInputs` table, as we
don't know if existing checkouts are deep clones. Unfortunately, this
generally forces rebuilds even for correct `deepClone` checkouts, as
the binary contents of `.git` are not deterministic.
Fixes #510
2021-06-19 17:37:40 +02:00
523d6df5b8
Fix GitHub status update for private flakes.
...
Also, if the parse fails, don't try to update the GitHub status, as
this will eventually cause rate-limiting.
2021-04-26 01:38:24 +01:00
b9bcedbfdb
Merge pull request #596 from kquick/local_inp_url
...
Update prompt for Local path input to indicate a URL is also valid.
2021-04-14 20:01:58 +00:00
f9f5ab2fb1
Make gitea public URL configurable
...
Otherwise, it will be obtained from the jobset input that contains the
URL to the git repo to build.
2021-03-30 23:01:36 +02:00
eecea56131
Implement VM-test for gitea plugin
2021-03-30 22:35:39 +02:00
56997d8e8b
Fix error codes for GiteaStatus plugin
...
* `failure` if a build error occurred, on e.g. an aborted build send
`error`.
2021-03-30 14:13:46 +02:00