diff options
author | Malte Brandy <malte.brandy@maralorn.de> | 2021-05-11 02:27:49 +0200 |
---|---|---|
committer | Malte Brandy <malte.brandy@maralorn.de> | 2021-05-11 16:04:22 +0200 |
commit | 49a014f3e986268e09fec0c6622824118b903c1f (patch) | |
tree | 3e3fbb1f0da7b8bb0a6ae4e42d986d827ff81548 /maintainers/scripts | |
parent | 3699b5b74c1357a9bb649f0a1655bc1b1f215a45 (diff) |
maintainers/scripts/haskell/hydra-report.hs: Support HydraFailure statuscode
Diffstat (limited to 'maintainers/scripts')
-rwxr-xr-x | maintainers/scripts/haskell/hydra-report.hs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/maintainers/scripts/haskell/hydra-report.hs b/maintainers/scripts/haskell/hydra-report.hs index 471447e60d578..3772b230f8664 100755 --- a/maintainers/scripts/haskell/hydra-report.hs +++ b/maintainers/scripts/haskell/hydra-report.hs @@ -155,7 +155,7 @@ getMaintainerMap = do get c p i e = readProcess c p i <&> \x -> either (error . (<> " Raw:'" <> take 1000 x <> "'") . (e <>)) Prelude.id . eitherDecodeStrict' . encodeUtf8 . Text.pack $ x -- BuildStates are sorted by subjective importance/concerningness -data BuildState = Failed | DependencyFailed | OutputLimitExceeded | Unknown (Maybe Int) | TimedOut | Canceled | Unfinished | Success deriving (Show, Eq, Ord) +data BuildState = Failed | DependencyFailed | OutputLimitExceeded | Unknown (Maybe Int) | TimedOut | Canceled | HydraFailure | Unfinished | Success deriving (Show, Eq, Ord) icon :: BuildState -> Text icon = \case @@ -166,6 +166,7 @@ icon = \case TimedOut -> ":hourglass::no_entry_sign:" Canceled -> ":no_entry_sign:" Unfinished -> ":hourglass_flowing_sand:" + HydraFailure -> ":construction:" Success -> ":heavy_check_mark:" platformIcon :: Platform -> Text @@ -199,10 +200,11 @@ buildSummary maintainerMap = foldl (Map.unionWith unionSummary) Map.empty . fmap state = case (finished, buildstatus) of (0, _) -> Unfinished (_, Just 0) -> Success + (_, Just 1) -> Failed + (_, Just 2) -> DependencyFailed + (_, Just 3) -> HydraFailure (_, Just 4) -> Canceled (_, Just 7) -> TimedOut - (_, Just 2) -> DependencyFailed - (_, Just 1) -> Failed (_, Just 11) -> OutputLimitExceeded (_, i) -> Unknown i packageName = fromMaybe job (Text.stripSuffix ("." <> system) job) |