0
votes

I have multiple non-java artifacts stored in Artifactory that I would like to pack into single zip/tar file.

I tried using Gradle for this and https://www.jfrog.com/confluence/display/RTF/Gradle+Artifactory+Plugin with "plugins" notation. I have created separate configuration and started fighting on how to get those dependencies into one archive. This is where I started doubting whether Gradle is a good tool for the job. If it isn't can you recommend something? If it is good tool, where can I find some example of how to accomplish it?

I was thinking of something more advanced than Bash script so that it leaves good room for future extensions.

1

1 Answers

0
votes

If you have all of those artifacts in a single location (same folder / path) in Artifactory, you can use the "Retrieve Folder or Repository Archive" REST API.

If you would like to stick to Gradle I found the following in the Gradle documentation the following that might assist you:

task zip(dependsOn: jar, type: Zip) {
    from { configurations.runtime.allArtifacts.files }
    into(project.name + '-' + project.version)
}