Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

runtime variables not available in custom pipeline #2850

Open
janrito opened this issue Apr 30, 2024 · 2 comments
Open

runtime variables not available in custom pipeline #2850

janrito opened this issue Apr 30, 2024 · 2 comments
Labels
kind/question Further information is requested

Comments

@janrito
Copy link

janrito commented Apr 30, 2024

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 janrito added the kind/bug Something isn't working label Apr 30, 2024
@deniseschannon deniseschannon added the kind/question Further information is requested label Apr 30, 2024 — with Linear
@deniseschannon deniseschannon removed the kind/bug Something isn't working label Apr 30, 2024
@lizardruss
Copy link
Collaborator

@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.

@janrito
Copy link
Author

janrito commented May 1, 2024

Thanks! I'll take a look

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants