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 25, 2024
1 parent bf15f36 commit 958cb05
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 All @@ -24,6 +25,37 @@ dependencies {
implementation(libs.commonsLang)
}

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 @@ -14,3 +14,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 958cb05

Please sign in to comment.