propellor spin

This commit is contained in:
Joey Hess 2014-05-20 18:28:13 -04:00
parent 7eeb58dab9
commit 9acd70eb4c
Failed to extract signature
2 changed files with 28 additions and 14 deletions

View File

@ -94,8 +94,8 @@ hosts = -- (o) `
& Docker.configured
& Docker.docked hosts "amd64-git-annex-builder"
& Docker.docked hosts "i386-git-annex-builder"
& Docker.docked hosts "armel-git-annex-builder-companion"
& Docker.docked hosts "armel-git-annex-builder"
! Docker.docked hosts "armel-git-annex-builder-companion"
! Docker.docked hosts "armel-git-annex-builder"
& Docker.garbageCollected `period` Daily
& Apt.buildDep ["git-annex"] `period` Daily
@ -201,7 +201,8 @@ hosts = -- (o) `
& Docker.volume GitAnnexBuilder.homedir
& File.ownerGroup GitAnnexBuilder.homedir GitAnnexBuilder.builduser GitAnnexBuilder.builduser
-- Install current versions of build deps from cabal.
& GitAnnexBuilder.treeDeps "armel"
& GitAnnexBuilder.tree "armel"
& GitAnnexBuilder.buildDepsNoHaskellLibs
& GitAnnexBuilder.cabalDeps
-- The armel builder can ssh to this companion,
-- using $COMPANION_PORT_22_TCP_ADDR as the hostname,
@ -219,7 +220,7 @@ hosts = -- (o) `
-- (Currently have to run
-- git-annex/standalone/linux/install-haskell-packages
-- which is not fully automated.)
& GitAnnexBuilder.builder "armel" "1 3 * * *" "5h" True
& GitAnnexBuilder.builder' GitAnnexBuilder.buildDepsNoHaskellLibs "armel" "1 3 * * *" "5h" True
] ++ monsters
standardGitAnnexBuilder :: Architecture -> Int -> GitAnnexBuilder.TimeOut -> Host

View File

@ -21,8 +21,12 @@ builddir = gitbuilderdir </> "build"
type TimeOut = String -- eg, 5h
builder :: Architecture -> CronTimes -> TimeOut -> Bool -> Property
builder buildarch crontimes timeout rsyncupload = combineProperties "gitannexbuilder"
[ treeDeps buildarch
builder = builder' buildDeps
builder' :: Property -> Architecture -> CronTimes -> TimeOut -> Bool -> Property
builder' buildepsprop buildarch crontimes timeout rsyncupload = combineProperties "gitannexbuilder"
[ tree buildarch
, buildepsprop
, Apt.serviceInstalledRunning "cron"
, Cron.niceJob "gitannexbuilder" crontimes builduser gitbuilderdir $
"git pull ; timeout " ++ timeout ++ " ./autobuild"
@ -45,13 +49,10 @@ builder buildarch crontimes timeout rsyncupload = combineProperties "gitannexbui
)
]
treeDeps :: Architecture -> Property
treeDeps buildarch = combineProperties "gitannexbuilder"
[ Apt.stdSourcesList Unstable
, Apt.buildDep ["git-annex"]
, Apt.installed ["git", "rsync", "moreutils", "ca-certificates",
"liblockfile-simple-perl", "cabal-install", "vim", "less"]
, User.accountFor builduser
tree :: Architecture -> Property
tree buildarch = combineProperties "gitannexbuilder tree"
[ User.accountFor builduser
, Apt.installed ["git"]
, check (not <$> doesDirectoryExist gitbuilderdir) $ userScriptProperty builduser
[ "git clone git://git.kitenet.net/gitannexbuilder " ++ gitbuilderdir
, "cd " ++ gitbuilderdir
@ -61,9 +62,21 @@ treeDeps buildarch = combineProperties "gitannexbuilder"
, check (not <$> doesDirectoryExist builddir) $ userScriptProperty builduser
[ "git clone git://git-annex.branchable.com/ " ++ builddir
]
]
buildDeps :: Property
buildDeps = combineProperties "gitannexbuilder build deps"
[ Apt.stdSourcesList Unstable
, Apt.buildDep ["git-annex"]
, buildDepsNoHaskellLibs
, "git-annex source build deps installed" ==> Apt.buildDepIn builddir
]
buildDepsNoHaskellLibs :: Property
buildDepsNoHaskellLibs = Apt.installed ["git", "rsync", "moreutils", "ca-certificates",
"debhelper", "ghc", "curl", "openssh-client", "git-remote-gcrypt",
"liblockfile-simple-perl", "cabal-install", "vim", "less"]
-- Installs current versions of git-annex's deps from cabal, but only
-- does so once.
cabalDeps :: Property
@ -79,7 +92,7 @@ sshKeyGen = combineProperties "sshkeygen"
, flagFile auth authkeys
]
where
gen = userScriptProperty builduser ["ssh-keygen -t RSA -N '' -f " ++ f]
gen = userScriptProperty builduser ["ssh-keygen -t RSA -N '' -f " ++ privkey]
auth = userScriptProperty builduser ["cp " ++ pubkey ++ " " ++ authkeys]
privkey = homedir </> ".ssh" </> "id_rsa"
pubkey = privkey ++ ".pub"