Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/docs/mp-packages/cli/buildah.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ Global options are rendered after the selected subcommand.
| CLI option | Property | Availability | Description |
| --- | --- | --- | --- |
| `--cgroup-manager` | `CgroupManager` | All editions | cgroup manager (default "cgroupfs") |
| `--imagestore` | `Imagestore` | All editions | storage imagestore |
| `--log-level` | `LogLevel` | All editions | the log level to be used, one of "trace", "debug", "info", "warn", "error", "fatal", or "panic" (default "warn") |
| `--registries-conf` | `RegistriesConf` | All editions | path to registries.conf file (not usually used) |
| `--registries-conf-dir` | `RegistriesConfDir` | All editions | path to registries.conf.d directory (not usually used) |
Expand All @@ -57,6 +58,7 @@ Global options are rendered after the selected subcommand.
| `--short-name-alias-conf` | `ShortNameAliasConf` | All editions | path to short name alias cache file (not usually used) |
| `--storage-driver` | `StorageDriver` | All editions | storage-driver (default "overlay") |
| `--storage-opt` | `StorageOpt` | All editions | storage driver option |
| `--transient-store` | `TransientStore` | All editions | store some information in transient storage |
| `--userns-gid-map` | `UsernsGidMap` | All editions | default ctrID:hostID:length GID mapping to use |
| `--userns-uid-map` | `UsernsUidMap` | All editions | default ctrID:hostID:length UID mapping to use |

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"formatVersion": 1,
"toolName": "buildah",
"toolVersion": "1.33.7",
"toolVersion": "1.42.1",
"commandCount": 38,
"commandTreeSha256": "6e05611b293df560d3677b63b74487fe09cd87c09e0aeb7c85a94a72202e5e19",
"commands": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"formatVersion": 2,
"toolName": "buildah",
"toolVersion": "1.33.7",
"toolVersion": "1.42.1",
"commandTreeSha256": "6e05611b293df560d3677b63b74487fe09cd87c09e0aeb7c85a94a72202e5e19",
"generatorSourceSha256": "9797615a03dd9c0eec07a4eff3c18a1cdc5275776bf9ae0a739fad929bbfa56f"
"generatorSourceSha256": "d071c023abb60d27ef5f12a3f62e018c7f36b20e1b335ba17e301660f15ee243"
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,18 @@ public record BuildahAddOptions : BuildahOptions
[CliFlag("--add-history")]
public bool? AddHistory { get; set; }

/// <summary>
/// use certificates at the specified path to access registries and sources in HTTPS locations
/// </summary>
[CliOption("--cert-dir", Format = OptionFormat.EqualsSeparated)]
public string? CertDir { get; set; }

/// <summary>
/// checksum the HTTP source content
/// </summary>
[CliOption("--checksum", Format = OptionFormat.EqualsSeparated)]
public string? Checksum { get; set; }

/// <summary>
/// set the access permissions of the destination content
/// </summary>
Expand All @@ -44,6 +56,12 @@ public record BuildahAddOptions : BuildahOptions
[CliOption("--contextdir", Format = OptionFormat.EqualsSeparated)]
public string? Contextdir { get; set; }

/// <summary>
/// exclude pattern when copying files
/// </summary>
[CliOption("--exclude", Format = OptionFormat.EqualsSeparated)]
public IEnumerable<string>? Exclude { get; set; }

/// <summary>
/// use the specified container's or image's root directory as the source root directory
/// </summary>
Expand All @@ -56,6 +74,12 @@ public record BuildahAddOptions : BuildahOptions
[CliOption("--ignorefile", Format = OptionFormat.EqualsSeparated)]
public string? Ignorefile { get; set; }

/// <summary>
/// enable layer caching for this operation (creates an independent layer)
/// </summary>
[CliFlag("--link")]
public bool? Link { get; set; }

/// <summary>
/// don't output a digest of the newly-added/copied content
/// </summary>
Expand All @@ -74,6 +98,18 @@ public record BuildahAddOptions : BuildahOptions
[CliOption("--retry-delay", Format = OptionFormat.EqualsSeparated)]
public string? RetryDelay { get; set; }

/// <summary>
/// set timestamps on new content to seconds after the epoch
/// </summary>
[CliOption("--timestamp", Format = OptionFormat.EqualsSeparated)]
public string? Timestamp { get; set; }

/// <summary>
/// require HTTPS and verify certificates when accessing registries when pulling images, and when retrieving sources from HTTPS URLs. TLS verification cannot be used when talking to an insecure registry. (default true)
/// </summary>
[CliOption("--tls-verify", Format = OptionFormat.EqualsSeparated)]
public bool? TlsVerify { get; set; }

