Skip to content

Commit

Permalink
Merge pull request #1009 from imjasonh/drop-options
Browse files Browse the repository at this point in the history
drop deprecated options field
  • Loading branch information
imjasonh committed Jan 11, 2024
2 parents 93abcfc + 319eabd commit a01a42a
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 175 deletions.
7 changes: 0 additions & 7 deletions examples/options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,3 @@ contents:
archs:
- x86_64
- aarch64

options:
debug:
contents:
packages:
add:
- busybox
1 change: 0 additions & 1 deletion internal/cli/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ bill of materials) describing the image contents.
cmd.Flags().StringSliceVar(&sbomFormats, "sbom-formats", sbom.DefaultOptions.Formats, "SBOM formats to output")
cmd.Flags().StringSliceVarP(&extraRepos, "repository-append", "r", []string{}, "path to extra repositories to include")
cmd.Flags().StringSliceVarP(&extraPackages, "package-append", "p", []string{}, "extra packages to include")
_ = cmd.Flags().MarkDeprecated("build-option", "use --package-append instead")
cmd.Flags().StringSliceVar(&logPolicy, "log-policy", []string{}, "logging policy to use")
cmd.Flags().StringSliceVar(&rawAnnotations, "annotations", []string{}, "OCI annotations to add. Separate with colon (key:value)")
cmd.Flags().StringVar(&cacheDir, "cache-dir", "", "directory to use for caching apk packages and indexes (default '' means to use system-defined cache directory)")
Expand Down
1 change: 0 additions & 1 deletion internal/cli/publish.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,6 @@ in a keychain.`,
cmd.Flags().StringSliceVar(&sbomFormats, "sbom-formats", sbom.DefaultOptions.Formats, "SBOM formats to output")
cmd.Flags().StringSliceVarP(&extraRepos, "repository-append", "r", []string{}, "path to extra repositories to include")
cmd.Flags().StringSliceVarP(&extraPackages, "package-append", "p", []string{}, "extra packages to include")
_ = cmd.Flags().MarkDeprecated("build-option", "use --package-append instead")
cmd.Flags().StringSliceVar(&logPolicy, "log-policy", []string{}, "logging policy to use")
cmd.Flags().StringSliceVar(&rawAnnotations, "annotations", []string{}, "OCI annotations to add. Separate with colon (key:value)")
cmd.Flags().StringVar(&cacheDir, "cache-dir", "", "directory to use for caching apk packages and indexes (default '' means to use system-defined cache directory)")
Expand Down
78 changes: 0 additions & 78 deletions pkg/build/types/build_option.go

This file was deleted.

84 changes: 0 additions & 84 deletions pkg/build/types/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,60 +3,6 @@
"$id": "https://chainguard.dev/apko/pkg/build/types/image-configuration",
"$ref": "#/$defs/ImageConfiguration",
"$defs": {
"AccountsOption": {
"properties": {
"RunAs": {
"type": "string"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"RunAs"
],
"description": "AccountsOption describes an optional deviation to an apko environment's run-as setting."
},
"BuildOption": {
"properties": {
"Contents": {
"$ref": "#/$defs/ContentsOption"
},
"Accounts": {
"$ref": "#/$defs/AccountsOption"
},
"Environment": {
"additionalProperties": {
"type": "string"
},
"type": "object"
},
"Entrypoint": {
"$ref": "#/$defs/ImageEntrypoint"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"Contents",
"Accounts",
"Environment",
"Entrypoint"
],
"description": "BuildOption describes an optional deviation to an apko environment."
},
"ContentsOption": {
"properties": {
"Packages": {
"$ref": "#/$defs/ListOption"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"Packages"
],
"description": "ContentsOption describes an optional deviation to an apko environment's contents block."
},
"Group": {
"properties": {
"groupname": {
Expand Down Expand Up @@ -168,13 +114,6 @@
"type": "string",
"description": "Optional: Path to a local file containing additional image configuration\n\nThe included configuration is deep merged with the parent configuration"
},
"options": {
"additionalProperties": {
"$ref": "#/$defs/BuildOption"
},
"type": "object",
"description": "Optional: A map of named build option deviations\n\nDeprecated: Use WithExtraPackages."
},
"volumes": {
"items": {
"type": "string"
Expand Down Expand Up @@ -237,29 +176,6 @@
"additionalProperties": false,
"type": "object"
},
"ListOption": {
"properties": {
"Add": {
"items": {
"type": "string"
},
"type": "array"
},
"Remove": {
"items": {
"type": "string"
},
"type": "array"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"Add",
"Remove"
],
"description": "ListOption describes an optional deviation to a list, for example, a list of packages."
},
"OSRelease": {
"properties": {
"name": {
Expand Down
5 changes: 1 addition & 4 deletions pkg/build/types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,7 @@ type ImageConfiguration struct {
//
// The included configuration is deep merged with the parent configuration
Include string `json:"include,omitempty" yaml:"include,omitempty"`
// Optional: A map of named build option deviations
//
// Deprecated: Use WithExtraPackages.
Options map[string]BuildOption `json:"options,omitempty" yaml:"options,omitempty"`

// Optional: A list of volumes to configure
//
// This is _not_ the same as Paths, but refers to the OCI spec "volumes"
Expand Down

0 comments on commit a01a42a

Please sign in to comment.