[HAP-1117] Artifact promotion plugin should support running some custom code Created: 07/Dec/18  Updated: 02/Jul/19  Resolved: 03/Jan/19

Status: Resolved
Project: Jenkins Artifactory Plug-in
Component/s: None
Affects Version/s: 2.16.2
Fix Version/s: 3.0.0

Type: New Feature Priority: Normal
Reporter: Sushant Pradhan Assignee: Eyal Ben Moshe
Resolution: Fixed Votes: 0
Labels: artifactory, jenkins, promotion


Artifact promotion plugin should support running some custom code after successfully promoting a build


Comment by Eyal Ben Moshe [ 08/Dec/18 ]

The upcoming Jenkins Plugin version will support triggering Jenkins jobs following changes in Artifactory. Jenkins will poll an Artifactory path (definined in the job configuration) and will trigger the build, if files are added to this path. This will be supported for pipeline jobs.

Comment by Sushant Pradhan [ 08/Dec/18 ]

Thank you Eyal. Do you have any rough timeline for when the new version will be released?

Comment by Eyal Ben Moshe [ 08/Dec/18 ]

We are aiming to release this at the end of this month.

Comment by Sushant Pradhan [ 03/Jan/19 ]

Hello Eyal Ben Moshe. I see version 3.0.0 released 2 days back has a Jira issue HAP-1012 fixed which seems similar to the one here. 

Can you confirm if it is done and guide me to the documentation around the configuration and pipeline changes required for me to trigger a jenkins job on pushing/moving a artifact in artifactory.


Comment by Eyal Ben Moshe [ 03/Jan/19 ]

With version 3.0.0 of the Jenkins Artifactory Plugin installed, you'll see a new "Enable Artifactory Trigger" option under "Build Triggers" in each Jenkins job.

This is the way you can currently trigger custom code following changes in Artifactory. The custom code can be configured, as part of a pipeline job. The job will be triggered following the addition or modification of files in the configured Artifactory path. Promotion actually adds or modifies files in a specific path, so that's how you get this functionality going with the new Artifactory Trigger feature.

Comment by Sushant Pradhan [ 03/Jan/19 ]

Thank you for confirmation. Does the plugin prepopulate some variable with new binary/artifact name/path? Basically after the job is triggered, how can I know what was the artifact which triggered it?
Also is it recursive scan on the passed folder or just at the current folder?

Comment by Sushant Pradhan [ 28/Jun/19 ]

Eyal Ben Moshe does the Artifactory Build Trigger has pipeline support? Can you give me sample or point me to the documentation please

Comment by Eyal Ben Moshe [ 02/Jul/19 ]

The "Enable Artifactory trigger" option is available for pipeline jobs as well.

Generated at Wed Aug 12 00:04:07 UTC 2020 using Jira 8.5.3#805003-sha1:b4933e02eaff29a49114274fe59e1f99d9d963d7.