Sree
Sree

Reputation: 7

How_Can i make Versions in Artifactory

While running a job in jenkins using ant script i got the build in artifactory . My problem is when a change in build happens it should store as a new version in artifactory. How can i do this?

Thank You

Upvotes: 0

Views: 60

Answers (1)

rasebo
rasebo

Reputation: 1008

The question is missing a lot of details, but assuming you are using a Jenkinsfile together with the Artifactory Jenkins plugin, you would need to use something like ${env.BUILD_NUMBER} when defining the target in the Jenkinsfile.

It should be something similar to:

{
  "files": [
    {
      "pattern": "my-build-directory/*.tar.gz",
      "target": "my-repo/${env.BUILD_NUMBER}/"
    }
  ]
}

If this helps answer your question, I would appreciate it if you could mark it as the accepted answer.

Upvotes: 1

Related Questions