Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

chore(devfile): che-theia devfile to work on plugins #987

Merged
merged 4 commits into from
Feb 10, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 81 additions & 0 deletions devfile.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
apiVersion: 1.0.0
metadata:
generateName: che-theia-

components:
- mountSources: true
command:
- tail
- '-f'
- /dev/null
memoryLimit: 512Gi
sunix marked this conversation as resolved.
Show resolved Hide resolved
type: dockerimage
image: 'quay.io/eclipse/che-theia:next'
alias: che-theia-next-dev
env:
- value: 0.0.0.0
name: THEIA_HOST
- value: '3130'
name: THEIA_PORT
- value: '0'
name: NODE_TLS_REJECT_UNAUTHORIZED

- mountSources: true
memoryLimit: 3Gi
type: dockerimage
image: 'quay.io/eclipse/che-theia-dev:next'
alias: che-dev
sunix marked this conversation as resolved.
Show resolved Hide resolved

- id: redhat/vscode-yaml/latest
type: chePlugin

- id: che-incubator/typescript/latest
memoryLimit: 2048M
type: chePlugin

- id: github/vscode-pull-request-github/latest
type: chePlugin

commands:

- name: build ... current yarn project
actions:
- workdir: '${fileDirname}'
type: exec
command: >
echo "build from ${fileDirname}" && killall node; yarn || (yarn
sunix marked this conversation as resolved.
Show resolved Hide resolved
lint:fix && yarn format:fix && yarn) && echo -e "\e[32mDone.\e[0m
build ... from folder ${fileDirname}"
component: che-dev

- name: test-watch ... current yarn project
actions:
- workdir: '${fileDirname}'
type: exec
command: >
echo "yarn test:watch from ${fileDirname}" && killall node; yarn
test:watch
component: che-dev

- name: build current plugin ... and run with che-theia
previewUrl:
port: 3130
actions:
- workdir: '${fileDirname}'
type: exec
command: |
project_folder=$PWD
while [ ! -e "$project_folder/package.json" ]; do
project_folder=${project_folder%/*}
if [ "$project_folder" = "" ]; then
echo "Could not detect any 'package.json' file from `${PWD}`. Please open any file from your plugin project.";
exit 1;
fi
done
SKIP_TEST=true SKIP_FORMAT=true SKIP_LINT=true yarn --cwd=$project_folder
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in one case (when of build it's doing tests/checks and here it's skipping checks
fine for me b/c I like TDD but I don't know if it's the flow for all devs ?

Copy link
Contributor Author

@sunix sunix Feb 9, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's see if someone complains and we will figure out :)

if [ ! 0 -lt $(ls $project_folder/*.theia 2>/dev/null | wc -w) ]; then
echo "Could not find any '.theia' files in ${project_folder}. Maybe try to open any file from your plugin project.";
exit 1;
fi
mkdir -p /tmp/theiadev_projects && export CHE_PROJECTS_ROOT=/tmp/theiadev_projects && cp "$project_folder"/*.theia /default-theia-plugins/ && /entrypoint.sh
component: che-theia-next-dev
72 changes: 0 additions & 72 deletions plugins/workspace-plugin/devfile.yaml

This file was deleted.