Skip to content
This repository has been archived by the owner on Oct 25, 2023. It is now read-only.

Update Java buildpack detect and build #62

Merged
merged 1 commit into from
Jun 22, 2022
Merged

Conversation

andrew-su
Copy link
Contributor

@andrew-su andrew-su commented May 5, 2022

Which issue(s) this PR fixes

Fixes: #61

What this PR solves

This adds two configuration options for the buildpack.
BP_FUNCTION to specify the composition of functions.
BP_DEFAULT_FUNCTION lets you specify the function reachable by /.

Testing done

Tested it on our sample. (with func.yaml | it detects and builds the image)
Tested it on our sample. (without func.yaml | it fails detect, this was expected)
Tested it on our sample. (without func.yaml but specified env variables | it detects and builds the image)

@bbtong bbtong requested a review from joeeltgroth May 23, 2022 17:05
@andrew-su andrew-su force-pushed the suan/update-java-buildpack branch from 3169439 to 8b7067d Compare May 31, 2022 15:34
@joeeltgroth
Copy link
Contributor

Noticed that during the pack build of a function created via kn func python detection is logging:
[detector] Python Function Buildpack 0.0.11
[detector] BP_FUNCTION detected but is invalid, it should be in the form of module.function_name
[detector] err: kn-fn/[email protected] (1)

But, since this is Java, Python should be ignoring. See: PR #64

@andrew-su andrew-su force-pushed the suan/update-java-buildpack branch 2 times, most recently from b69c3fd to 39bad39 Compare June 21, 2022 06:51
@andrew-su
Copy link
Contributor Author

Some template tests are failing. Need to look into that.

The detect now checks for func.yaml OR they explicitly
defined an environment variable for the function class or
the default function name.

Signed-off-by: Andrew Su <[email protected]>
@andrew-su andrew-su force-pushed the suan/update-java-buildpack branch from 39bad39 to e88fe8a Compare June 21, 2022 17:08
@andrew-su andrew-su merged commit cd950af into main Jun 22, 2022
@andrew-su andrew-su deleted the suan/update-java-buildpack branch August 29, 2022 21:11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add configuration for Java buildpack to define package to scan and which function to load
2 participants