0

There is a static Artifactory URL being used to grab a semantically versioned artifact and deploy it to JBoss. The deployment aspect of the cookbook is already fleshed out. However, I would like to make the URL "dynamic". In other words, get the most recently published artifact from Artifactory.

Example URL https://myartifactory.com/releases/com/package/helloworld/1.0.0/helloworld-1.0.0.war

A Jenkins pipeline exists for this artifact that deploys to Artifactory. So, if 1.1.0 were to be released, it's URL would look like the following:

1.1.0 URL https://myartifactory.com/releases/com/package/helloworld/1.1.0/helloworld-1.1.0.war

You can see that the directory in Artifactory changes, as well as the name of the artifact. How can I set up the cookbook to always grab the latest version from Artifactory?

1
  • 1
    From artifactory documentation, replace your static version number by [RELEASE] to get the latest release.
    – Tensibai
    Commented Dec 3, 2018 at 15:56

1 Answer 1

1

You should use of the Retrieve Latest Artifact endpoint. It uses the repository layouts to know what is the version in your artifact path, so you want to make sure those are set right for you. In this case, it's a standard Maven layout, which is the default for Maven repo, so you're all good.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.