devspace
devspace copied to clipboard
runtime variables not available in custom pipeline
What happened?
Trying to use an image name in a pipeline
→ devspace run-pipeline test --skip-build
info Using namespace 'tmp'
info Using kube context 'minikube'
image
What did you expect to happen instead?
the runtime variable to hold the image name
→ devspace run-pipeline test --skip-build
info Using namespace 'tmp'
info Using kube context 'minikube'
image registry.com/images/example
How can we reproduce the bug? (as minimally and precisely as possible)
My devspace.yaml:
version: v2beta1
name: tmp
pipelines:
test:
run: |-
echo "image ${runtime.images.example.image}"
images:
example:
image: registry.com/images/example
tags:
- $(ls | md5)
- test
Local Environment:
- DevSpace Version: [use
devspace --version] devspace version 6.3.12 - Operating System: mac
- ARCH of the OS: ARM64 Kubernetes Cluster:
- Cloud Provider: minikube
- Kubernetes Version: [use
kubectl version] → kubectl version Client Version: v1.30.0 Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3 Server Version: v1.28.3 Anything else we need to know?
@janrito The pipeline function get_image is more reliable for this purpose.
Here's a devspace.yaml that worked for me:
version: v2beta1
name: tmp
pipelines:
test:
run: |-
echo "image $(get_image --only image example)"
images:
example:
image: registry.com/images/example
tags:
- $(ls | md5)
- test
This page needs to be updated, since the variable only sometimes works in pipelines.
Thanks! I'll take a look