jfrog/build-info-go

Allow download of dependencies from internal sources

Opened this issue · 5 comments

dg424 commented

Is your feature request related to a problem? Please describe.

We currently work in a sealed off environment with our local Artifactory that mirrors external sources for us. There is no direct connection to the outside otherwise. We're trying to build a docker container containing the bi client, but it currently hardcodes the dependency repo - https://github.com/jfrog/build-info-go/blob/main/utils/dependenciesutils.go#L37

Describe the solution you'd like to see

It would be nice to have the dependency repo as a parameter we can set.

Describe alternatives you've considered

There are no workarounds because the value is hardcoded in the source file.

@dg424,
We recommend using JFrog CLI's jf docker pull command to pull docker images from Artifactory.

ddag commented

It is not a docker image. bi-cli mvn option tries to download a file directly from the internet - the line I mentioned. The ask is how to get bi-cli to use our local Artifactory instead ? Note that this is a jar file download as we're currently testing the maven/mvn option.

@ddag,
JFrog CLI uses build-info-go as a depdemcy and allows running the `jf mvn' command to resolve maven depdemcies from Artifactory as well as generating build-info.

dg424 commented

Ok, I had to do jf mvn-config first which created .jfrog/projects/maven.yml. After this, the build worked and the jar was deployed to our artifactory server, but build info was not published and I got this:

[main] INFO org.jfrog.build.extractor.maven.BuildDeploymentHelper - Artifactory Build Info Recorder: publish build info set to false, build info will not be published...

@dg424,
Here's how you can generate build-info and publish it to Artifactory for your maven build with jfrog-cli:

jf mvn install --build-name b1 --build-number 1
jf rt bp b1 1

You can read more about this in the JFrog CLI documentation. Let us know if you have follow-up questions.