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

Add input and shell commands in devfile yaml #16328

Closed
SDAdham opened this issue Mar 12, 2020 · 1 comment
Closed

Add input and shell commands in devfile yaml #16328

SDAdham opened this issue Mar 12, 2020 · 1 comment
Labels
area/editor/theia Issues related to the che-theia IDE of Che kind/enhancement A feature request - must adhere to the feature request template. severity/P1 Has a major impact to usage or development of the system.

Comments

@SDAdham
Copy link

SDAdham commented Mar 12, 2020

Is your enhancement related to a problem? Please describe.

Currently I have to manually maintain tasks.json and devfile.yaml files together, meaning:
devfile.yaml does not accept inputs, so I add it into tasks.json

    "inputs": [
        {
            "id": "EXAMPLE_INPUT",
            "type": "promptString"
        }
    ]

And che commands doesn't support ${input:EXAMPLE}, so alternatively, I have to define it as exec command in yaml but in tasks, I set it as shell

{
            "type": "shell",
            "label": "Export environment variables",
            "command": "sleep 2 && echo 'EXAMPLE=\"${input:EXAMPLE_INPUT}\"' > .theia/ENV.variables",
            "target": {
                "workingDir": "doesn't matter whatever I input here, it just doesn't work",
                "component": "some-server - i don't know if this also matter cuz if I try export variables from here, it wouldn't work"
            }
        },

in the yaml
below doesn't work and it doesn't even show up!

  - name: Attach remote debugger
    actions:
      - referenceContent: |
          {
            "version": "0.2.0",
            "configurations": [
              {
                "type": "node",
                "request": "attach",
                "name": "Attach to Remote",
                "address": "localhost",
                "port": 9229,
                "localRoot": "${workspaceFolder}",
                "remoteRoot": "#{workspaceFolder}"
              }
            ]
          }
        type: vscode-launch

below works

  - name: Export environment variables
    actions:
      - type: exec
        command: it doesn't matter what command I write here, because I will need to copy the tasks.json into .theia folder and over the one that's generated by the devfile
        component: some-server

Describe the solution you'd like

Improvements for above, please! At least, allow Tasks to refresh the list if we changed/updated the tasks.json, we don't have to must have to match the tasks.json to the commands list in yaml
and have che to support ${server.web...} variables and input

Describe alternatives you've considered

I already mentioned my suffering workarounds above...

Additional context

Thanks

@SDAdham SDAdham added the kind/enhancement A feature request - must adhere to the feature request template. label Mar 12, 2020
@che-bot che-bot added the status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. label Mar 12, 2020
@tolusha tolusha added severity/P1 Has a major impact to usage or development of the system. area/editor/theia Issues related to the che-theia IDE of Che and removed status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. labels Mar 13, 2020
@azatsarynnyy
Copy link
Member

sync is tracked in #12709
inputs support is tracked in #16264

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/editor/theia Issues related to the che-theia IDE of Che kind/enhancement A feature request - must adhere to the feature request template. severity/P1 Has a major impact to usage or development of the system.
Projects
None yet
Development

No branches or pull requests

4 participants