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.
Synopsis
- initRepoCache :: MonadIO m => SystemPath -> m RepoCache
- type RepoCacheReader = Reader RepoCache
- getRepoCache :: Member RepoCacheReader e => Eff e RepoCache
- withRemoteRepos :: (Member B9ConfigReader e, Lifted IO e) => Eff (RepoCacheReader ': e) a -> Eff e a
- withSelectedRemoteRepo :: (Member B9ConfigReader e, Member ExcB9 e) => Eff (SelectedRemoteRepoReader ': e) a -> Eff e a
- getSelectedRemoteRepo :: Member SelectedRemoteRepoReader e => Eff e SelectedRemoteRepo
- type SelectedRemoteRepoReader = Reader SelectedRemoteRepo
- newtype SelectedRemoteRepo = MkSelectedRemoteRepo {}
- initRemoteRepo :: MonadIO m => RepoCache -> RemoteRepo -> m RemoteRepo
- cleanRemoteRepo :: MonadIO m => RepoCache -> RemoteRepo -> m ()
- remoteRepoCheckSshPrivKey :: MonadIO m => RemoteRepo -> m RemoteRepo
- remoteRepoCacheDir :: RepoCache -> String -> FilePath
- localRepoDir :: RepoCache -> FilePath
- lookupRemoteRepo :: [RemoteRepo] -> String -> Maybe RemoteRepo
- module B9.B9Config.Repository
Documentation
initRepoCache :: MonadIO m => SystemPath -> m RepoCache Source #
Initialize the local repository cache directory.
type RepoCacheReader = Reader RepoCache Source #
Alias for a Reader
Eff
ect that reads a list of RemoteRepo
s.
Since: 0.5.65
getRepoCache :: Member RepoCacheReader e => Eff e RepoCache Source #
Ask for the RepoCache
initialized by withRemoteRepos
.
Since: 0.5.65
withRemoteRepos :: (Member B9ConfigReader e, Lifted IO e) => Eff (RepoCacheReader ': e) a -> Eff e a Source #
Initialize the local repository cache directory and the RemoteRepo
s.
Run the given action with a B9Config
that contains the initialized
repositories in _remoteRepos
.
Since: 0.5.65
withSelectedRemoteRepo :: (Member B9ConfigReader e, Member ExcB9 e) => Eff (SelectedRemoteRepoReader ': e) a -> Eff e a Source #
Run a SelectedRemoteRepoReader
with the SelectedRemoteRepo
selected
in the B9Config
.
If the selected repo does not exist, and exception is thrown.
Since: 0.5.65
getSelectedRemoteRepo :: Member SelectedRemoteRepoReader e => Eff e SelectedRemoteRepo Source #
Ask for the RemoteRepo
selected by the B9Config
value _repository
. See withSelectedRemoteRepo
.
Since: 0.5.65
type SelectedRemoteRepoReader = Reader SelectedRemoteRepo Source #
Alias for a Reader
Eff
ect that reads the RemoteRepo
selected by the B9Config
value _repository
. See withSelectedRemoteRepo
.
Since: 0.5.65
newtype SelectedRemoteRepo Source #
Contains the Just
the RemoteRepo
selected by the B9Config
value _repository
,
or Nothing
of no RemoteRepo
was selected in the B9Config
.
Since: 0.5.65
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.
cleanRemoteRepo :: MonadIO m => RepoCache -> RemoteRepo -> m () Source #
Empty 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.
lookupRemoteRepo :: [RemoteRepo] -> String -> Maybe RemoteRepo Source #
Select the first RemoteRepo
with a given repoId
.
module B9.B9Config.Repository