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

output from previous action cannot be used #834

Closed
ffoysal opened this issue Dec 17, 2019 · 1 comment · Fixed by #840
Closed

output from previous action cannot be used #834

ffoysal opened this issue Dec 17, 2019 · 1 comment · Fixed by #840
Assignees

Comments

@ffoysal
Copy link

ffoysal commented Dec 17, 2019

a sample porter.yaml is

outputs:
- name: kubeconfig
  description: "Kubeconfig for the newly created "
  type: string
  applyTo:
  - install
  - upgrade
  - uninstall
install:
  - exec:
      description: "Display Cluster info"
      command: bash
      flags:
        c: cat /root/.kube/config
      outputs:
      - name: kubeconfig
        path: /root/.kube/config
uninstall:
  - exec:
      description: "Uninstalling: get kubeconfig from outputs"
      command: bash
      flags:
        c: "echo {{ bundle.outputs.kubeconfig }} > /root/.kube/config" 

after install I can see the output using porter instances output show kubeconfig -i hack
when I do porter uninstall hack got this

uninstalling hack...
executing uninstall action from Test (bundle instance: hack)
Error: unable to resolve sourced values: unable to resolve step: unable to render template exec:
  command: bash
  description: 'Uninstalling: get kubeconfig from outputs'
  flags:
    c: "echo {{ bundle.outputs.kubeconfig }} > /root/.kube/config"
: Missing variable "kubeconfig"
Error: failed to uninstall the bundle: container exit code: 1, message: <nil>. fetching outputs failed: error copying outputs from container: Error: No such container:path: 2f4ab208d54d3d9fc6d96e70faf62c73c43e3c0413da180f2c584400a0b18095:/cnab/app/outputs

any idea ??

@vdice
Copy link
Member

vdice commented Dec 17, 2019

Thank you for the issue @ffoysal ; indeed Porter should support output value interpolation between actions. I'll dig in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants