pub struct Driver;Implementations§
Source§impl Driver
impl Driver
Sourcepub fn init(args: DriverArgs)
pub fn init(args: DriverArgs)
Initializes the Strategy with user provided credentials.
If you want to take advantage of a user’s credentials, you will want to run init before trying to use any of the strategies.
§Panics
Will panic if it is unable to initialize drivers.
Sourcepub fn get_build_id() -> Uuid
pub fn get_build_id() -> Uuid
Gets the current build’s UUID
pub fn get_build_driver() -> BuildDriverType
pub fn get_signing_driver() -> SigningDriverType
pub fn get_run_driver() -> RunDriverType
pub fn get_ci_driver() -> CiDriverType
pub fn get_boot_driver() -> BootDriverType
Sourcepub fn get_os_version<'f1>() -> DriverGetOsVersionBuilder<'f1>
pub fn get_os_version<'f1>() -> DriverGetOsVersionBuilder<'f1>
Trait Implementations§
Source§impl BootDriver for Driver
impl BootDriver for Driver
Source§impl BuildChunkedOciDriver for Driver
impl BuildChunkedOciDriver for Driver
Source§fn manifest_create_with_runner(
runner: &RpmOstreeRunner,
opts: ManifestCreateOpts<'_>,
) -> Result<()>
fn manifest_create_with_runner( runner: &RpmOstreeRunner, opts: ManifestCreateOpts<'_>, ) -> Result<()>
Create a manifest containing all the built images.
Runs within the same context as rpm-ostree. Read more
Source§fn manifest_push_with_runner(
runner: &RpmOstreeRunner,
opts: ManifestPushOpts<'_>,
) -> Result<()>
fn manifest_push_with_runner( runner: &RpmOstreeRunner, opts: ManifestPushOpts<'_>, ) -> Result<()>
Pushes a manifest containing all the built images.
Runs within the same context as rpm-ostree. Read more
Source§fn pull_with_runner(
runner: &RpmOstreeRunner,
opts: PullOpts<'_>,
) -> Result<ContainerId>
fn pull_with_runner( runner: &RpmOstreeRunner, opts: PullOpts<'_>, ) -> Result<ContainerId>
Pull an image from a remote registry.
Runs within the same context as rpm-ostree. Read more
Source§fn remove_image_with_runner(
runner: &RpmOstreeRunner,
image_ref: &str,
) -> Result<()>
fn remove_image_with_runner( runner: &RpmOstreeRunner, image_ref: &str, ) -> Result<()>
Removes an image from local storage.
Runs within the same context as rpm-ostree. Read more
Source§fn build_chunked_oci(
runner: &RpmOstreeRunner,
unchunked_image: &ImageRef<'_>,
final_image: &ImageRef<'_>,
opts: BuildChunkedOciOpts,
) -> Result<()>
fn build_chunked_oci( runner: &RpmOstreeRunner, unchunked_image: &ImageRef<'_>, final_image: &ImageRef<'_>, opts: BuildChunkedOciOpts, ) -> Result<()>
Runs build-chunked-oci on an image. Read more
Source§fn build_rechunk_tag_push(
opts: BuildRechunkTagPushOpts<'_>,
) -> Result<Vec<String>>
fn build_rechunk_tag_push( opts: BuildRechunkTagPushOpts<'_>, ) -> Result<Vec<String>>
Runs the logic for building, rechunking, tagging, and pushing an image. Read more
Source§impl BuildDriver for Driver
impl BuildDriver for Driver
Source§fn pull(opts: PullOpts<'_>) -> Result<ContainerId>
fn pull(opts: PullOpts<'_>) -> Result<ContainerId>
Runs the pull logic for the driver Read more
Source§fn manifest_create(opts: ManifestCreateOpts<'_>) -> Result<()>
fn manifest_create(opts: ManifestCreateOpts<'_>) -> Result<()>
Create a manifest containing all the built images. Read more
Source§fn manifest_push(opts: ManifestPushOpts<'_>) -> Result<()>
fn manifest_push(opts: ManifestPushOpts<'_>) -> Result<()>
Pushes a manifest containing all the built images. Read more
Source§fn build_tag_push(opts: BuildTagPushOpts<'_>) -> Result<Vec<String>>
fn build_tag_push(opts: BuildTagPushOpts<'_>) -> Result<Vec<String>>
Runs the logic for building, tagging, and pushing an image. Read more
Source§impl CiDriver for Driver
impl CiDriver for Driver
Source§fn on_default_branch() -> bool
fn on_default_branch() -> bool
Determines if we’re on the main branch of
a repository.
Source§fn keyless_cert_identity() -> Result<String>
fn keyless_cert_identity() -> Result<String>
Retrieve the certificate identity for
keyless signing. Read more
Source§fn oidc_provider() -> Result<String>
fn oidc_provider() -> Result<String>
Retrieve the OIDC Provider for keyless signing. Read more
Generate a list of tags based on the OS version. Read more
Source§fn generate_image_name<'a, O>(opts: O) -> Result<Reference>where
O: Borrow<GenerateImageNameOpts<'a>>,
fn generate_image_name<'a, O>(opts: O) -> Result<Reference>where
O: Borrow<GenerateImageNameOpts<'a>>,
Generates the image name based on CI. Read more
fn default_ci_file_path() -> PathBuf
Source§impl ImageStorageDriver for Driver
impl ImageStorageDriver for Driver
Source§fn remove_image(opts: RemoveImageOpts<'_>) -> Result<()>
fn remove_image(opts: RemoveImageOpts<'_>) -> Result<()>
Removes an image Read more
Source§impl InspectDriver for Driver
impl InspectDriver for Driver
Source§fn get_metadata(opts: GetMetadataOpts<'_>) -> Result<ImageMetadata>
fn get_metadata(opts: GetMetadataOpts<'_>) -> Result<ImageMetadata>
Gets the metadata on an image tag. Read more
Source§impl RechunkDriver for Driver
impl RechunkDriver for Driver
Source§fn rechunk(opts: RechunkOpts<'_>) -> Result<Vec<String>>
fn rechunk(opts: RechunkOpts<'_>) -> Result<Vec<String>>
Perform a rechunk build of a recipe. Read more
const RECHUNK_IMAGE: &str = "ghcr.io/hhd-dev/rechunk:v1.0.1"
Source§fn prune_image(
mount: &MountId,
container: &ContainerId,
image: &Reference,
opts: RechunkOpts<'_>,
) -> Result<(), Error>
fn prune_image( mount: &MountId, container: &ContainerId, image: &Reference, opts: RechunkOpts<'_>, ) -> Result<(), Error>
Step 1 of the rechunk process that prunes excess files. Read more
Source§fn create_ostree_commit(
mount: &MountId,
ostree_cache_id: &str,
container: &ContainerId,
image: &Reference,
opts: RechunkOpts<'_>,
) -> Result<()>
fn create_ostree_commit( mount: &MountId, ostree_cache_id: &str, container: &ContainerId, image: &Reference, opts: RechunkOpts<'_>, ) -> Result<()>
Step 2 of the rechunk process that creates the ostree commit. Read more
Source§fn rechunk_image(
ostree_cache_id: &str,
temp_dir_str: &str,
current_dir: &str,
opts: RechunkOpts<'_>,
) -> Result<()>
fn rechunk_image( ostree_cache_id: &str, temp_dir_str: &str, current_dir: &str, opts: RechunkOpts<'_>, ) -> Result<()>
Step 3 of the rechunk process that generates the final chunked image. Read more
Source§impl RunDriver for Driver
impl RunDriver for Driver
Source§fn run(opts: RunOpts<'_>) -> Result<ExitStatus>
fn run(opts: RunOpts<'_>) -> Result<ExitStatus>
Run a container to perform an action. Read more
Source§fn run_output(opts: RunOpts<'_>) -> Result<Output>
fn run_output(opts: RunOpts<'_>) -> Result<Output>
Run a container to perform an action and capturing output. Read more
Source§fn run_detached(opts: RunOpts<'_>) -> Result<DetachedContainer>
fn run_detached(opts: RunOpts<'_>) -> Result<DetachedContainer>
Run a container to perform an action in the background.
The container will be stopped when the returned
DetachedContainer
value is dropped. Read moreSource§fn create_container(opts: CreateContainerOpts<'_>) -> Result<ContainerId>
fn create_container(opts: CreateContainerOpts<'_>) -> Result<ContainerId>
Creates container Read more
Source§fn remove_container(opts: RemoveContainerOpts<'_>) -> Result<()>
fn remove_container(opts: RemoveContainerOpts<'_>) -> Result<()>
Removes a container Read more
Source§impl SigningDriver for Driver
impl SigningDriver for Driver
Source§fn generate_key_pair(opts: GenerateKeyPairOpts<'_>) -> Result<()>
fn generate_key_pair(opts: GenerateKeyPairOpts<'_>) -> Result<()>
Generate a new private/public key pair. Read more
Source§fn check_signing_files(opts: CheckKeyPairOpts<'_>) -> Result<()>
fn check_signing_files(opts: CheckKeyPairOpts<'_>) -> Result<()>
Checks the signing key files to ensure
they match. Read more
Source§fn signing_login(server: &str) -> Result<()>
fn signing_login(server: &str) -> Result<()>
Runs the login logic for the signing driver. Read more
Source§fn sign_and_verify(opts: SignVerifyOpts<'_>) -> Result<()>
fn sign_and_verify(opts: SignVerifyOpts<'_>) -> Result<()>
Sign an image given the image name and tag. Read more
Auto Trait Implementations§
impl Freeze for Driver
impl RefUnwindSafe for Driver
impl Send for Driver
impl Sync for Driver
impl Unpin for Driver
impl UnsafeUnpin for Driver
impl UnwindSafe for Driver
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> BorrowUnordered for T
impl<T> BorrowUnordered for T
fn as_unordered(&self) -> &Unordered<T>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more