0
votes

I have an incredibly basic Gradle build file:

plugins {
    id "base"
    id "com.jfrog.artifactory" version "4.3.0"
}
configurations {
    batchConfig
}
artifacts{
    file("dist").eachFile{ zipFile ->
        batchConfig zipFile
    }
}

println "BatchConfig Artifacts: " + configurations.batchConfig.allArtifacts

This is executed via Jenkins and appears to work fine:

Archives Artifacts: [DefaultPublishArtifact_Decorated module-0.0.post0.dev6+n4c62094-py2.7:egg:egg:null]

[buildinfo] Properties file found at '/tmp/buildInfo65481565498521.properties'

:artifactoryPublish

Deploying build descriptor to: https://ourArtifactoryServer/artifactory/api/build

Build successfully deployed.

Browse it in Artifactory under https://ourArtifactoryServer/artifactory/webapp/builds/testGradleBuild/34

BUILD SUCCESSFUL

However the artifact is not actually uploaded to Artifactory at all.

SSL cert configuration appears to be working fine, as I had to address that first. Any suggestions as to what I'm missing here?

1
Note that when I use the Generic Plugin as per @MrsTang 's answer the artifact in question is published, however I want to take advantage of the full Gradle Plugin :/GMeister

1 Answers

1
votes

Looks like you do still need to utilise the artifactory closure outlined in the Gradle Artifactory Plugin. Switching back to using "archives" instead of a custom Config and then adding this to my build sorted it:

artifactory {
    publish {
        defaults {
            publishConfigs('archives')
        }
    }
}