Skip to content

Commit

Permalink
👻 Make bundles location a config setting (konveyor#144)
Browse files Browse the repository at this point in the history
Signed-off-by: Pranav Gaikwad <[email protected]>
  • Loading branch information
pranavgaikwad committed Jan 15, 2024
1 parent 6f6c45d commit b979a67
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/analyze.go
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ func (a *analyzeCommand) getConfigVolumes() (map[string]string, error) {
Location: SourceMountPath,
AnalysisMode: provider.AnalysisMode(a.mode),
ProviderSpecificConfig: map[string]interface{}{
"bundles": "/jdtls/java-analyzer-bundle/java-analyzer-bundle.core/target/java-analyzer-bundle.core-1.0.0-SNAPSHOT.jar",
"bundles": JavaBundlesLocation,
"depOpenSourceLabelsFile": "/usr/local/etc/maven.default.index",
provider.LspServerPathConfigKey: "/jdtls/bin/jdtls",
},
Expand Down
1 change: 1 addition & 0 deletions cmd/settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const (
OutputPath = "/opt/output"
XMLRulePath = "/opt/xmlrules"
ShimOutputPath = "/opt/shimoutput"
JavaBundlesLocation = "/jdtls/java-analyzer-bundle/java-analyzer-bundle.core/target/java-analyzer-bundle.core-1.0.0-SNAPSHOT.jar"
)

type Config struct {
Expand Down
2 changes: 2 additions & 0 deletions hack/update-settings.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@

image="${IMAGE:-quay.io/konveyor/kantra}"
name="${NAME:-kantra}"
bundle="${BUNDLE:-/jdtls/java-analyzer-bundle/java-analyzer-bundle.core/target/java-analyzer-bundle.core-1.0.0-SNAPSHOT.jar}"

sed -i \
-e "s,\(RootCommandName *string.*default:\"\)[^\"]*\",\1$name\"," \
-e "s,\(RunnerImage *string.*default:\"\)[^\"]*\",\1$image\"," \
-e "s,\(JavaBundlesLocation *= *\"\)[^\"]*\",\1$bundle\"," \
./cmd/settings.go

0 comments on commit b979a67

Please sign in to comment.