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

dockerClean : does not remove dockerfileZip artifacts #472

Open
phreed opened this issue Aug 26, 2021 · 1 comment
Open

dockerClean : does not remove dockerfileZip artifacts #472

phreed opened this issue Aug 26, 2021 · 1 comment

Comments

@phreed
Copy link

phreed commented Aug 26, 2021

What happened?

I ran:

./gradlew dockerClean

The relevant code:

Delete clean = project.tasks.create('dockerClean', Delete, {
group = 'Docker'
description = 'Cleans Docker build directory.'
})

What did you want to happen?

I wanted it to remove the *.zip artifact from the distribution directory.

@phreed
Copy link
Author

phreed commented Aug 26, 2021

This is related to issue #471 as I would expect the distribution directory to be removed.

tasks {
    named<Zip>("dockerfileZip") {
        archiveFileName.set("${rootProject.name}.zip")
        destinationDirectory.set(layout.buildDirectory.dir("dist"))
    }
}

The destinationDirectory that is removed by dockerClean is 'docker' and its subdirectories.
One way to deal with this is to augment dockerClean as follows:

tasks {
    named<Delete>("dockerClean") {
        delete(layout.buildDirectory.dir("dist"))
    }
}

A better approach is probably to point the destinationDirectory to 'docker/dest'.
This approach is indicated in #471 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant