Skip to content

Commit

Permalink
Merge pull request #559 from jlebon/pr/uproot
Browse files Browse the repository at this point in the history
  • Loading branch information
jlebon authored Nov 10, 2021
2 parents c795cb1 + fd6b487 commit c396abf
Show file tree
Hide file tree
Showing 6 changed files with 543 additions and 20 deletions.
5 changes: 3 additions & 2 deletions .cci.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ cosaPod(buildroot: true, runAsUser: 0) {
stage("Build metal+live") {
shwrap("cd /srv/fcos && cosa buildextend-metal")
shwrap("cd /srv/fcos && cosa buildextend-metal4k")
shwrap("cd /srv/fcos && cosa buildextend-live --fast")
// Enable --miniso until it's the default
shwrap("cd /srv/fcos && cosa buildextend-live --fast --miniso")
// Test metal with an uncompressed image and metal4k with a
// compressed one
shwrap("cd /srv/fcos && cosa compress --fast --artifact=metal4k")
Expand All @@ -31,7 +32,7 @@ cosaPod(buildroot: true, runAsUser: 0) {
// No need to run the iso-live-login/iso-as-disk scenarios
fcosKolaTestIso(
cosaDir: "/srv/fcos",
scenarios: "pxe-install,pxe-offline-install,iso-install,iso-offline-install",
scenarios: "pxe-install,pxe-offline-install,iso-install,iso-offline-install,miniso-install",
scenarios4k: "iso-install,iso-offline-install",
skipUEFI: true
)
Expand Down
36 changes: 36 additions & 0 deletions src/cmdline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,13 @@ pub enum IsoKargsCmd {
pub enum IsoExtractCmd {
/// Extract PXE files from an ISO image
Pxe(IsoExtractPxeConfig),
/// Extract a minimal ISO from a CoreOS live ISO image
MinimalIso(IsoExtractMinimalIsoConfig),
// This doesn't really make sense under `extract`, but it's hidden and conceptually feels
// cleaner being alongside `coreos-installer iso extract minimal-iso`.
/// Pack a minimal ISO into a CoreOS live ISO image
#[structopt(setting(AppSettings::Hidden))]
PackMinimalIso(IsoExtractPackMinimalIsoConfig),
}

#[derive(Debug, StructOpt)]
Expand Down Expand Up @@ -409,6 +416,35 @@ pub struct IsoExtractPxeConfig {
pub output_dir: String,
}

#[derive(Debug, StructOpt)]
pub struct IsoExtractMinimalIsoConfig {
/// ISO image
#[structopt(value_name = "ISO")]
pub input: String,
/// Extract rootfs image as well
#[structopt(long, value_name = "PATH")]
pub output_rootfs: Option<String>,
/// Minimal ISO output file
#[structopt(value_name = "OUTPUT_ISO", default_value = "-")]
pub output: String,
/// Inject rootfs URL karg into minimal ISO
#[structopt(long, value_name = "URL")]
pub rootfs_url: Option<String>,
}

#[derive(Debug, StructOpt)]
pub struct IsoExtractPackMinimalIsoConfig {
/// ISO image
#[structopt(value_name = "FULL_ISO")]
pub full: String,
/// Minimal ISO image
#[structopt(value_name = "MINIMAL_ISO")]
pub minimal: String,
/// Delete minimal ISO after packing
#[structopt(long)]
pub consume: bool,
}

#[derive(Debug, StructOpt)]
pub struct OsmetPackConfig {
/// Path to osmet file to write
Expand Down
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ pub mod install;
pub mod io;
pub mod iso9660;
pub mod live;
pub mod miniso;
pub mod osmet;
#[cfg(target_arch = "s390x")]
pub mod s390x;
Expand Down
Loading

0 comments on commit c396abf

Please sign in to comment.