Skip to content

Releases: SgtSilvio/gradle-oci

0.18.0

13 Dec 16:30
Compare
Choose a tag to compare

🌟 Features

  • Support to build layers with docker for easier migration of existing images (for example with RUN apt install ... commands)

ℹ️ Miscellaneous

  • Updated dependencies

0.17.0

02 Dec 11:37
Compare
Choose a tag to compare

🌟 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
      The io.github.sgtsilvio.gradle.distributiontype attribute can have the value oci-image-index in addition to oci-image
    • The io.github.sgtsilvio.gradle.platform attribute does not have weird non-platform values universal and multi anymore
      universal is modeled by not setting the attribute which fits well to the semantics of Gradle attributes
      multi is handled via the oci-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

✨ Improvements

  • Changed OciImageDefinition.capabilities to a SetProperty<Capability>

ℹ️ Miscellaneous

  • Require Gradle 7.6.4 or 8.3 or higher (instead of 7.4 or higher)
  • Updated dependencies

0.16.0

09 Sep 11:11
Compare
Choose a tag to compare

🌟 Features

  • New and improved extension of test suites and test tasks: OciTestExtension
    (accessible via OciExtension.of(TestSuite/TaskProvider<Test>))
    Example of old 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"))
    }
    Example of new version:
    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

✨ Improvements

  • Improve recognizability of parent images as dependencies inside an image definition
    Example of old version:
    //imageDefinition.register("main") {
        //allPlatforms {
            parentImages {
                add("foo:bar:1.2.3")
            }
    Example of new version:
    //imageDefinition.register("main") {
        //allPlatforms {
            dependencies {
                runtime("foo:bar:1.2.3")
            }
    

ℹ️ Miscellaneous

  • Updated dependencies

0.15.1

29 Jul 16:28
Compare
Choose a tag to compare

🐞 Bug fixes

  • Removed unnecessary print statement

0.15.0

29 Jul 16:09
Compare
Choose a tag to compare

🐞 Bug fixes

  • Fixed resolving images from registries where one variant contains the same layer multiple times by duplicating these files

0.14.0

28 Jul 19:01
Compare
Choose a tag to compare

🌟 Features

  • Added OciExtension.imagesTaskClass and pushSingleTaskClass 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>)

🐞 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

23 Jul 12:39
Compare
Choose a tag to compare

🌟 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

✨ Improvements

  • Support duplicate manifest descriptors in image index

0.12.0

22 Jul 08:45
60f8b73
Compare
Choose a tag to compare

🐞 Bug fixes

  • Fixed resolving image inputs where 2 (or more) variants share the same layer artifact file

ℹ️ Miscellaneous

  • Updated dependencies

0.11.0

18 Jul 21:38
Compare
Choose a tag to compare

🌟 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

31 May 14:58
Compare
Choose a tag to compare

🌟 Features

  • Enable reuse of OciCopySpec similar to org.gradle.api.file.CopySpec
    • Added OciExtension.copySpec() and OciExtension.copySpec(Action<in OciCopySpec>) factory methods
    • Added OciCopySpec.with(OciCopySpec)
  • New features for layer creation in OciLayerTask:
    • Enable configuration of digest algorithm via digestAlgorithm property of type OciDigestAlgorithm with options SHA_256 (default) and SHA_512
    • Enable configuration of layer compression via compression property of type OciLayerCompression with options NONE and GZIP (default)
    • Added mediaType provider of type String derived from compression
    • Added extension property of type String with convention derived from compression (tar for NONE, tgz for GZIP)
    • Replaced digestFile with digest provider of type OciDigest
    • Replaced diffIdFile with diffId provider of type OciDigest
    • Added size provider of type Long
  • Enable access to the org.gradle.api.artifacts.Configuration that belongs to an image definition via OciImageDefinition.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 is v8, so for example linux/arm64 is the same as linux/arm64/v8
    • The default variant for the architecture arm is v7, so for example linux/arm is the same as linux/arm/v7
  • 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
  • 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 to file
  • Renamed OciComponentTask.componentFile to file
  • Renamed OciDigestAlgorithm.ociPrefix to id
  • Renamed OciDigestAlgorithm.algorithmName to standardName

🐞 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