Releases: SgtSilvio/gradle-oci
Releases · SgtSilvio/gradle-oci
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
0.9.0
🌟 Features
- Added
ociImageDependencies
extension- Can be used to declare dependencies for test tasks:
Replaces the old syntax:
ociImageDependencies.forTest(tasks.test) { runtime(...) }
oci { imageDependencies.forTest(tasks.test) { add(...) } }
- Can be used to declare dependencies for test suites:
testing { suites { "test"(JvmTestSuite::class) { ociImageDependencies { runtime(...) } } } }
- Can be used to declare dependencies for test tasks:
ℹ️ Miscellaneous
- Updated dependencies
0.8.0
🌟 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 alatest
tag (previously this was only possible by declaring the dependency twice, once without any call totag
and secondly with.tag("latest")
)
- Existing APIs for a single tag:
- Added command line options registry, url, credentials for tasks of type
OciPushTask
:--registry
: Pushes to the registry defined with the specified name inoci.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 typeOciPushSingleTask
for every image definition (task name ispushOciImage
for themain
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