This repository has been archived by the owner on Apr 4, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 111
/
devfile.yaml
80 lines (71 loc) · 2.4 KB
/
devfile.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
apiVersion: 1.0.0
metadata:
generateName: che-theia-
components:
- mountSources: true
command:
- tail
- '-f'
- /dev/null
memoryLimit: 1Gi
type: dockerimage
image: 'quay.io/eclipse/che-theia:next'
alias: che-theia-next-prod
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: dev
- 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 --ignore-scripts && yarn lint:fix && yarn format:fix && yarn && echo -e "\e[32mDone build from folder ${fileDirname}\e[0m"
component: 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: 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
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-prod