From c2b083d62b901773dd8eab5ccbaae14445875a8c Mon Sep 17 00:00:00 2001 From: Clif Houck Date: Thu, 29 Jun 2023 09:57:35 -0500 Subject: [PATCH 1/2] Add mage buildPython target --- magefiles/python.go | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 magefiles/python.go diff --git a/magefiles/python.go b/magefiles/python.go new file mode 100644 index 00000000000..42685baaa85 --- /dev/null +++ b/magefiles/python.go @@ -0,0 +1,17 @@ +package main + +import ( + "github.com/magefile/mage/mg" +) + +// Build armada related python dependencies. +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") +} From 76a046ce17694b0f44dda37c8b9f145f6d69df35 Mon Sep 17 00:00:00 2001 From: Clif Houck Date: Thu, 29 Jun 2023 14:18:23 -0500 Subject: [PATCH 2/2] Build puthon with localdev full --- magefiles/main.go | 2 +- magefiles/python.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 index 42685baaa85..f804e0481c2 100644 --- a/magefiles/python.go +++ b/magefiles/python.go @@ -4,7 +4,7 @@ import ( "github.com/magefile/mage/mg" ) -// Build armada related python dependencies. +// Build armada python client. func BuildPython() error { mg.Deps(BootstrapProto)