propellor spin
This commit is contained in:
parent
b448016263
commit
ec61b8f5d6
|
@ -15,17 +15,24 @@ builddir = "gitbuilder"
|
||||||
|
|
||||||
builder :: Arch -> CronTimes -> Property
|
builder :: Arch -> CronTimes -> Property
|
||||||
builder arch crontimes = combineProperties
|
builder arch crontimes = combineProperties
|
||||||
[ Apt.buildDep ["git-annex"]
|
[ Apt.stdSourcesList Unstable
|
||||||
|
, Apt.buildDep ["git-annex"]
|
||||||
, Apt.installed ["git", "rsync", "liblockfile-simple-perl"]
|
, Apt.installed ["git", "rsync", "liblockfile-simple-perl"]
|
||||||
, serviceRunning "cron" `requires` Apt.installed ["cron"]
|
, serviceRunning "cron" `requires` Apt.installed ["cron"]
|
||||||
, User.accountFor builduser
|
, User.accountFor builduser
|
||||||
, check (not <$> hasbuilddir) $ userScriptProperty builduser
|
, check (lacksdir builddir) $ userScriptProperty builduser
|
||||||
[ "cabal update"
|
[ "cabal update"
|
||||||
, "git clone https://github.com/joeyh/gitbuilder/"
|
, "git clone https://github.com/joeyh/gitbuilder/"
|
||||||
, "cd gitbuilder && git checkout " ++ arch
|
, "cd gitbuilder"
|
||||||
|
, "git checkout " ++ arch
|
||||||
|
, "git clone https://git-annex.branchable.com/ git-annex"
|
||||||
, "echo '"++crontimes++" cd gitbuilder/autobuild' | crontab -"
|
, "echo '"++crontimes++" cd gitbuilder/autobuild' | crontab -"
|
||||||
]
|
]
|
||||||
`describe` "gitbuilder setup"
|
`describe` "gitbuilder setup"
|
||||||
|
, check (lacksdir $ builddir </> "git-annex") $ userScriptProperty builduser
|
||||||
|
[ "cd gitbuilder"
|
||||||
|
, "git clone https://git-annex.branchable.com/ git-annex"
|
||||||
|
]
|
||||||
-- The builduser account does not have a password set,
|
-- The builduser account does not have a password set,
|
||||||
-- instead use the password privdata to hold the rsync server
|
-- instead use the password privdata to hold the rsync server
|
||||||
-- password used to upload the built image.
|
-- password used to upload the built image.
|
||||||
|
@ -40,6 +47,6 @@ builder arch crontimes = combineProperties
|
||||||
]
|
]
|
||||||
where
|
where
|
||||||
homedir = fromMaybe ("/home/" ++ builduser) <$> User.homedir builduser
|
homedir = fromMaybe ("/home/" ++ builduser) <$> User.homedir builduser
|
||||||
hasbuilddir = do
|
lacksdir d = do
|
||||||
d <- homedir
|
h <- homedir
|
||||||
doesDirectoryExist (d </> builddir)
|
not <$> doesDirectoryExist (h </> d)
|
||||||
|
|
Loading…
Reference in New Issue