Reputation: 7
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
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