Skip to content
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

Add mage target BuildPython to build python client. #2622

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion magefiles/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ func LocalDev(arg string) error {
mg.Deps(mg.F(goreleaserMinimalRelease, "bundle"), Kind, downloadDependencyImages)
fmt.Printf("Time to build, setup kind and download images: %s\n", time.Since(timeTaken))
case "full":
mg.Deps(mg.F(BuildDockers, "bundle, lookout-bundle, jobservice"), Kind, downloadDependencyImages)
mg.Deps(BuildPython, mg.F(BuildDockers, "bundle, lookout-bundle, jobservice"), Kind, downloadDependencyImages)
case "no-build", "debug":
mg.Deps(Kind, downloadDependencyImages)
default:
Expand Down
17 changes: 17 additions & 0 deletions magefiles/python.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package main

import (
"github.com/magefile/mage/mg"
)

// Build armada python client.
func BuildPython() error {
mg.Deps(BootstrapProto)

err := dockerRun("buildx", "build", "-o", "type=docker", "-t", "armada-python-client-builder", "-f", "./build/python-client/Dockerfile", ".")
if err != nil {
return err
}

return dockerRun("run", "--rm", "-v", "${PWD}/proto:/proto", "-v", "${PWD}:/go/src/armada", "-w", "/go/src/armada", "armada-python-client-builder", "./scripts/build-python-client.sh")
}