0

I am relatively new to Artifactory. We are using gardle artifactory plugin to publish the artifacts & also we are using Jenkins CI to automate builds.

In Artifactory Snapshot we have urls like (dev, stg, perf, prodfix) version & filename(abc-dev.jar).

1.) After dev build, I have to promote abc-dev.jar to stg URL(abc-stg.jar).similarly for rest of environment.

Kindly advise how we can achieve this.

Ondweb
  • 85
  • 1
  • 7

1 Answers1

4

In Jenkins, there's a Pipeline DSL that you can use to promote your builds. See the documentation here: https://wiki.jenkins-ci.org/display/JENKINS/Artifactory+-+Working+With+the+Pipeline+Jenkins+Plugin

Eyal Ben Moshe
  • 2,123
  • 10
  • 14
  • Can you tell me how we can do this using rest api build/promotion. I could see we can be able to promote but changing Jar version on release repository is possible or not..@Eyal Ben Moshe – Ondweb Feb 08 '17 at 16:24
  • I'm not sure I understand your question @Ondweb. Do you want to promote the artifact and change its version? If so, why? Are you trying to change the snapshot version to a release version? Can you elaborate about what you're trying to achieve? – Eyal Ben Moshe Feb 09 '17 at 19:02
  • when ever i am trying to build over-writing existing jars(non-unique version) in the artifactory under snapshot. For eg: I will do a build & publish to snapshot as module-current.jar (current will be dev version each build latest will be over-written ) & when it comes to release I have to promote from snapshot to release as a module-release.jar(release will be prod version here) on promotion i have to change version. @Eyal Ben Moshe – Ondweb Feb 09 '17 at 20:42