/// <summary>Appends diagnostic members without exposing command option values.</summary>
/// <param name="builder">The builder receiving the record members.</param>
/// <returns>True because a redaction marker was appended.</returns>
Expand Down
102 changes: 96 additions & 6 deletions src/ModularPipelines.Buildah/Options/BuildahBuildOptions.Generated.cs
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,12 @@ public record BuildahBuildOptions : BuildahOptions
[CliOption("--cgroupns", Format = OptionFormat.EqualsSeparated)]
public string? Cgroupns { get; set; }

/// <summary>
/// preserve the contents of VOLUMEs during RUN instructions
/// </summary>
[CliFlag("--compat-volumes")]
public bool? CompatVolumes { get; set; }

/// <summary>
/// this is a legacy option, which has no effect on the image
/// </summary>
Expand Down Expand Up @@ -160,6 +166,12 @@ public record BuildahBuildOptions : BuildahOptions
[CliOption("--cpuset-mems", Format = OptionFormat.EqualsSeparated)]
public string? CpuSetMems { get; set; }

/// <summary>
/// set an "org.opencontainers.image.created" annotation in the image (default true)
/// </summary>
[CliOption("--created-annotation", Format = OptionFormat.EqualsSeparated)]
public bool? CreatedAnnotation { get; set; }

/// <summary>
/// use [username[:password]] for accessing the registry
/// </summary>
Expand All @@ -180,7 +192,7 @@ public record BuildahBuildOptions : BuildahOptions
public IEnumerable<string>? DecryptionKey { get; set; }

/// <summary>
/// additional devices to be used within containers (default [])
/// additional devices to provide
/// </summary>
[CliOption("--device", Format = OptionFormat.EqualsSeparated)]
public IEnumerable<string>? Device { get; set; }
Expand Down Expand Up @@ -275,6 +287,18 @@ public record BuildahBuildOptions : BuildahOptions
[CliOption("--iidfile", Format = OptionFormat.EqualsSeparated)]
public string? Iidfile { get; set; }

/// <summary>
/// inherit the annotations from the base image or base stages. (default true)
/// </summary>
[CliOption("--inherit-annotations", Format = OptionFormat.EqualsSeparated)]
public bool? InheritAnnotations { get; set; }

/// <summary>
/// inherit the labels from the base image or base stages. (default true)
/// </summary>
[CliOption("--inherit-labels", Format = OptionFormat.EqualsSeparated)]
public bool? InheritLabels { get; set; }

/// <summary>
/// 'private', path of IPC namespace to join, or 'host'
/// </summary>
Expand Down Expand Up @@ -393,7 +417,7 @@ public record BuildahBuildOptions : BuildahOptions
/// output destination (format: type=local,dest=path)
/// </summary>
[CliOption("--output", ShortForm = "-o", Format = OptionFormat.EqualsSeparated)]
public string? Output { get; set; }
public IEnumerable<string>? Output { get; set; }

/// <summary>
/// private, path of PID namespace to join, or 'host'
Expand All @@ -408,7 +432,7 @@ public record BuildahBuildOptions : BuildahOptions
public string? Platform { get; set; }

/// <summary>
/// pull the image from the registry if newer or not present in store, if false, only pull the image if not present, if always, pull the image even if the named image is present in store, if never, only use the image present in store if available (default "true")
/// pull base and SBOM scanner images from the registry. Values: always: pull base and SBOM scanner images even if the named images are present in store. missing: pull base and SBOM scanner images if the named images are not present in store. never: only use images present in store if available. newer: only pull base and SBOM scanner images when newer images exist on the registry than those in the store. (default "missing")
/// </summary>
[CliOption("--pull", Format = OptionFormat.EqualsSeparated, ValueArity = CliOptionValueArity.Optional)]
public CliOptionValue? Pull { get; set; }
Expand All @@ -426,11 +450,17 @@ public record BuildahBuildOptions : BuildahOptions
public int? Retry { get; set; }

/// <summary>
/// delay between retries in case of push/pull failures (default "2s")
/// delay between retries in case of push/pull failures
/// </summary>
[CliOption("--retry-delay", Format = OptionFormat.EqualsSeparated)]
public string? RetryDelay { get; set; }

/// <summary>
/// set timestamps in layers to no later than the value for --source-date-epoch
/// </summary>
[CliFlag("--rewrite-timestamp")]
public bool? RewriteTimestamp { get; set; }

