How to wait for build before deploying?
# 🌱|help-and-getting-started
a
I have a kubernetes module (
myservice
) which depends on an image that is built from a container module (
myimage
).
myservice
has
myimage
in it's build dependencies When I
garden deploy myservice
, it kicks off the build
myimage
and deploy
myservice
steps at the same time. Often,
myservice
will timeout while waiting for the build to finish. Is it possible to configure garden to not even start to deploy
myservice
until
myimage
is done building?
b
Hey @average-painter-87026! By any chance are you using the built-in dependencies between those two modules? It seems like your myservice module needs to have an explicit dependency to your myimage one!
a
no, I just have this in my myservice module:
Copy code
build:
   dependencies:
     name: myimage
so you think just adding
dependencies: [myimage]
would do it?
i shouldve tried that before bothering you guys haha
I thought that build.dependencies.name = myimage would do that implicitly
b
I think adding that explicit dependency at the module level should help, do you mind giving it a try?✨
a
doesn't seem to work, because myimage doesn't have a service attached to it (it's just for building the image)
Service 'myservice' (in  module 'myservice'): Unknown service or task 'myimage' referenced in dependencies
it's just like this:
Copy code
kind: Module
type: container
name: myimage
dockerfile: Dockerfile
b
You are right, it should be enough with the build dependencies you added at first. Could you extend a little bit on what are you doing in your kubernetes module so I can try to reproduce the issue? Is it a single deployment manifest?
Hey @average-painter-87026 just checking back into this, where you able to solve this issue? Thanks a lot!
a
Sorry for the delay, I started working on something else but am back using garden again. Will try to get you more info
3 Views