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

Impossible to submit json as a CLI parameter #646

Closed
jessesuen opened this issue Dec 30, 2017 · 1 comment
Closed

Impossible to submit json as a CLI parameter #646

jessesuen opened this issue Dec 30, 2017 · 1 comment
Assignees

Comments

@jessesuen
Copy link
Member

A use case is to pass a JSON string as a parameter. It doesn't seem possible to do this from the command line. No matter what combination of quoting/escaping I try to do, I get some form of the following error:

argo submit examples/arguments-parameters.yaml -p json='{"hello":"world"}'
Error: invalid argument "json={\"hello\":\"world\"}" for "-p, --parameter" flag: line 1, column 6: bare " in non-quoted-field
@jessesuen
Copy link
Member Author

jessesuen commented Dec 30, 2017

Here is the example manifest we need to get working from command line:

apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
  generateName: pass-json-
spec:
  entrypoint: parsejson
  templates:
  - name: parsejson
    inputs:
      parameters:
      - name: json
    container:
      image: jessesuen/argoexec:latest
      command: [sh, -c]
      args: ["echo '{{inputs.parameters.json}}' | jq ."]

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

No branches or pull requests

1 participant