/// <summary>
/// remove intermediate containers after a successful build (default true)
/// </summary>
Expand All @@ -449,6 +479,54 @@ public record BuildahBuildOptions : BuildahOptions
[CliOption("--runtime-flag", Format = OptionFormat.EqualsSeparated)]
public IEnumerable<string>? RuntimeFlag { get; set; }

/// <summary>
/// scan working container using preset configuration
/// </summary>
[CliOption("--sbom", Format = OptionFormat.EqualsSeparated)]
public string? Sbom { get; set; }

/// <summary>
/// add scan results to image as path
/// </summary>
[CliOption("--sbom-image-output", Format = OptionFormat.EqualsSeparated)]
public string? SbomImageOutput { get; set; }

/// <summary>
/// add scan results to image as path
/// </summary>
[CliOption("--sbom-image-purl-output", Format = OptionFormat.EqualsSeparated)]
public string? SbomImagePurlOutput { get; set; }

/// <summary>
/// merge scan results using strategy
/// </summary>
[CliOption("--sbom-merge-strategy", Format = OptionFormat.EqualsSeparated)]
public string? SbomMergeStrategy { get; set; }

/// <summary>
/// save scan results to file
/// </summary>
[CliOption("--sbom-output", Format = OptionFormat.EqualsSeparated)]
public string? SbomOutput { get; set; }

/// <summary>
/// save scan results to file`
/// </summary>
[CliOption("--sbom-purl-output", Format = OptionFormat.EqualsSeparated)]
public string? SbomPurlOutput { get; set; }

/// <summary>
/// scan working container using command in scanner image
/// </summary>
[CliOption("--sbom-scanner-command", Format = OptionFormat.EqualsSeparated)]
public string? SbomScannerCommand { get; set; }
Comment on lines +521 to +522

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve repeated scanner commands in the generated options

When configuring a custom SBOM scan that scans both the image filesystem and build context, this scalar property can emit only one --sbom-scanner-command. The Buildah 1.42.1 documentation explicitly states that multiple commands run in the specified order; its presets likewise supply separate commands for {ROOTFS} and {CONTEXT}. CommandArgumentBuilder.GetValues treats a string as one value, so concatenating commands does not produce repeated options. The same scalar declaration was added to BuildahCommitOptions. Fix the scraper/generator and regenerate both properties as collections so custom multi-command scans can be represented without bypassing the typed API.

AGENTS.md reference: AGENTS.md:L41-L41

Useful? React with 👍 / 👎.


/// <summary>
/// scan working container using scanner command from image
/// </summary>
[CliOption("--sbom-scanner-image", Format = OptionFormat.EqualsSeparated)]
public string? SbomScannerImage { get; set; }

/// <summary>
/// secret file to expose to the build
/// </summary>
Expand Down Expand Up @@ -480,6 +558,12 @@ public record BuildahBuildOptions : BuildahOptions
[CliOption("--skip-unused-stages", Format = OptionFormat.EqualsSeparated)]
public bool? SkipUnusedStages { get; set; }

/// <summary>
/// set new timestamps in image info to seconds after the epoch, defaults to current time
/// </summary>
[CliOption("--source-date-epoch", Format = OptionFormat.EqualsSeparated)]
public string? SourceDateEpoch { get; set; }

/// <summary>
/// squash all image layers into a single layer
/// </summary>
Expand Down Expand Up @@ -511,10 +595,10 @@ public record BuildahBuildOptions : BuildahOptions
public string? Target { get; set; }

/// <summary>
/// set created timestamp to the specified epoch seconds to allow for deterministic builds, defaults to current time
/// set new timestamps in image info and layer to seconds after the epoch, defaults to current times
/// </summary>
[CliOption("--timestamp", Format = OptionFormat.EqualsSeparated)]
public int? Timestamp { get; set; }
public string? Timestamp { get; set; }

/// <summary>
/// require HTTPS and verify certificates when accessing the registry (default true)
Expand All @@ -528,6 +612,12 @@ public record BuildahBuildOptions : BuildahOptions
[CliOption("--ulimit", Format = OptionFormat.EqualsSeparated)]
public IEnumerable<string>? Ulimit { get; set; }

/// <summary>
/// unset annotation when inheriting annotations from base image
/// </summary>
[CliOption("--unsetannotation", Format = OptionFormat.EqualsSeparated)]
public IEnumerable<string>? Unsetannotation { get; set; }

/// <summary>
/// unset environment variable from final image
/// </summary>
Expand Down
Loading
Loading