Skip to content

Releases: SgtSilvio/gradle-oci

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

0.9.0

28 Mar 21:11
Compare
Choose a tag to compare

🌟 Features

  • Added ociImageDependencies extension
    • Can be used to declare dependencies for test tasks:
      ociImageDependencies.forTest(tasks.test) {
          runtime(...)
      }
      
      Replaces the old syntax:
      oci {
          imageDependencies.forTest(tasks.test) {
              add(...)
          }
      }
      
    • Can be used to declare dependencies for test suites:
      testing {
          suites {
              "test"(JvmTestSuite::class) {
                  ociImageDependencies {
                      runtime(...)
                  }
              }
          }
      }
      

ℹ️ Miscellaneous

  • Updated dependencies

0.8.0

16 Mar 15:27
Compare
Choose a tag to compare

🌟 Features

  • Added support for multiple tags on an OCI image dependency
    • Existing APIs for a single tag:
      • .tag("tag1")
      • .tag(provider { "tag1" })
    • Additional APIs for multiple tags:
      • .tag("tag1", "tag2")
      • .tag(setOf("tag1", "tag2"))
      • .tag(provider { setOf("tag1", "tag2") })
    • All above APIs can be called in a chain multiple times, for example .tag("tag1").tag("tag2", "tag3")
    • "." is a placeholder for the default tag of the dependency, for example .tag(".", "latest") keeps the tag and additionally adds a latest tag (previously this was only possible by declaring the dependency twice, once without any call to tag and secondly with .tag("latest"))
  • Added command line options registry, url, credentials for tasks of type OciPushTask:
    • --registry: Pushes to the registry defined with the specified name in oci.registries.
    • --url: Pushes to the specified registry URL.
    • --credentials: Authenticates to the registry using the credentials with the specified id.
  • Added push{imageDefinitionName}OciImage tasks of type OciPushSingleTask for every image definition (task name is pushOciImage for the main image definition) with command line options:
    • --name: Names the image. If not specified, the imageName defined in the image definition is used.
    • --tag: Tags the image. Option can be specified multiple times. The value . translates to the imageTag defined in the image definition. If not specified, the imageTag defined in the image definition is used.
  • Added OciRegistry.optionalCredentials()

✨ Improvements

  • Improved syntax for adding constraints to OciImagesDependencies (similar to Gradle's strongly-typed dependencies block)
    • constraint(DependencyConstraint)
      add(DependencyConstraint)
    • constraint(CharSequence)
      add(constraint(CharSequence))
    • constraint(Project)
      add(constraint(Project))
    • constraint(Provider<MinimalExternalModuleDependency>)
      add(constraint(Provider<MinimalExternalModuleDependency>))
    • constraint(ProviderConvertible<MinimalExternalModuleDependency>)
      add(constraint(ProviderConvertible<MinimalExternalModuleDependency>))
    • New APIs:
      • add(DependencyConstraint)
      • add(DependencyConstraint, Action<in DependencyConstraint>)
      • add(Provider<out DependencyConstraint>)
      • add(Provider<out DependencyConstraint>, Action<in DependencyConstraint>)
      • Factories for dependency constraints:
        • constraint(CharSequence)
        • constraint(Project)
        • constraint(Provider<out MinimalExternalModuleDependency>)
        • constraint(ProviderConvertible<out MinimalExternalModuleDependency>)

🐞 Bug fixes

  • Fix possible layer corruption during download because of invalid retries after partial data has already been received
  • Fix compatibility with Configuration Cache (java.time.Instant could not be serialized)

ℹ️ Miscellaneous

  • Updated dependencies