diff --git a/magefiles/main.go b/magefiles/main.go index 5a074eebd49..38d755c0612 100644 --- a/magefiles/main.go +++ b/magefiles/main.go @@ -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: diff --git a/magefiles/python.go b/magefiles/python.go new file mode 100644 index 00000000000..f804e0481c2 --- /dev/null +++ b/magefiles/python.go @@ -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") +}