Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make DockerRemoteApi plugin configuration cache compatible for Gradle 8.1+ #1193

Merged
merged 8 commits into from
Sep 20, 2023
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package com.bmuschko.gradle.docker

import org.gradle.testkit.runner.BuildResult
import spock.lang.Ignore
import spock.lang.IgnoreIf
import spock.lang.Requires

import static com.bmuschko.gradle.docker.fixtures.DockerConventionPluginFixture.groovySettingsFile
Expand Down Expand Up @@ -114,7 +115,7 @@ class DockerRemoteApiPluginFunctionalTest extends AbstractGroovyDslFunctionalTes
import com.bmuschko.gradle.docker.tasks.image.DockerPullImage
import com.bmuschko.gradle.docker.tasks.image.DockerRemoveImage
import com.bmuschko.gradle.docker.tasks.image.Dockerfile

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

auto formatting, is this OK to remove @bmuschko?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's fine. Seem like a tab or tabs ended up here.

task dockerfile(type: Dockerfile) {
from '$TEST_IMAGE_WITH_TAG'
runCommand("echo ${UUID.randomUUID()}")
Expand Down Expand Up @@ -261,7 +262,7 @@ class DockerRemoteApiPluginFunctionalTest extends AbstractGroovyDslFunctionalTes
build('convert')
}


@IgnoreIf({ os.windows })
def "configuration cache compatible when docker state changes on disk for OS #osName"() {
Jocce-Nilsson marked this conversation as resolved.
Show resolved Hide resolved
given:
useGradleVersion("8.3")
Expand Down Expand Up @@ -304,11 +305,11 @@ class DockerRemoteApiPluginFunctionalTest extends AbstractGroovyDslFunctionalTes
import com.bmuschko.gradle.docker.tasks.image.DockerBuildImage
import com.bmuschko.gradle.docker.tasks.image.DockerPushImage
import com.bmuschko.gradle.docker.tasks.image.DockerRemoveImage

task pullImage(type: DockerPullImage) {
image = '$AbstractFunctionalTest.TEST_IMAGE_WITH_TAG'
}

task dockerfile(type: Dockerfile) {
dependsOn pullImage
from '$AbstractFunctionalTest.TEST_IMAGE_WITH_TAG'
Expand All @@ -318,7 +319,7 @@ class DockerRemoteApiPluginFunctionalTest extends AbstractGroovyDslFunctionalTes
dependsOn dockerfile
images = ['demo.goharbor.io/gradle-docker-plugin/$AbstractFunctionalTest.TEST_IMAGE_WITH_TAG']
}

task removeImage(type: DockerRemoveImage) {
targetImageId buildImage.imageId
force = true
Expand All @@ -328,7 +329,7 @@ class DockerRemoteApiPluginFunctionalTest extends AbstractGroovyDslFunctionalTes
dependsOn buildImage
finalizedBy removeImage
images = buildImage.images

registryCredentials {
url = 'https://demo.goharbor.io/v2/'
username = '$credentials.username'
Expand Down