[HAP-823] Add upload and download specs support to Jenkins generic jobs Created: 05/Oct/16  Updated: 13/Nov/16  Resolved: 10/Oct/16

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

Type: New Feature Priority: High
Reporter: Dima Nevelev (Inactive) Assignee: Dima Nevelev (Inactive)
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
is related to BI-377 Wildcard in the upload path finds onl... Resolved
HAP-825 Add help file to the specs section Sub-task Resolved Dima Nevelev  
HAP-826 Replace Environment Variables in Patt... Sub-task Resolved Dima Nevelev  
HAP-830 Deploy path capture groups and placeh... Sub-task Resolved Dima Nevelev  
HAP-837 Support reading download and upload s... Sub-task Resolved Dima Nevelev  

Comment by Michael Eichhorn [ 18/Oct/16 ]

I have two questions regarding this:
1. Is this spec support behaving the same way as the specs in pipeline jobs?
2. Will there be a compatibility mode between specs and the pattern mode? Currently it seems the specs in pipeline and pattern in generic upload can not produce the same folder structure in artifactory (in special cases). I can provide more details if this is not know.

Comment by Dima Nevelev (Inactive) [ 18/Oct/16 ]

Thank you for your questions.
1. Yes, the behaviour of the specs will be the same as in the pipeline jobs.
2. In the next few releases we will support both specs and patterns but the aim is to deprecate the pattern in the future.
We would appreciate if you could provide more details about the special cases that can't be produced by specs?

Comment by Michael Eichhorn [ 18/Oct/16 ]

I have the following observation so far:
With a pattern like


the upload results in the creation of a folder pdb and below the creation of a folder structure as can be found in the source folderA


With a spec like

  "files": [
		"pattern": "folderA/**/*.pdb", //*NOTE*: it seems absolute paths do not work,  hence without WORKSPACE
		"target": "repokey/targetA/${JOB_NAME}/${BUILD_NUMBER}/pdb",
		"flat": "true",
		"regexp": "false"

I get one file "pdb" in


And with "flat": "false" I get all files uploaded in the source folder structure but without th pdb folder and _folderA _included

Comment by Dima Nevelev (Inactive) [ 19/Oct/16 ]

Thank you for your contribution.
The example you provided can be implemented using placeholders.
Please see the spec below:

        "files": [

Please fill free to send us more special cases that specs might not support.

Comment by Michael Eichhorn [ 19/Oct/16 ]

Thank you Dima. That helped. However the

{1} in target is not working for me. It does not get replaced but stays as {1}

in the target. Thanks!

Comment by Michael Eichhorn [ 20/Oct/16 ]

I could not find a solution for getting


replaced in the deployment which is blocking me. Could you confirm that this should work or can you reproduce the issue? thanks!

Comment by Dima Nevelev (Inactive) [ 20/Oct/16 ]

This should work, I could not reproduce the issue.
Please provide your spec and we'll try to figure out the problem.

Comment by Michael Eichhorn [ 20/Oct/16 ]
"files": [
		"pattern": "sandbox/folder/(.*)/.*.pdb",
		"target": "repoplay/subfolder/dummy_pipeline_scn/142/pdb/{1}/",
		"flat": "true",
		"regexp": "true"

results in


This is run from a pipeline job at the moment

Comment by Dima Nevelev (Inactive) [ 20/Oct/16 ]

This should work, just tried it on both latest release and snapshot.
Are you using a snapshot you built? If so, try to install our latest snapshot and see if it solves it.

Comment by Michael Eichhorn [ 21/Oct/16 ]

I tried your snapshot and it is still not working for me. Am I right that you are testing on Linux? I am on windows

Comment by Michael Eichhorn [ 23/Oct/16 ]

Please see https://github.com/JFrogDev/build-info/pull/100 which solves the issue for me! Thanks!

Generated at Sun May 26 19:06:51 UTC 2019 using JIRA 7.6.3#76005-sha1:8a4e38d34af948780dbf52044e7aafb13a7cae58.