jfrog / teamcity-artifactory-plugin

TeamCity plugin that enables traceable build artifacts with Artifactory
https://www.jfrog.com/confluence/display/JFROG/TeamCity+Artifactory+Plug-in
Apache License 2.0
42 stars 47 forks source link

[2.9.5] Deployment fails with `NullPointerException` in DeploymentUrlUtils.java:77 #127

Closed werner-kapferer-lgs closed 1 year ago

werner-kapferer-lgs commented 1 year ago

This problem appears to be introduced in version 2.9.5 (org.jfrog.buildinfo.build-info-extractor 2.37.3). It is not affecting 2.9.4 (org.jfrog.buildinfo.build-info-extractor 2.26.1).

When trying to publish an artifact to Artifactory using the plugin, following exception is thrown:

  java.lang.NullPointerException
    at org.jfrog.build.extractor.clientConfiguration.util.DeploymentUrlUtils.buildMatrixParamsString(DeploymentUrlUtils.java:77)
    at org.jfrog.build.extractor.clientConfiguration.client.artifactory.services.Upload.createHttpPutMethod(Upload.java:92)
    at org.jfrog.build.extractor.clientConfiguration.client.artifactory.services.Upload.createRequest(Upload.java:44)
    at org.jfrog.build.extractor.clientConfiguration.client.JFrogService.execute(JFrogService.java:112)
    at org.jfrog.build.extractor.clientConfiguration.client.artifactory.services.Upload.execute(Upload.java:77)
    at org.jfrog.build.extractor.clientConfiguration.client.artifactory.ArtifactoryManager.upload(ArtifactoryManager.java:262)
    at org.jfrog.build.extractor.clientConfiguration.client.artifactory.ArtifactoryManager.upload(ArtifactoryManager.java:257)
    at org.jfrog.build.extractor.clientConfiguration.util.spec.SpecDeploymentConsumer.consumerRun(SpecDeploymentConsumer.java:39)
    at org.jfrog.build.extractor.producerConsumer.ConsumerRunnableBase.run(ConsumerRunnableBase.java:11)
    at java.base/java.lang.Thread.run(Thread.java:829)

This was re-produced on two different TeamCity servers (one of them being a clean, latest jetbrains/teamcity-server Docker instance).

An example spec that was used:

{
    "files": [
        {
            "pattern": "%teamcity.build.checkoutDir%/TestFile.dat",
            "target": "<REPO_NAME>"
        }
    ]
}
yahavi commented 1 year ago

Thanks for reporting this issue, @werner-kapferer-lgs! TeamCity Artifactory plugin 2.10.0 is released. This version includes the fix for this issue. Feel free to upgrade - we appreciate your feedback on that!