Safe Haskell | None |
---|---|
Language | Haskell2010 |
B9 is a library and build tool with primitive operations to rmrun a build script inside a virtual machine and to create and convert virtual machine image files as well as related ISO and VFAT disk images for e.g. cloud-init configuration sources.
This module re-exports the modules needed to build a tool around the
library, e.g. see src/cli/Main.hs
as an example.
B9.ArtifactGenerator is the module containing the basic data structure used to describe a B9 build.
- b9Version :: Version
- b9VersionString :: String
- runShowVersion :: MonadIO m => m ()
- runBuildArtifacts :: MonadIO m => [FilePath] -> B9ConfigAction m String
- runFormatBuildFiles :: MonadIO m => [FilePath] -> m ()
- runPush :: MonadIO m => SharedImageName -> B9ConfigAction m ()
- runPull :: MonadIO m => Maybe SharedImageName -> B9ConfigAction m ()
- runRun :: MonadIO m => SharedImageName -> [String] -> B9ConfigAction m String
- runGcLocalRepoCache :: MonadIO m => B9ConfigAction m ()
- runGcRemoteRepoCache :: MonadIO m => B9ConfigAction m ()
- runListSharedImages :: MonadIO m => B9ConfigAction m [SharedImage]
- runAddRepo :: MonadIO m => RemoteRepo -> B9ConfigAction m ()
- runLookupLocalSharedImage :: MonadIO m => SharedImageName -> B9ConfigAction m (Maybe SharedImageBuildId)
Documentation
b9VersionString :: String Source #
Return the cabal package version of the B9 library,
formatted using showVersion
.
runShowVersion :: MonadIO m => m () Source #
Just print the b9VersionString
runBuildArtifacts :: MonadIO m => [FilePath] -> B9ConfigAction m String Source #
Execute the artifact generators defined in a list of text files.
Read the text files in the list and parse them as ArtifactGenerator
s
then mappend
them and apply buildArtifacts
to them.
runFormatBuildFiles :: MonadIO m => [FilePath] -> m () Source #
Read all text files and parse them as ArtifactGenerator
s.
Then overwrite the files with their contents but _pretty printed_
(i.e. formatted).
runPush :: MonadIO m => SharedImageName -> B9ConfigAction m () Source #
Upload a SharedImageName
to the default remote repository.
Note: The remote repository is specified in the B9Config
.
runPull :: MonadIO m => Maybe SharedImageName -> B9ConfigAction m () Source #
Either pull a list of available SharedImageName
s from the remote
repository if Nothing
is passed as parameter, or pull the latest version
of the image from the remote repository. Note: The remote repository is
specified in the B9Config
.
runRun :: MonadIO m => SharedImageName -> [String] -> B9ConfigAction m String Source #
Execute an interactive root shell in a running container from a
SharedImageName
.
runGcLocalRepoCache :: MonadIO m => B9ConfigAction m () Source #
Delete all obsolete versions of all SharedImageName
s.
runGcRemoteRepoCache :: MonadIO m => B9ConfigAction m () Source #
Clear the shared image cache for a remote. Note: The remote repository is
specified in the B9Config
.
runListSharedImages :: MonadIO m => B9ConfigAction m [SharedImage] Source #
Print a list of shared images cached locally or remotely, if a remote
repository was selected. Note: The remote repository is
specified in the B9Config
.
runAddRepo :: MonadIO m => RemoteRepo -> B9ConfigAction m () Source #
Check the SSH settings for a remote repository and add it to the user wide B9 configuration file.
runLookupLocalSharedImage :: MonadIO m => SharedImageName -> B9ConfigAction m (Maybe SharedImageBuildId) Source #
Find the most recent version of a SharedImageName
in the local image cache.