Skip to content

Commit

Permalink
Merge pull request input-output-hk#1337 from input-output-hk/debug-ap…
Browse files Browse the repository at this point in the history
…pveyor

[DEVOPS] Be more verbose about which build artifact its fetching
  • Loading branch information
nikolaglumac authored Mar 11, 2019
2 parents 51a2237 + c1214cf commit 229848a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions installers/common/AppVeyor.hs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ theHydraJob = "daedalus-mingw32-pkg" :: Text
-- | Gets CardanoSL.zip corresponding to the src json revision from Hydra
downloadCardanoSLHydraBuildProduct :: CardanoSource -> IO L8.ByteString
downloadCardanoSLHydraBuildProduct src@CardanoSource{..} = do
printf ("Fetching GitHub CI status for commit "%n%" of "%n%"/"%n%"\n") srcRev srcOwner srcRepo
printf ("Fetching GitHub CI (hydra) status for commit "%n%" of "%n%"/"%n%"\n") srcRev srcOwner srcRepo
buildURL <- hydraURL theHydraJob src
printf ("Build URL is "%s%"\n") (getUrl buildURL)

Expand Down Expand Up @@ -71,7 +71,7 @@ downloadCardanoSLOld srcJson = do
-- | Gets CardanoSL.zip corresponding to the src json revision from AppVeyor CI
downloadCardanoSLArtifact :: CardanoSource -> IO L8.ByteString
downloadCardanoSLArtifact src@CardanoSource{..} = do
printf ("Fetching GitHub CI status for commit "%n%" of "%n%"/"%n%"\n") srcRev srcOwner srcRepo
printf ("Fetching GitHub CI (appveyor) status for commit "%n%" of "%n%"/"%n%"\n") srcRev srcOwner srcRepo
buildURL <- appVeyorURL src
printf ("Build URL is "%s%"\n") (getUrl buildURL)
jobs <- appVeyorJobs buildURL
Expand Down Expand Up @@ -162,7 +162,9 @@ appVeyorURL src = fmap collect <$> statusFor' src >>= \case
Right Nothing -> throwM $ StatusMissingError src
Left err -> throwM $ GitHubStatusError src err
where
collect :: Vector GH.Status -> Maybe URL
collect = safeHead . mapMaybe statusTargetUrl . filter isAppVeyor . toList
isAppVeyor :: GH.Status -> Bool
isAppVeyor st = statusContext st == Just "continuous-integration/appveyor/branch"

statusFor' :: CardanoSource -> IO (Either GH.Error (Vector GH.Status))
Expand Down

0 comments on commit 229848a

Please sign in to comment.