I am using Garden 0.13.15. I have a container bui...
# 🤖|ask-kapa
c
@microscopic-river-74022 I am using Garden 0.13.15. I have a container build named dev. I want to reference the output of the published dev image tag. I cannot find a container build output to reference which contains the action version or the image tag (which should be the same unless I'm mistaken). Is there a more straightforward way to reference an image tag as an output from a container build to use as an imageTag in a kubernetes deployment spec than this syntax:
${replace("${actions.build.dev.outputs.deploymentImageId}", "${actions.build.dev.outputs.deploymentImageName}:", "")}
m
Please stand by @clean-kite-99549 as I search the knowledge base. I normally take about 20 seconds or so. :wave:
---------------------- Yes, there is a more straightforward way to reference the image tag from a container build in a Kubernetes deployment spec. You can directly reference the version of the build action, which corresponds to the image tag, using the
version
key. Here is the simplified syntax:
Copy code
yaml
image: ${actions.build.dev.version}
This will give you the image tag of the
dev
build action. You can use this in your Kubernetes deployment spec to specify the image tag. Here is an example of how you can use it in a Kubernetes deployment:
Copy code
yaml
kind: Deploy
type: helm
name: my-app
spec:
  values:
    image:
      name: ${actions.build.dev.outputs.deployment-image-name}
      tag: ${actions.build.dev.version}
In this example, the
name
field under
image
is set to the name of the image built by the
dev
build action, and the
tag
field is set to the version of the
dev
build action, which is the image tag. For more information, you can refer to the Garden documentation (). ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
c
Ah, the right context is everything. Thank you @microscopic-river-74022
m
Let me check the knowledge base for you. One moment! :books:
---------------------- You're welcome! I'm glad I could help. If you have any more questions about Garden, feel free to ask. Happy coding! ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------