jfrog / jenkins-jfrog-plugin

Easy integration between Jenkins and the JFrog Platform.
https://github.com/jfrog/jenkins-jfrog-plugin
Apache License 2.0
39 stars 17 forks source link

Binary being downloaded for every call of the plugin #77

Closed ca-monteiro closed 11 months ago

ca-monteiro commented 11 months ago

Describe the bug

After placing Artifactory behind a HTTP2 Load balancer, the HTTP headers coming from Artifactory responses started to be re-written to lower case, in conformity with the RFC.

This is causing the Jfrog CLI plugin to never read the x-checksum-sha256 header because is trying to do a case sensitive compare. This causes the plugin to download the jf binary everytime a plugin step is called.

Current behavior

Multiple downloads of the jf binary during the same pipeline running on the same Jenkins agent.

[Pipeline] { (Show JFrog configs) [Pipeline] tool Download 'jf' latest version from: https://*****/artifactory/jfrog-cli/v2-jf/[RELEASE]/jfrog-cli-linux-amd64/jf [Pipeline] envVarsForTool Download 'jf' latest version from: https://*****/artifactory/jfrog-cli/v2-jf/[RELEASE]/jfrog-cli-linux-amd64/jf [Pipeline] withEnv [Pipeline] { (Run Xray Scan on Artifacts) Download 'jf' latest version from: https://*****/artifactory/jfrog-cli/v2-jf/[RELEASE]/jfrog-cli-linux-amd64/jf

Reproduction steps

No response

Expected behavior

Following the HTTP RFC the plugin should match HTTP headers in a case insensitive mode.

JFrog plugin version

1.4.0

JFrog CLI version

2.45.0

Operating system type and version

jenkins/jenkins:2.409-alpine

JFrog Artifactory version

Enterprise Plus 7.35.2

JFrog Xray version

No response

yahavi commented 10 months ago

@ca-monteiro, Jenkins JFrog plugin 1.5.0 has been released. This version includes your fix. Please let us know if that works for you.