When git gpg signature of a fetched git branch cannot be verified, propellor will now continue running, but without merging in that branch.
This way, propellor doesn't stop enforcing properties just because its new configuration isn't ready. It just uses the old configuration.
This commit is contained in:
parent
f65cd1500f
commit
dd554e20b9
|
@ -5,6 +5,8 @@ propellor (0.7.0) UNRELEASED; urgency=medium
|
||||||
failure.
|
failure.
|
||||||
* Attr is renamed to Info.
|
* Attr is renamed to Info.
|
||||||
* Renamed wrapper to propellor to make cabal installation of propellor work.
|
* Renamed wrapper to propellor to make cabal installation of propellor work.
|
||||||
|
* When git gpg signature of a fetched git branch cannot be verified,
|
||||||
|
propellor will now continue running, but without merging in that branch.
|
||||||
|
|
||||||
-- Joey Hess <joeyh@debian.org> Sat, 07 Jun 2014 00:12:44 -0400
|
-- Joey Hess <joeyh@debian.org> Sat, 07 Jun 2014 00:12:44 -0400
|
||||||
|
|
||||||
|
|
|
@ -132,6 +132,8 @@ updateFirst cmdline next = do
|
||||||
|
|
||||||
void $ actionMessage "Git fetch" $ boolSystem "git" [Param "fetch"]
|
void $ actionMessage "Git fetch" $ boolSystem "git" [Param "fetch"]
|
||||||
|
|
||||||
|
oldsha <- getCurrentGitSha1 branchref
|
||||||
|
|
||||||
whenM (doesFileExist keyring) $ do
|
whenM (doesFileExist keyring) $ do
|
||||||
{- To verify origin branch commit's signature, have to
|
{- To verify origin branch commit's signature, have to
|
||||||
- convince gpg to use our keyring. While running git log.
|
- convince gpg to use our keyring. While running git log.
|
||||||
|
@ -153,10 +155,9 @@ updateFirst cmdline next = do
|
||||||
then do
|
then do
|
||||||
putStrLn $ "git branch " ++ originbranch ++ " gpg signature verified; merging"
|
putStrLn $ "git branch " ++ originbranch ++ " gpg signature verified; merging"
|
||||||
hFlush stdout
|
hFlush stdout
|
||||||
else errorMessage $ "git branch " ++ originbranch ++ " is not signed with a trusted gpg key; refusing to deploy it!"
|
void $ boolSystem "git" [Param "merge", Param originbranch]
|
||||||
|
else warningMessage $ "git branch " ++ originbranch ++ " is not signed with a trusted gpg key; refusing to deploy it! (Running with previous configuration instead.)"
|
||||||
|
|
||||||
oldsha <- getCurrentGitSha1 branchref
|
|
||||||
void $ boolSystem "git" [Param "merge", Param originbranch]
|
|
||||||
newsha <- getCurrentGitSha1 branchref
|
newsha <- getCurrentGitSha1 branchref
|
||||||
|
|
||||||
if oldsha == newsha
|
if oldsha == newsha
|
||||||
|
|
Loading…
Reference in New Issue