Skip to content

Commit

Permalink
Default to exiting with success if the check run is successful
Browse files Browse the repository at this point in the history
Towards clarification of warden's place in the pipeline in #165 -
warden shouldn't be making the "go/no-go" call on the dataset itself
but should be generating metadata such that something else can make
the decision. As part of this, we don't want jobs to fail/abort with
error if the checks in fact ran successfully.
  • Loading branch information
olorin committed Feb 24, 2017
1 parent 7a5e8dc commit d13ec48
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions main/warden.hs
Original file line number Diff line number Diff line change
Expand Up @@ -233,10 +233,20 @@ fieldMatchRatioP = FieldMatchRatio <$> (option auto $

exitTypeP :: Parser ExitType
exitTypeP =
flag ExitWithCheckStatus ExitWithSuccess $
long "exit-success"
<> short 'e'
<> help "Exit with success status if no errors occur, even if checks have failures."
exitCheckStatusFlag <* exitSuccessFlag
where
exitCheckStatusFlag =
flag ExitWithSuccess ExitWithCheckStatus $
long "exit-check-status"
<> short 'x'
<> help "Exit with failure if any checks fail, even if warden has run successfully."

-- Old, kept for compatibility.
exitSuccessFlag =
flag ExitWithSuccess ExitWithSuccess $
long "exit-success"
<> short 'e'
<> help "(Deprecated: this is now the default behaviour.) Exit with success status if no errors occur, even if checks have failures."

includeDotFilesP :: Parser IncludeDotFiles
includeDotFilesP =
Expand Down

0 comments on commit d13ec48

Please sign in to comment.