summaryrefslogtreecommitdiff
path: root/Propellor/Property
diff options
context:
space:
mode:
authorJoey Hess2014-04-01 18:06:02 -0400
committerJoey Hess2014-04-01 18:06:02 -0400
commit3ea5a38395346bb417456c1a994980ca090213e8 (patch)
treee1aea13dd51e6ca4648571c9d7fc35450cbe7a69 /Propellor/Property
parent0dc5c271809187549c937d9d65e39a368ce06acb (diff)
propellor spin
Diffstat (limited to 'Propellor/Property')
-rw-r--r--Propellor/Property/SiteSpecific/GitAnnexBuilder.hs14
1 files changed, 8 insertions, 6 deletions
diff --git a/Propellor/Property/SiteSpecific/GitAnnexBuilder.hs b/Propellor/Property/SiteSpecific/GitAnnexBuilder.hs
index 48e10977..dedfc6d2 100644
--- a/Propellor/Property/SiteSpecific/GitAnnexBuilder.hs
+++ b/Propellor/Property/SiteSpecific/GitAnnexBuilder.hs
@@ -3,9 +3,10 @@ module Propellor.Property.SiteSpecific.GitAnnexBuilder where
import Propellor
import qualified Propellor.Property.Apt as Apt
import qualified Propellor.Property.User as User
+import qualified Propellor.Property.Cron as Cron
import Propellor.Property.Cron (CronTimes)
-type Arch = String
+import Data.Char
builduser :: UserName
builduser = "builder"
@@ -13,21 +14,22 @@ builduser = "builder"
builddir :: FilePath
builddir = "gitbuilder"
-builder :: Arch -> CronTimes -> Property
+builder :: Architecture -> CronTimes -> Property
builder arch crontimes = combineProperties "gitannexbuilder"
[ Apt.stdSourcesList Unstable
, Apt.buildDep ["git-annex"]
- , Apt.installed ["git", "rsync", "liblockfile-simple-perl", "cabal"]
+ , Apt.installed ["git", "rsync", "moreutils",
+ "liblockfile-simple-perl", "cabal"]
, serviceRunning "cron" `requires` Apt.installed ["cron"]
, User.accountFor builduser
, check (lacksdir builddir) $ userScriptProperty builduser
[ "git clone https://github.com/joeyh/gitbuilder/"
, "cd gitbuilder"
- , "git checkout " ++ arch
- , "git clone https://git-annex.branchable.com/ git-annex"
- , "echo '"++crontimes++" cd gitbuilder/autobuild' | crontab -"
+ , "git checkout " ++ map toLower (show arch)
+ , "git clone https://git-annex.branchable.com/ build"
]
`describe` "gitbuilder setup"
+ , Cron.niceJob "gitannexbuilder" crontimes builduser "~/gitbuilder" "./autobuild"
, check (lacksdir $ builddir </> "git-annex") $ userScriptProperty builduser
[ "cd gitbuilder"
, "git clone https://git-annex.branchable.com/ git-annex"