Skip to content

Commit

Permalink
🐛 Fixing location of provided programs in the base image (#556)
Browse files Browse the repository at this point in the history
fixes #474

Addon PR: 80

Signed-off-by: Shawn Hurley <[email protected]>
  • Loading branch information
shawn-hurley authored Mar 27, 2024
1 parent 423277f commit 34192a2
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 14 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/demo-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@ 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 'Addon PR: \K\d+' || true)
if [ -z "$PULL_REQUEST_NUMBER" ]; then
echo "ADDON_REF=main" >>$GITHUB_ENV
else
echo "ADDON_REF=refs/pull/$PULL_REQUEST_NUMBER/merge" >>$GITHUB_ENV
fi
- uses: actions/checkout@v3

- name: build image
Expand All @@ -19,7 +29,7 @@ jobs:

- name: run demo image and ensure violations output unchanged
run: |
podman run --entrypoint /usr/bin/konveyor-analyzer -v $(pwd)/demo-dep-output.yaml:/analyzer-lsp/demo-dep-output.yaml:Z -v $(pwd)/demo-output.yaml:/analyzer-lsp/output.yaml:Z localhost/testing:latest --dep-output-file=demo-dep-output.yaml
podman run --entrypoint /usr/local/bin/konveyor-analyzer -v $(pwd)/demo-dep-output.yaml:/analyzer-lsp/demo-dep-output.yaml:Z -v $(pwd)/demo-output.yaml:/analyzer-lsp/output.yaml:Z localhost/testing:latest --dep-output-file=demo-dep-output.yaml
diff \
<(yq -P 'sort_keys(..)' -o=props <(git show HEAD:demo-output.yaml)) \
<(yq -P 'sort_keys(..)' -o=props <(cat demo-output.yaml))
Expand All @@ -38,7 +48,7 @@ jobs:
with:
fetch-depth: 0
repository: konveyor/tackle2-addon-analyzer
ref: main
ref: "${{ env.ADDON_REF}}"
path: tackle2-addon-analyzer

- name: Build addon and save image
Expand Down
12 changes: 6 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ RUN microdnf install nodejs -y
RUN npm install -g typescript-language-server typescript

COPY --from=jaeger-builder /go/bin/all-in-one-linux /usr/local/bin/all-in-one-linux
COPY --from=yq-builder /usr/bin/yq /usr/bin/yq
COPY --from=builder /analyzer-lsp/konveyor-analyzer /usr/bin/konveyor-analyzer
COPY --from=builder /analyzer-lsp/konveyor-analyzer-dep /usr/bin/konveyor-analyzer-dep
COPY --from=builder /analyzer-lsp/external-providers/generic-external-provider/generic-external-provider /usr/bin/generic-external-provider
COPY --from=builder /analyzer-lsp/external-providers/yq-external-provider/yq-external-provider /usr/bin/yq-external-provider
COPY --from=builder /analyzer-lsp/external-providers/golang-dependency-provider/golang-dependency-provider /usr/bin/golang-dependency-provider
COPY --from=yq-builder /usr/bin/yq /usr/local/bin/yq
COPY --from=builder /analyzer-lsp/konveyor-analyzer /usr/local/bin/konveyor-analyzer
COPY --from=builder /analyzer-lsp/konveyor-analyzer-dep /usr/local/bin/konveyor-analyzer-dep
COPY --from=builder /analyzer-lsp/external-providers/generic-external-provider/generic-external-provider /usr/local/bin/generic-external-provider
COPY --from=builder /analyzer-lsp/external-providers/yq-external-provider/yq-external-provider /usr/local/bin/yq-external-provider
COPY --from=builder /analyzer-lsp/external-providers/golang-dependency-provider/golang-dependency-provider /usr/local/bin/golang-dependency-provider

COPY provider_container_settings.json /analyzer-lsp/provider_settings.json

Expand Down
12 changes: 6 additions & 6 deletions provider_container_settings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[
{
"name": "go",
"binaryPath": "/usr/bin/generic-external-provider",
"binaryPath": "/usr/local/bin/generic-external-provider",
"initConfig": [{
"analysisMode": "full",
"providerSpecificConfig": {
Expand All @@ -13,25 +13,25 @@
"workspaceFolders": ["file:///analyzer-lsp/examples/golang"],
"dependencyFolders": [],

"dependencyProviderPath": "/usr/bin/golang-dependency-provider"
"dependencyProviderPath": "/usr/local/bin/golang-dependency-provider"
}
}]
},
{
"name": "yaml",
"binaryPath": "/usr/bin/yq-external-provider",
"binaryPath": "/usr/local/bin/yq-external-provider",
"initConfig": [{
"location": "examples/yaml",
"analysisMode": "full",
"providerSpecificConfig": {
"name": "yq",
"lspServerPath": "/usr/bin/yq"
"lspServerPath": "/usr/local/bin/yq"
}
}]
},
{
"name": "python",
"binaryPath": "/usr/bin/generic-external-provider",
"binaryPath": "/usr/local/bin/generic-external-provider",
"initConfig": [{
"analysisMode": "full",
"providerSpecificConfig": {
Expand All @@ -49,7 +49,7 @@
},
{
"name": "nodejs",
"binaryPath": "/usr/bin/generic-external-provider",
"binaryPath": "/usr/local/bin/generic-external-provider",
"initConfig": [{
"analysisMode": "full",
"providerSpecificConfig": {
Expand Down

0 comments on commit 34192a2

Please sign in to comment.