Skip to content

Commit

Permalink
containerless support for java
Browse files Browse the repository at this point in the history
Signed-off-by: Emily McMullan <emcmulla@redhat.com>
  • Loading branch information
eemcmullan committed Sep 24, 2024
1 parent dcbb845 commit 20efed1
Show file tree
Hide file tree
Showing 15 changed files with 4,139 additions and 10 deletions.
831 changes: 831 additions & 0 deletions cmd/analyze-bin.go

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ func init() {
rootCmd.AddCommand(NewAnalyzeCmd(logger))
rootCmd.AddCommand(NewTestCommand(logger))
rootCmd.AddCommand(NewVersionCommand())
rootCmd.AddCommand(NewAnalyzeBinCmd(logger))
}

// Execute adds all child commands to the root command and sets flags appropriately.
Expand Down
2 changes: 2 additions & 0 deletions cmd/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ var (
RunnerImage = "quay.io/konveyor/kantra"
RootCommandName = "kantra"
JavaBundlesLocation = "/jdtls/java-analyzer-bundle/java-analyzer-bundle.core/target/java-analyzer-bundle.core-1.0.0-SNAPSHOT.jar"
JDTLSBinLocation = "/jdtls/bin/jdtls"
RulesetsLocation = "rulesets/default/generated/00-discovery"
JavaProviderImage = "quay.io/konveyor/java-external-provider"
GenericProviderImage = "quay.io/konveyor/generic-external-provider"
DotnetProviderImage = "quay.io/konveyor/dotnet-external-provider"
Expand Down
29 changes: 29 additions & 0 deletions docs/containerless.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
## Test and Run Containerless Kantra

### Clone the required packages:

```sh
git clone https://github.com/eemcmullan/containerless-kantra-deps.git
```

## Move them to where kantra will look for packged binaries:

```sh
mv $HOME/containerless-kantra-deps $HOME/.kantra
```

## Build the static report output parser:

```sh
cd $HOME/.kantra/static-report/analyzer-output-parser
```

```sh
go build -o analyzer-output-parser main.go
```

### From kantra, run:

```sh
go run main.go analyze-bin --input <java-app> --output <output-dir> --rules <java-rules>
```
23 changes: 19 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,37 @@ require (
github.com/devfile/alizer v1.6.1
github.com/getkin/kin-openapi v0.108.0
github.com/go-logr/logr v1.4.2
github.com/nxadm/tail v1.4.8
github.com/phayes/freeport v0.0.0-20220201140144-74d24b5ae9f5
github.com/spf13/cobra v1.8.1
github.com/swaggest/openapi-go v0.2.45
github.com/vifraa/gopom v1.0.0
go.lsp.dev/uri v0.3.0
go.opentelemetry.io/otel v1.22.0
go.opentelemetry.io/otel/trace v1.22.0
gopkg.in/yaml.v2 v2.4.0
gopkg.in/yaml.v3 v3.0.1
)

require (
cloud.google.com/go/compute v1.24.0 // indirect
cloud.google.com/go/compute/metadata v0.2.3 // indirect
github.com/antchfx/xpath v1.3.1 // indirect
github.com/bufbuild/protocompile v0.10.0 // indirect
github.com/cbroglie/mustache v1.3.0 // indirect
github.com/containerd/typeurl/v2 v2.1.1 // indirect
github.com/fsnotify/fsnotify v1.4.9 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-logr/zapr v1.3.0 // indirect
github.com/go-openapi/jsonpointer v0.19.6 // indirect
github.com/go-openapi/swag v0.22.3 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang-jwt/jwt/v5 v5.2.1 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/hashicorp/go-version v1.7.0 // indirect
github.com/invopop/yaml v0.1.0 // indirect
github.com/jhump/protoreflect v1.16.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/kr/pretty v0.3.0 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
Expand All @@ -32,26 +45,28 @@ require (
github.com/pkg/errors v0.9.1 // indirect
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 // indirect
github.com/swaggest/jsonschema-go v0.3.64 // indirect
github.com/swaggest/openapi-go v0.2.45 // indirect
github.com/swaggest/refl v1.3.0 // indirect
go.opentelemetry.io/otel v1.21.0 // indirect
go.opentelemetry.io/otel/exporters/jaeger v1.17.0 // indirect
go.opentelemetry.io/otel/metric v1.21.0 // indirect
go.opentelemetry.io/otel/metric v1.22.0 // indirect
go.opentelemetry.io/otel/sdk v1.21.0 // indirect
go.opentelemetry.io/otel/trace v1.21.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.27.0 // indirect
golang.org/x/mod v0.20.0 // indirect
golang.org/x/net v0.24.0 // indirect
golang.org/x/oauth2 v0.17.0 // indirect
golang.org/x/sys v0.22.0 // indirect
golang.org/x/text v0.14.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect
google.golang.org/grpc v1.63.2 // indirect
google.golang.org/protobuf v1.33.1-0.20240408130810-98873a205002 // indirect
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
)

require (
github.com/PaesslerAG/gval v1.2.2 // indirect
github.com/antchfx/jsonquery v1.3.5 // indirect
github.com/antchfx/xmlquery v1.4.1 // indirect
github.com/bombsimon/logrusr/v3 v3.1.0
github.com/codingconcepts/env v0.0.0-20200821220118-a8fbf8d84482
github.com/inconshreveable/mousetrap v1.1.0 // indirect
Expand Down
Loading

0 comments on commit 20efed1

Please sign in to comment.