jfrog / build-info

Artifactory's open integration layer for CI build servers
https://www.buildinfo.org
Apache License 2.0
148 stars 157 forks source link

publishArtifacts = false is ignored #796

Open luaps opened 4 months ago

luaps commented 4 months ago

Describe the bug According to https://jfrog.com/help/r/jfrog-integrations-documentation/gradle-artifactory-plugin there is a setting publishArtifacts = false which can be used to disable artifacts publishing.

However it has no effect whatsoever.

There is similar issue described here but with publishPom = false

To Reproduce Setup artifactory plugin

artifactory {
    contextUrl = "${artifactory_url}"
    publish {
        repository {
            repoKey = 'my_key'
        }
        defaults {
            publications 'ALL_PUBLICATIONS'
            publishArtifacts = false // it does publish artifacts regardless of the option
            publishBuildInfo = false // it does not publish build info
            publishPom = false // it does not publish poms
        }
    }
}

Expected behavior When publishArtifacts is set to false the plugin should not publish artifacts

Screenshots If applicable, add screenshots to help explain your problem.

Versions

./gradlew --version

------------------------------------------------------------
Gradle 8.4
------------------------------------------------------------

Build time:   2023-10-04 20:52:13 UTC
Revision:     e9251e572c9bd1d01e503a0dfdf43aedaeecdc3f

Kotlin:       1.9.10
Groovy:       3.0.17
Ant:          Apache Ant(TM) version 1.10.13 compiled on January 4 2023
JVM:          17.0.6 (Amazon.com Inc. 17.0.6+10-LTS)
OS:           Mac OS X 13.6.7 aarch64

Additional context Add any other context about the problem here.