Releases: SgtSilvio/gradle-oci
Releases · SgtSilvio/gradle-oci
0.18.0
0.17.0
🌟 Features
- Better modeling of OCI variant and their attributes that fits better with both the OCI model and the Gradle model
- Only 1 OCI variant for each platform instead of 2 of which one was internal previously
- Differentiation between an OCI image variant (with layers) and an OCI image index variant
Theio.github.sgtsilvio.gradle.distributiontype
attribute can have the valueoci-image-index
in addition tooci-image
- The
io.github.sgtsilvio.gradle.platform
attribute does not have weird non-platform valuesuniversal
andmulti
anymore
universal
is modeled by not setting the attribute which fits well to the semantics of Gradle attributes
multi
is handled via theoci-image-index
distribution type - The new model allows for a more robust image dependency resolution. The previous model was a bit hacky and required some workarounds.
- Support Gradle 8.11
- Support
requireFeature
new in Gradle 8.11 (https://docs.gradle.org/8.11/release-notes.html#api-for-selecting-variants-by-feature-name) - Avoid deprecation warnings
- Support
✨ Improvements
- Changed
OciImageDefinition.capabilities
to aSetProperty<Capability>
ℹ️ Miscellaneous
- Require Gradle 7.6.4 or 8.3 or higher (instead of 7.4 or higher)
- Updated dependencies
0.16.0
🌟 Features
- New and improved extension of test suites and test tasks:
OciTestExtension
(accessible viaOciExtension.of(TestSuite/TaskProvider<Test>)
)
Example of old version:Example of new version:ociImageDependencies.forTest(tasks.test) { runtime("foo:bar:1.2.3") val scope2Runtime = runtimeScope("scope2") scope2Runtime("foo:bar:2.3.4") } tasks.named("testOciRegistryData", oci.imagesTaskClass) { platformSelector = oci.platformSelector(oci.platform("linux", "amd64")) }
oci.of(tasks.test) { imageDependencies { runtime("foo:bar:1.2.3") } imageDependencies("scope2") { runtime("foo:bar:2.3.4") } platformSelector = platformSelector(platform("linux", "amd64")) }
- Added
platformSelector
property - Improved declaration of multiple image dependency scopes:
imageDependencies
,imageDependencies(scope)
- Allow configuration on test suite and individual test tasks at the same time
This allows to restrict platforms on different test suite targets
- Added
✨ Improvements
- Improve recognizability of parent images as dependencies inside an image definition
Example of old version:Example of new version://imageDefinition.register("main") { //allPlatforms { parentImages { add("foo:bar:1.2.3") }
//imageDefinition.register("main") { //allPlatforms { dependencies { runtime("foo:bar:1.2.3") }
ℹ️ Miscellaneous
- Updated dependencies
0.15.1
0.15.0
0.14.0
🌟 Features
- Added
OciExtension.imagesTaskClass
andpushSingleTaskClass
to avoid importing task classes in build scripts - Enable registry content filtering without the need to access the underlying repository:
- Added
OciRegistries.exclusiveContent(Action<in InclusiveRepositoryContentDescriptor>)
- Added
OciRegistry.content(Action<in RepositoryContentDescriptor>)
- Added
🐞 Bug fixes
- Fixed resolving images from an empty configuration
- Fixed resolving images where one variant contains the same layer artifact file multiple times
0.13.0
🌟 Features
- Support the GitHub Container Registry
- Add
OciRegistries.gitHubContainerRegistry {}
convenience function - Support registry tokens that are not JWTs
- Remove authentication challenge validation because the GitHub Container Registry creates unexpected authentication challenges
- Add
✨ Improvements
- Support duplicate manifest descriptors in image index
0.12.0
0.11.0
🌟 Features
- Fine-grained variants for each platform (more detailed information will be added later)
- Enable selection of a subset of platforms via
PlatformSelector
- Allow configuring the same layer via multiple scopes (allPlatforms, platformsMatching, specificPlatform)
✨ Improvements
- Improved handling of unexpected manifest, config and layer media types by filtering out the corresponding image (that is actually not a real container image, rather a different artifact)
- Improved registry URL encoding/escaping in repository URL for better readability
🐞 Bug fixes
- Fixed delayed creation of the destination directory of an
OciCopySpec
ℹ️ Miscellaneous
- Updated dependencies
0.10.0
🌟 Features
- Enable reuse of
OciCopySpec
similar toorg.gradle.api.file.CopySpec
- Added
OciExtension.copySpec()
andOciExtension.copySpec(Action<in OciCopySpec>)
factory methods - Added
OciCopySpec.with(OciCopySpec)
- Added
- New features for layer creation in
OciLayerTask
:- Enable configuration of digest algorithm via
digestAlgorithm
property of typeOciDigestAlgorithm
with optionsSHA_256
(default) andSHA_512
- Enable configuration of layer compression via
compression
property of typeOciLayerCompression
with optionsNONE
andGZIP
(default) - Added
mediaType
provider of typeString
derived fromcompression
- Added
extension
property of typeString
with convention derived fromcompression
(tar
forNONE
,tgz
forGZIP
) - Replaced
digestFile
withdigest
provider of typeOciDigest
- Replaced
diffIdFile
withdiffId
provider of typeOciDigest
- Added
size
provider of typeLong
- Enable configuration of digest algorithm via
- Enable access to the
org.gradle.api.artifacts.Configuration
that belongs to an image definition viaOciImageDefinition.configuration
- Enable use of providers for capabilities via
OciImageDefinition.Capabilities.add(Provider<String>)
✨ Improvements
- More robust detection of component and layer files in resolved OCI image dependencies
- Allows different layer artifacts with the same digest
- Allows different variants to reference the same layer artifact
- Added normalization of some platform variants to support images produced with
containerd
normalization (related issue: docker-library/official-images#16859):- The default variant for the architecture
arm64
isv8
, so for examplelinux/arm64
is the same aslinux/arm64/v8
- The default variant for the architecture
arm
isv7
, so for examplelinux/arm
is the same aslinux/arm/v7
- The default variant for the architecture
- The destination directory of an
OciCopySpec
is only created if there are source files - Simplified build output of layers
- Removed one subfolder level:
oci/images/$imageDefName/$layerName
=>oci/images/$imageDefName
- Replaced
.diffId
and.digest
files with a single.properties
file
- Removed one subfolder level:
- Improved naming of layers downloaded from a registry
- Include the layer digest (truncated) into the filename instead of a counter so the name is not dependent on the order of layers
- Include file extension derived from the media type
- Transformation of image from a registry to an OCI component is now also deterministic in the edge case of duplicate platforms in the image index
- Renamed
OciLayerTask.tarFile
tofile
- Renamed
OciComponentTask.componentFile
tofile
- Renamed
OciDigestAlgorithm.ociPrefix
toid
- Renamed
OciDigestAlgorithm.algorithmName
tostandardName
🐞 Bug fixes
- The default capability for image definitions with a name other than
main
is now added to the Gradle configuration and not only to the OCI component
ℹ️ Miscellaneous
- Updated dependencies