-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Fix GCB build failure for multi-module Jib projects #3852
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
Fix GCB build failure for multi-module Jib projects #3852
Conversation
Codecov Report
|
@@ -57,3 +59,25 @@ func (b *Builder) jibBuildSpec(artifact *latest.Artifact, tag string) (cloudbuil | |||
func fixHome(command string, args []string) []string { | |||
return []string{"-c", command + " -Duser.home=$$HOME " + strings.Join(args, " ")} | |||
} | |||
|
|||
func jibAddWorkspaceToDependencies(workspace string, dependencies []string) ([]string, error) { | |||
dependencyMap := make(map[string]bool) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should expose util's orderedFileSet
. @nkubala ?
Any idea what's going on with the linter? |
It was having a bad day — worked after a restart. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Putting this up for now, despite it being a bit hacky. There's an issue with using multi-module Jib projects with GCB; since each module is uploaded separately, the build fails due to missing dependencies. The workaround in this PR involves just uploading the entire workspace (with
target/
andbuild/
filtered out). Since the build is also done in parallel, this also means the workspace is uploaded once for each module.Fixes #3477.