Publish artifacts (zip files) From Teamcity to Artifactory and also include versioning

Viewed 552

I am working on Teamcity <> artifactory integration and have the plug in. The goal is to zip bin files and upload them to artifactory and also include versioning to the zip files

Here's what I have tried.. In my configuration, I have mentioned the zip files, however the build runs successfully but the zip files are not present in artifactory - however if I try other files types like .exe - that appears in artifactory.

So have two questions related to this, thanks in advance

1] how do I push the zip files from Teamcity to artifactory 2] How do I add versioning to the zip files. 3] Are there logs that I can see to troubleshoot why the zip files are not uploaded to artifactory - in the Teamcity build log it shows as successful.

Teamcity artifacts showing zip files

Artifactory upload configuration

Artifactory spec:

{
  "files": [
    {
      "pattern": "test/*.zip",
      "target": "basis-apps/"
   
    }
  ]
}
1 Answers

Below are the answers to the questions:

  1. how do I push the zip files from Teamcity to artifactory? ANS: You should be able to upload the zip artifacts via the upload Filespecs.Below link for reference.First you can try testing by upload zip with direct zip file name ("pattern": "test/hello.zip") then upon success, regular expression can be used ("pattern": "test/*.zip"). https://www.jfrog.com/confluence/display/JFROG/Using+File+Specs#UsingFileSpecs-UploadSpecSchema

EX:

{
    "files": [
        {
            "pattern": "my-local-repo/(*)-(*).zip",
            "target": "froggy/{1}--{2}.zip",
            "recursive": "false"
        }
    ]
}

  1. How do I add versioning to the zip files. ANS: we can achieve it with repository custom layouts. below links for reference. https://www.jfrog.com/confluence/display/JFROG/Repository+Layouts https://jfrog.com/knowledge-base/how-to-create-simple-versioning-custom-layout-in-artifactory/

  2. Are there logs that I can see to troubleshoot why the zip files are not uploaded to artifactory. ANS: Check for the Artifactory service and request logs from which we can identify how the request is reaching Artifactory from Teamcity.

Related