Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 fixing the location of the created programs to correct dir #185

Merged
merged 1 commit into from
Mar 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .github/workflows/testing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,30 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Extract pull request number from inputs or PR description
run: |
echo "${{ github.event.pull_request.body }}"
PULL_REQUEST_NUMBER=$(echo "${{ github.event.pull_request.body }}" | grep -oP 'Analyzer PR: \K\d+' || true)
if [ -z "$PULL_REQUEST_NUMBER" ]; then
echo "ANALYZER_REF=main" >>$GITHUB_ENV
else
echo "ANALYZER_REF=refs/pull/$PULL_REQUEST_NUMBER/merge" >>$GITHUB_ENV
fi

- uses: actions/checkout@v3
with:
fetch-depth: 0
repository: konveyor/analyzer-lsp
ref: "${{ env.ANALYZER_REF}}"
path: analyzer-lsp

- name: Build anaylzer and save image
working-directory: analyzer-lsp
run: |
podman build -t quay.io/konveyor/analyzer-lsp:latest .

- uses: actions/checkout@v3

- name: Build image and binary
run: |
podman build -t localhost/kantra:latest -f Dockerfile .
Expand Down
4 changes: 2 additions & 2 deletions cmd/analyze.go
Original file line number Diff line number Diff line change
Expand Up @@ -447,14 +447,14 @@ func (a *analyzeCommand) getConfigVolumes() (map[string]string, error) {

goConfig := provider.Config{
Name: "go",
BinaryPath: "/usr/bin/generic-external-provider",
BinaryPath: "/usr/local/bin/generic-external-provider",
InitConfig: []provider.InitConfig{
{
Location: otherProvsMountPath,
AnalysisMode: provider.FullAnalysisMode,
ProviderSpecificConfig: map[string]interface{}{
"name": "go",
"dependencyProviderPath": "/usr/bin/golang-dependency-provider",
"dependencyProviderPath": "/usr/local/bin/golang-dependency-provider",
provider.LspServerPathConfigKey: "/root/go/bin/gopls",
},
},
Expand Down
2 changes: 1 addition & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ set -x

cp -r /opt/input/source /tmp/source-code
sed -i 's|/opt/input/source|/tmp/source-code|g' /opt/input/config/settings.json
/usr/bin/konveyor-analyzer "$@"
/usr/local/bin/konveyor-analyzer "$@"
sed -i 's|/tmp/source-code|/opt/input/source|g' /opt/input/config/settings.json
10 changes: 5 additions & 5 deletions pkg/testing/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,22 +60,22 @@ var defaultProviderConfig = []provider.Config{
},
{
Name: "go",
BinaryPath: "/usr/bin/generic-external-provider",
BinaryPath: "/usr/local/bin/generic-external-provider",
InitConfig: []provider.InitConfig{
{
AnalysisMode: provider.FullAnalysisMode,
ProviderSpecificConfig: map[string]interface{}{
"lspServerName": "generic",
provider.LspServerPathConfigKey: "/root/go/bin/gopls",
"lspServerArgs": []string{},
"dependencyProviderPath": "/usr/bin/golang-dependency-provider",
"dependencyProviderPath": "/usr/local/bin/golang-dependency-provider",
},
},
},
},
{
Name: "python",
BinaryPath: "/usr/bin/generic-external-provider",
BinaryPath: "/usr/local/bin/generic-external-provider",
InitConfig: []provider.InitConfig{
{
AnalysisMode: provider.FullAnalysisMode,
Expand All @@ -91,7 +91,7 @@ var defaultProviderConfig = []provider.Config{
},
{
Name: "nodejs",
BinaryPath: "/usr/bin/generic-external-provider",
BinaryPath: "/usr/local/bin/generic-external-provider",
InitConfig: []provider.InitConfig{
{
AnalysisMode: provider.FullAnalysisMode,
Expand All @@ -107,7 +107,7 @@ var defaultProviderConfig = []provider.Config{
},
{
Name: "yaml",
BinaryPath: "/usr/bin/yq-external-provider",
BinaryPath: "/usr/local/bin/yq-external-provider",
InitConfig: []provider.InitConfig{
{
AnalysisMode: provider.FullAnalysisMode,
Expand Down
Loading