diff options
author | Ben Gamari <ben@smart-cactus.org> | 2022-04-30 13:51:04 -0400 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-05-04 16:16:48 -0400 |
commit | 4f6370c773b01b3164592aa224d25c69c3be9930 (patch) | |
tree | 6b86822ecff6ad4ff78e323115ddb692e5a8dcbb /.gitlab/gen_ci.hs | |
parent | 8635323b45b6379d329a2e0cc4c1f5d3d40bb7e7 (diff) | |
download | haskell-4f6370c773b01b3164592aa224d25c69c3be9930.tar.gz |
gitlab-ci: Always preserve artifacts, even in failed jobs
(cherry picked from commit fd08b0c91ea3cab39184f1b1b1aafcd63ce6973f)
Diffstat (limited to '.gitlab/gen_ci.hs')
-rwxr-xr-x | .gitlab/gen_ci.hs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/.gitlab/gen_ci.hs b/.gitlab/gen_ci.hs index b7b8e17fa0..40c5e29e98 100755 --- a/.gitlab/gen_ci.hs +++ b/.gitlab/gen_ci.hs @@ -394,6 +394,7 @@ data Artifacts = Artifacts { artifactPaths :: [String] , junitReport :: String , expireIn :: String + , artifactsWhen :: ArtifactsWhen } instance ToJSON Artifacts where @@ -403,8 +404,16 @@ instance ToJSON Artifacts where ] , "expire_in" A..= expireIn , "paths" A..= artifactPaths + , "when" A..= artifactsWhen ] +data ArtifactsWhen = ArtifactsOnSuccess | ArtifactsOnFailure | ArtifactsAlways + +instance ToJSON ArtifactsWhen where + toJSON ArtifactsOnSuccess = "on_success" + toJSON ArtifactsOnFailure = "on_failure" + toJSON ArtifactsAlways = "always" + ----------------------------------------------------------------------------- -- Rules, when do we run a job ----------------------------------------------------------------------------- @@ -594,6 +603,7 @@ job arch opsys buildConfig = (jobName, Job {..}) , expireIn = "2 weeks" , artifactPaths = [binDistName arch opsys buildConfig ++ ".tar.xz" ,"junit.xml"] + , artifactsWhen = ArtifactsAlways } jobCache |