Skip to content

Commit

Permalink
🐛 adding entrypoint to copy source from mount to container
Browse files Browse the repository at this point in the history
Signed-off-by: Shawn Hurley <[email protected]>
  • Loading branch information
shawn-hurley committed Nov 29, 2023
1 parent 888433a commit 0773651
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,6 @@ COPY --from=rulesets /rulesets/default/generated /opt/rulesets
COPY --from=rulesets /windup-rulesets/rules/rules-reviewed/openrewrite /opt/openrewrite
COPY --from=static-report /usr/bin/js-bundle-generator /usr/local/bin
COPY --from=static-report /usr/local/static-report /usr/local/static-report
COPY entrypoint.sh /usr/bin/entrypoint.sh

ENTRYPOINT ["kantra"]
2 changes: 1 addition & 1 deletion cmd/analyze.go
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ func (a *analyzeCommand) RunAnalysis(ctx context.Context, xmlOutputDir string) e
WithStdout(analysisLog),
WithStderr(analysisLog),
WithEntrypointArgs(args...),
WithEntrypointBin("/usr/bin/konveyor-analyzer"),
WithEntrypointBin("/usr/bin/entrypoint.sh"),
WithCleanup(a.cleanup),
)
if err != nil {
Expand Down
7 changes: 7 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash
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 `"$@"`
sed -i 's|/tmp/source-code|/opt/input/source|g' /opt/input/config/settings.json

0 comments on commit 0773651

Please sign in to comment.