Safe Haskell | None |
---|---|
Language | Haskell2010 |
B9 has a concept of SharedImaged
. Shared images can be pulled and
pushed to/from remote locations via rsync+ssh. B9 also maintains a local cache;
the whole thing is supposed to be build-server-safe, that means no two builds
shall interfere with each other. This is accomplished by refraining from
automatic cache updates from/to remote repositories.
- data RemoteRepo = RemoteRepo String FilePath SshPrivKey SshRemoteHost SshRemoteUser
- remoteRepoRepoId :: RemoteRepo -> String
- newtype RepoCache = RepoCache FilePath
- newtype SshPrivKey = SshPrivKey FilePath
- newtype SshRemoteHost = SshRemoteHost (String, Int)
- newtype SshRemoteUser = SshRemoteUser String
- initRepoCache :: MonadIO m => SystemPath -> m RepoCache
- initRemoteRepo :: MonadIO m => RepoCache -> RemoteRepo -> m RemoteRepo
- remoteRepoCheckSshPrivKey :: MonadIO m => RemoteRepo -> m RemoteRepo
- remoteRepoCacheDir :: RepoCache -> String -> FilePath
- localRepoDir :: RepoCache -> FilePath
- writeRemoteRepoConfig :: RemoteRepo -> ConfigParser -> Either CPError ConfigParser
- getConfiguredRemoteRepos :: ConfigParser -> [RemoteRepo]
- lookupRemoteRepo :: [RemoteRepo] -> String -> Maybe RemoteRepo
Documentation
data RemoteRepo Source
newtype SshPrivKey Source
newtype SshRemoteHost Source
newtype SshRemoteUser Source
initRepoCache :: MonadIO m => SystemPath -> m RepoCache Source
Initialize the local repository cache directory.
initRemoteRepo :: MonadIO m => RepoCache -> RemoteRepo -> m RemoteRepo Source
Initialize the repository; load the corresponding settings from the config file, check that the priv key exists and create the correspondig cache directory.
remoteRepoCheckSshPrivKey :: MonadIO m => RemoteRepo -> m RemoteRepo Source
Check for existance of priv-key and make it an absolute path.
:: RepoCache | The repository cache directory |
-> String | Id of the repository |
-> FilePath | The existing, absolute path to the cache directory |
Return the cache directory for a remote repository relative to the root cache dir.
Return the local repository directory.
writeRemoteRepoConfig :: RemoteRepo -> ConfigParser -> Either CPError ConfigParser Source
Persist a repo to a configuration file.
lookupRemoteRepo :: [RemoteRepo] -> String -> Maybe RemoteRepo Source
Load a repository from a configuration file that has been written by
writeRepositoryToB9Config
.