Skip to content

Commit

Permalink
Add oci image definition
Browse files Browse the repository at this point in the history
  • Loading branch information
SgtSilvio committed Nov 22, 2024
1 parent 7afd557 commit a26ebed
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
32 changes: 32 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
plugins {
alias(libs.plugins.hivemq.extension)
alias(libs.plugins.defaults)
alias(libs.plugins.oci)
alias(libs.plugins.license)
}

Expand Down Expand Up @@ -36,6 +37,37 @@ dependencies {
implementation(libs.jcommander)
}

oci {
registries {
dockerHub {
optionalCredentials()
}
}
imageMapping {
mapModule("com.hivemq", "hivemq-community-edition") {
toImage("hivemq/hivemq-ce")
}
}
imageDefinitions.register("main") {
allPlatforms {
dependencies {
runtime("com.hivemq:hivemq-community-edition:latest") { isChanging = true }
}
layers {
layer("hivemqExtension") {
contents {
permissions("opt/hivemq/", 0b111_111_000)
permissions("opt/hivemq/extensions/", 0b111_111_000)
into("opt/hivemq/extensions") {
from(zipTree(tasks.hivemqExtensionZip.flatMap { it.archiveFile }))
}
}
}
}
}
}
}

@Suppress("UnstableApiUsage")
testing {
suites {
Expand Down
1 change: 1 addition & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,4 @@ mockito = { module = "org.mockito:mockito-core", version.ref = "mockito" }
defaults = { id = "io.github.sgtsilvio.gradle.defaults", version = "0.2.0" }
hivemq-extension = { id = "com.hivemq.extension", version = "3.2.0" }
license = { id = "com.github.hierynomus.license", version = "0.16.1" }
oci = { id = "io.github.sgtsilvio.gradle.oci", version = "0.16.0" }

0 comments on commit a26ebed

Please sign in to comment.