How do I configure Gradle jobs with FreeStyle Jenkins Jobs?

To configure Gradle jobs in Jenkins Freestyle job, check the “Gradle-Artifactory Integration” checkbox in order for the Jenkins Artifactory Plugin to generate the required fields of Artifactory Gradle integration to your gradle.build file automatically.


You will then, after pressing the refresh button, need to configure the source and destination repositories in Artifactory.

In case you do not have the Artifactory declaration to your ‘build.gradle’ file, then uncheck the “Project uses the Artifactory Gradle Plugin” checkbox. By doing so, the Jenkins Artifactory plugin will use the parameters that you have defined in the Jenkins and use them for resolving and publishing using Artifactory. In order to deploy Artifacts to Artifactory, check the “Publish artifacts to Artifactory” checkbox.


After those configurations, you can select in the build step the “invoke Gradle” to specify the path to your project. Please note that the deployment task to invoke Artifactory plugin is “artifactoryPublish”.

 

 

 

 

 

 


Please visit this page for additional information on configuring Jenkins Artifactory plugin with Gradle builds and deploying the artifacts to Artifactory.