jfrog / build-info-go

build-info-go is a Go library and a CLI, which allows generating build-info for a source code project.
https://www.buildinfo.org
Apache License 2.0
61 stars 34 forks source link

Build.sh with artifactory path #251

Open krishnamanchikalapudi opened 2 months ago

krishnamanchikalapudi commented 2 months ago

Hi, Is there a build command available to pass arguments with my environment URI? The utils/dependenciesutils.go is hard coded with https://releases.jfrog.io/artifactory/oss-release-local/ at line 41.

Example command to build 'bi': ./buildscripts/build.sh --site='https://pzasure.jfrog.io' --mvn='krishnam-mvn-virtual' --py="krishnam-pypi-virtual'

Another option is to read the artifactory path from Maven settings.xml using command mvn help:effective-settings

eyalbe4 commented 2 months ago

@krishnamanchikalapudi, I recommend introducing a new environment variable named BI_EXTRACTORS_URL. The code can replace the default URL with the value of this environment variable, if it is set. Feel free to create a pull request with this addition.

krishnamanchikalapudi commented 2 months ago

@eyalbe4 Thats great idea too. 'bi' supports multiple programming languages, and every project path might be different. Therefore,it should not have one generic path/uri.

In the enterprise world, generally the tools team build scripts and distributes them to the developer community. Based on the project path in artifactory, the developer could provide the argument 'krishnam-mvn-virtual'. Example: bi mvn --path='krishnam-mvn-virtual'

eyalbe4 commented 2 months ago

@krishnamanchikalapudi, Are you looking to configure the base Artifactory URL or the repository path? Also, are you good with using an environment variable?

krishnamanchikalapudi commented 2 months ago

@eyalbe4 I am open to your suggestion and would like an example to reuse with multiple App development teams.

The base Artifactory url should have the executable 'bi' and repo path as an environment or argument per project. This helps to share executable 'bi' throughout the app development teams

Reuse executable 'bi' with multiple projects as

eyalbe4 commented 2 months ago

@krishnamanchikalapudi, I think I'm missing your end goal here. What is code expected to do with the value provided for the above --path flag?

krishnamanchikalapudi commented 2 months ago

@eyalbe4 As I previously stated, the tools team creates executable 'bi' package with organizational artifactory url for the app development teams, and app dev teams use 'bi' with their project paths.

Java maven project dev team uses the same 'bi' package with their maven virtual repo and similarly, Python project team uses the tools team created 'bi' package to create build info.

In enterprise organization, multiple teams repeat the same work again and again to create executable 'bi' package.

I am delighted to provide comprehensive persona perspectives within the enterprise realm.