简体   繁体   中英

How Do I Bundle Artifacts in JFrog Artifactory Using Filespecs?

Trying to figure out how to get the "XYZ" substituted below when not every file will have that in the name. Simple filespec:

{
    "files": [
        {
            "pattern": "artifacts/",
            "target": "repository/project/X.Y.Z/"
        }
    ]
}

Not all of the files have the full version number in them so I can't use a simple placeholder (per this solution ). I was wondering if there was some other way to dynamically figure out the part to replace the "XYZ" using some maybe-more-complex syntax?

Thinking about the problem a bit more it occurred to me that I could put the artifacts in a specially-named directory that I could then use to publish from.

{
    "files": [
        {
            "pattern": "artifacts-(*)/",
            "target": "repository/project/{1}/"
        }
    ]
}

Tested, and that seemed to do the trick. It just required a little scripting at the end of the build to name that directory with the version number in it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM