-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Max Brauer <[email protected]>
- Loading branch information
1 parent
4bb042f
commit 2feefeb
Showing
1 changed file
with
15 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -423,6 +423,21 @@ cat /tmp/sbom-output/build/paketo-buildpacks_go-mod-vendor/sbom.cdx.json | |
{{< /code/copyable >}} | ||
<!-- spellchecker-enable --> | ||
|
||
## Use workspace modules | ||
Some projects depend on multi-module workspaces and use relative `replace` directives within the same repository. | ||
An example for this is [[email protected]](https://github.com/cert-manager/cert-manager/tree/v1.13.3). | ||
In such case you may want to initialise and use workspace modules prior to building. | ||
|
||
With `BP_GO_WORK_USE` the Go buildpack can be configured to `go work use (...)` certain modules before building. | ||
|
||
{{< code/copyable >}} | ||
pack build my-app --buildpack paketo-buildpacks/go \ | ||
--env BP_GO_WORK_USE=./cmd/my-module \ | ||
--env BP_GO_TARGETS=./cmd/my-module | ||
{{< /code/copyable >}} | ||
|
||
It will run `go work init` before running `go work use (...)`. | ||
|
||
<!-- References --> | ||
[cnb/launch-process]:https://buildpacks.io/docs/app-developer-guide/run-an-app/ | ||
|
||
|