Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Pipeline examples that use files pattern for upload & download & with & without regexp #74

Open
thadguidry opened this issue May 18, 2017 · 0 comments

Comments

@thadguidry
Copy link

thadguidry commented May 18, 2017

Currently however, the wildcard pattern with "regexp": "false" seems to have problems picking up files.
(this might be a bug or it might be a lack of my understanding)

C:/Jenkins/workspace/build/lib/my-plugin-1.0.0.-SNAPSHOT-11.jar

If its a lack of my understanding, then this would be partly due to the fact that its not well documented enough. I'd like to see fuller working examples on JFrog's File Specs page of using a pattern with and without regexp that also uses a subdirectory folder path, as shown in my example:

stage 'Artifactory Upload'
 node{
 def uploadSpec = """{
  "files": [
    {
      "pattern": "/build/lib/my-plugin*.jar",
      "target": "my-libs/",
      "regexp": "false",
      "recursive": "false"
    }
 ]
}"""
server.upload(uploadSpec)
}

UPDATE: I have resolved my problem, but a good example would benefit others. My issue was that I did not use wildcard * for the repository name portion of the pattern syntax,

[Mandatory if 'aql' is not specified]
Specifies the source path in Artifactory, from which the artifacts should be downloaded, in the following format: [repository name]/[repository path]. You can use wildcards to specify multiple artifacts.

So my pattern was missing the wildcard * at the beginning since I am using Jenkins pipeline and a workspace:

"pattern":"*/build/lib/my-plugin*.jar"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant