|
| 1 | +# A devfile to setup a vscode-teletype extension in Che. |
| 2 | + |
| 3 | +apiVersion: 1.0.0 |
| 4 | +metadata: |
| 5 | + name: vscode-teletype |
| 6 | + |
| 7 | +projects: |
| 8 | + |
| 9 | + - name: vscode-teletype |
| 10 | + source: |
| 11 | + location: 'https://github.com/Rijul5/vscode-teletype' |
| 12 | + type: git |
| 13 | + branch: master |
| 14 | + |
| 15 | +components: |
| 16 | + |
| 17 | + - alias: vscode-extension-sidecar |
| 18 | + type: dockerimage |
| 19 | + image: eclipse/che-theia-endpoint-runtime:7.0.0-next |
| 20 | + endpoints: |
| 21 | + - name: theia-remote-endpoint |
| 22 | + port: 10000 |
| 23 | + attributes: |
| 24 | + protocol: ws |
| 25 | + public: 'true' |
| 26 | + memoryLimit: 512M |
| 27 | + mountSources: true |
| 28 | + |
| 29 | + - alias: git |
| 30 | + type: dockerimage |
| 31 | + image: sunix/git-devtools |
| 32 | + mountSources: true |
| 33 | + memoryLimit: 256M |
| 34 | + |
| 35 | + - alias: che-dev |
| 36 | + type: dockerimage |
| 37 | + image: eclipse/che-theia-dev:nightly |
| 38 | + mountSources: true |
| 39 | + endpoints: |
| 40 | + - name: "theia-dev-flow" |
| 41 | + port: 3010 |
| 42 | + attributes: |
| 43 | + protocol: http |
| 44 | + public: 'true' |
| 45 | + memoryLimit: 1024M |
| 46 | + |
| 47 | + - id: redhat/vscode-yaml/latest |
| 48 | + type: chePlugin |
| 49 | + |
| 50 | + - id: che-incubator/typescript/latest |
| 51 | + type: chePlugin |
| 52 | + memoryLimit: 1024M |
| 53 | + |
| 54 | + - type: cheEditor |
| 55 | + alias: theia-editor |
| 56 | + id: eclipse/che-theia/7.0.0-next |
| 57 | + |
| 58 | +commands: |
| 59 | + |
| 60 | + - name: build ... vscode ext |
| 61 | + actions: |
| 62 | + - type: exec |
| 63 | + component: che-dev |
| 64 | + command: npm install -g vsce && npm install && vsce package |
| 65 | + workdir: /projects/vscode-teletype/ |
| 66 | + |
| 67 | + - name: run ... remote vscode ext |
| 68 | + actions: |
| 69 | + - type: exec |
| 70 | + component: vscode-extension-sidecar |
| 71 | + command: > |
| 72 | + export THEIA_PLUGIN_ENDPOINT_DISCOVERY_PORT='2504' && |
| 73 | + export THEIA_PLUGINS='local-dir:///projects/vscode-teletype/' && |
| 74 | + export THEIA_PLUGIN_ENDPOINT_PORT='10000' && |
| 75 | + node /home/theia/lib/node/plugin-remote.js |
| 76 | + workdir: /home/theia/ |
| 77 | + |
| 78 | + - name: run ... HOSTED che-theia + detect remote vscode ext |
| 79 | + actions: |
| 80 | + - type: exec |
| 81 | + component: theia-editor |
| 82 | + command: > |
| 83 | + kill `cat /tmp/node_theiadev.pid` &> /dev/null; |
| 84 | + mkdir -p /tmp/theiadev_projects && |
| 85 | + export THEIA_PLUGIN_ENDPOINT_DISCOVERY_PORT='2504' && |
| 86 | + export CHE_PROJECTS_ROOT=/tmp/theiadev_projects && |
| 87 | + node src-gen/backend/main.js /tmp/theiadev_projects --hostname=0.0.0.0 --port=3130 & echo $!> /tmp/node_theiadev.pid ; wait `cat /tmp/node_theiadev.pid` |
| 88 | + workdir: /home/theia |
| 89 | + |
| 90 | + |
0 commit comments