Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
18b35c5
Upgrade the build environment and dependencies
bmuschko Jul 31, 2025
4293df6
Upgrade GitHub Actions
bmuschko Jul 31, 2025
cc4f2e6
Upgrade GitHub Actions
bmuschko Jul 31, 2025
928d7bc
Upgrade GitHub Actions
bmuschko Jul 31, 2025
6ff6464
Upgrade Wrapper
bmuschko Jul 31, 2025
34f596f
Fix tests
bmuschko Aug 8, 2025
740749c
Fix tests
bmuschko Aug 8, 2025
8a1895b
Fix tests
bmuschko Aug 8, 2025
b72e749
Fix tests
bmuschko Aug 8, 2025
591b407
Explicitly declare JUnit 5 dependencies
bmuschko Aug 8, 2025
1eae154
Fix tests
bmuschko Aug 8, 2025
acda3ea
Fix dependency declaration
bmuschko Oct 29, 2025
86a3d06
Use configuration cache-safe ways to access data
bmuschko Oct 29, 2025
49c4f1a
Logger cannot be accessed in closure due to configuration cache
bmuschko Oct 29, 2025
372aed6
baseName property is deprecated in newer Gradle versions
bmuschko Oct 29, 2025
c3d2cfd
Fix test
bmuschko Oct 29, 2025
f4c59f4
TestKit doesn't allow inline plugins with configuration cache
bmuschko Oct 29, 2025
5d1413b
The value of network ID needs to be available during configuration time
bmuschko Oct 29, 2025
603658d
Use ARM64-compatible container images
bmuschko Oct 29, 2025
05dced9
Fix test
bmuschko Oct 29, 2025
2efe55a
Fix test
bmuschko Oct 29, 2025
4d2c8ab
Fix test
bmuschko Oct 29, 2025
b923f81
Logger cannot be used in closure
bmuschko Oct 29, 2025
f2dff76
Fix for configuration cache
bmuschko Oct 29, 2025
8960aae
Fix test
bmuschko Oct 30, 2025
adb871d
Use ARM64-compatible container image
bmuschko Oct 30, 2025
0e48076
Flush out container image for a more stable CI build
bmuschko Oct 30, 2025
79e9ce2
Write Dockerfile contents to file for assertions
bmuschko Oct 30, 2025
f5299f2
Upgrade dependencies
bmuschko Oct 30, 2025
c4919f2
Properly reflect version
bmuschko Oct 30, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/gradle-wrapper-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on: [push, pull_request]
jobs:
validation:
name: "Validation"
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: gradle/wrapper-validation-action@v1
- uses: gradle/wrapper-validation-action@v3
17 changes: 10 additions & 7 deletions .github/workflows/linux-build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on: [push, pull_request]
jobs:
build:
name: Build
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -13,14 +13,14 @@ jobs:
- name: Set up Java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 17
distribution: 'zulu'
java-version: 21
- name: Set up Docker private registry
run: |
docker run -d -p 5000:5000 --restart=always --name registry registry:2
docker run -d -p 5001:5000 --restart=always --name secure_registry -v "$(pwd)"/src/functTest/resources/auth:/auth:rw -e "REGISTRY_AUTH=htpasswd" -e "REGISTRY_AUTH_HTPASSWD_REALM=Registry Realm" -e "REGISTRY_AUTH_HTPASSWD_PATH=/auth/htpasswd" registry:2
- name: Set up Gradle
uses: gradle/gradle-build-action@v2
uses: gradle/actions/setup-gradle@v3
- name: Compilation
run: ./gradlew classes
- name: Validate plugins
Expand All @@ -29,6 +29,9 @@ jobs:
run: ./gradlew test
- name: Integration tests
run: ./gradlew integrationTest
- name: Clean Docker cache
run: docker builder prune -af --filter "until=24h"
continue-on-error: true
- name: Functional tests
env:
DOCKER_HUB_USERNAME: ${{ secrets.DOCKER_HUB_USERNAME }}
Expand All @@ -41,17 +44,17 @@ jobs:
- name: Assemble artifacts
run: ./gradlew assemble javadoc asciidoctorAllGuides
- name: Upload binaries
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: gradle-docker-plugin-bin
path: build/libs/*.jar
- name: Upload Javadoc
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: gradle-docker-plugin-javadoc
path: build/docs/javadoc/
- name: Upload Guides
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: gradle-docker-plugin-guides
path: |
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/windows-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on: [push, pull_request]
jobs:
build:
name: Build
runs-on: windows-2019
runs-on: windows-2025
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -13,10 +13,10 @@ jobs:
- name: Set up Java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 17
distribution: 'zulu'
java-version: 21
- name: Set up Gradle
uses: gradle/gradle-build-action@v2
uses: gradle/actions/setup-gradle@v3
- name: Compilation
run: ./gradlew classes
- name: Unit tests
Expand Down
27 changes: 17 additions & 10 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,12 @@ dependencies {
shaded(libs.bundles.docker.java)
shaded(libs.activation)
shaded(libs.asm)
testImplementation("org.junit.jupiter:junit-jupiter:5.13.4")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
testImplementation(libs.spock.core) {
exclude(group = "org.codehaus.groovy")
}
testRuntimeOnly(libs.cglib.nodep)
testImplementation(libs.zt.zip)
functionalTestImplementation(libs.commons.vfs2)
}
Expand Down Expand Up @@ -61,34 +64,38 @@ gradlePlugin {
displayName = "Gradle Docker Remote API Plugin"
description = "Plugin that provides tasks for interacting with Docker via its remote API."
implementationClass = "com.bmuschko.gradle.docker.DockerRemoteApiPlugin"
tags.set(listOf("docker", "container", "image", "lightweight", "vm", "linux"))
}
create("docker-java-application") {
id = "com.bmuschko.docker-java-application"
displayName = "Gradle Docker Java Application Plugin"
description = "Plugin that provides conventions for building and publishing Docker images for Java applications."
implementationClass = "com.bmuschko.gradle.docker.DockerJavaApplicationPlugin"
tags.set(listOf("docker", "container", "image", "lightweight", "vm", "linux"))
}
create("docker-spring-boot-application") {
id = "com.bmuschko.docker-spring-boot-application"
displayName = "Gradle Docker Spring Boot Application Plugin"
description = "Plugin that provides conventions for building and publishing Docker images for Spring Boot applications."
implementationClass = "com.bmuschko.gradle.docker.DockerSpringBootApplicationPlugin"
tags.set(listOf("docker", "container", "image", "lightweight", "vm", "linux"))
}
}
}

pluginBundle {
website = "https://github.com/bmuschko/gradle-docker-plugin"
vcsUrl = "https://github.com/bmuschko/gradle-docker-plugin"
tags = listOf("docker", "container", "image", "lightweight", "vm", "linux")
gradlePlugin {
website.set("https://github.com/bmuschko/gradle-docker-plugin")
vcsUrl.set("https://github.com/bmuschko/gradle-docker-plugin")
}

buildScan {
termsOfServiceUrl = "https://gradle.com/terms-of-service"
termsOfServiceAgree = "yes"
develocity {
buildScan {
termsOfUseUrl.set("https://gradle.com/help/legal-terms-of-use")
termsOfUseAgree.set("yes")

if (!System.getenv("CI").isNullOrEmpty()) {
publishAlways()
tag("CI")
if (!System.getenv("CI").isNullOrEmpty()) {
publishing.onlyIf { true }
tag("CI")
}
}
}
15 changes: 15 additions & 0 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,21 @@ plugins {
repositories {
mavenCentral()
gradlePluginPortal()
maven {
name = "ajoberstar-backup"
url = uri("https://ajoberstar.org/bintray-backup/")
}
}

java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}

tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
kotlinOptions {
jvmTarget = "11"
}
}

val versionCatalog = extensions.getByType<VersionCatalogsExtension>().named("buildsrcLibs")
Expand Down
4 changes: 2 additions & 2 deletions gradle/buildsrc.libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ asciidoctorj-tabbed-code-extension = "0.3"
grgit = "1.9.1"
gradle-git = "1.7.1"
gradle-git-publish = "0.3.3"
shadow = "7.1.2"
shadow = "8.3.8"

[libraries]
asciidoctor-jvm-plugin = { module = "org.asciidoctor:asciidoctor-gradle-jvm", version.ref = "asciidoctor-jvm-plugin" }
asciidoctorj-tabbed-code-extension = { module = "com.bmuschko:asciidoctorj-tabbed-code-extension", version.ref = "asciidoctorj-tabbed-code-extension" }
grgit = { module = "org.ajoberstar:grgit", version.ref = "grgit" }
gradle-git = { module = "org.ajoberstar:gradle-git", version.ref = "gradle-git" }
gradle-git-publish = { module = "org.ajoberstar:gradle-git-publish", version.ref = "gradle-git-publish" }
shadow = { module = "gradle.plugin.com.github.johnrengelman:shadow", version.ref = "shadow" }
shadow = { module = "com.gradleup.shadow:com.gradleup.shadow.gradle.plugin", version.ref = "shadow" }
10 changes: 6 additions & 4 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
[versions]
plugin-publish = "1.1.0"
docker-java = "3.3.3"
plugin-publish = "2.0.0"
docker-java = "3.6.0"
activation = "1.1.1"
asm = "9.6"
spock = "2.0-groovy-3.0"
asm = "9.9"
spock = "2.3-groovy-3.0"
cglib-nodep = "3.3.0"
zt-zip = "1.13"
commons-vfs2 = "2.9.0"

Expand All @@ -17,6 +18,7 @@ docker-java-transport-httpclient5 = { module = "com.github.docker-java:docker-ja
activation = { module = "javax.activation:activation", version.ref = "activation" }
asm = { module = "org.ow2.asm:asm", version.ref = "asm" }
spock-core = { module = "org.spockframework:spock-core", version.ref = "spock" }
cglib-nodep = { module = "cglib:cglib-nodep", version.ref = "cglib-nodep" }
zt-zip = { module = "org.zeroturnaround:zt-zip", version.ref = "zt-zip" }
commons-vfs2 = { module = "org.apache.commons:commons-vfs2", version.ref = "commons-vfs2" }

Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 3 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
31 changes: 23 additions & 8 deletions gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 9 additions & 6 deletions gradlew.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id("com.gradle.enterprise") version("3.10.2")
id("com.gradle.develocity") version("4.1")
}

rootProject.name = "gradle-docker-plugin"
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package com.bmuschko.gradle.docker
import org.gradle.testkit.runner.BuildResult
import spock.lang.Unroll

import static com.bmuschko.gradle.docker.TextUtils.containsIgnoreLineEndings
import static com.bmuschko.gradle.docker.TextUtils.equalsIgnoreLineEndings

class RemoteApiPluginDocumentationTest extends AbstractDocumentationTest {

Expand Down Expand Up @@ -102,10 +102,12 @@ class RemoteApiPluginDocumentationTest extends AbstractDocumentationTest {
copySampleCode("remote-api-plugin/dockerfile-instructions/$dsl.language")

when:
BuildResult result = build('printDockerfileInstructions')
build('printDockerfileInstructions')

then:
containsIgnoreLineEndings(result.output, """FROM openjdk:8-alpine
def outputFile = new File(projectDir, 'build/dockerfile-instructions.txt')
outputFile.exists()
equalsIgnoreLineEndings(outputFile.text, """FROM openjdk:8-alpine
COPY my-app-1.0.jar /app/my-app-1.0.jar
ENTRYPOINT ["java"]
CMD ["-jar", "/app/my-app-1.0.jar"]
Expand Down
2 changes: 1 addition & 1 deletion src/docs/asciidoc/user-guide/00-intro.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Docker remote API is handled by the https://github.com/docker-java/docker-java[D
Please refer to the library's documentation for more information on the supported Docker's client API and Docker server version.

[IMPORTANT]
This plugin requires Gradle >= 7.4.0 to work properly.
This plugin requires Gradle >= 8.4.0 to work properly.

=== Benefits

Expand Down
Loading
Loading