-
Notifications
You must be signed in to change notification settings - Fork 4
/
devfile.yaml
79 lines (79 loc) · 2.3 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
# CodeReady Workspace devfile
metadata:
generateName: workspace-tekton-101
#name: workspace-tekton-101
projects:
- name: tekton-101
source:
location: 'https://github.com/haf-tech/tekton-101'
type: git
branch: master
components:
- id: che-incubator/typescript/latest
memoryLimit: 256Mi
type: chePlugin
# plugin has high memory utilization
# - id: redhat/vscode-openshift-connector/latest
# type: chePlugin
- mountSources: true
endpoints:
- name: nodejs
port: 3000
memoryLimit: 512Mi
type: dockerimage
alias: nodejs
image: >-
registry.redhat.io/codeready-workspaces/stacks-node-rhel8@sha256:c88277efda0208d4960917a381278e0956b0839f46fdbe51384370755caa180a
apiVersion: 1.0.0
commands:
- name: download dependencies
actions:
- workdir: '${CHE_PROJECTS_ROOT}/tekton-101'
type: exec
command: npm install
component: nodejs
- name: run the web app (and download dependencies)
actions:
- workdir: '${CHE_PROJECTS_ROOT}/tekton-101'
type: exec
command: npm install; npm start
component: nodejs
- name: run the web app
actions:
- workdir: '${CHE_PROJECTS_ROOT}/tekton-101'
type: exec
command: npm start
component: nodejs
- name: run the web app (debugging enabled)
actions:
- workdir: '${CHE_PROJECTS_ROOT}/tekton-101'
type: exec
command: npm start
component: nodejs
- name: stop the web app
actions:
- type: exec
command: >-
node_server_pids=$(pgrep -fx '.*nodemon (--inspect )?app.js' | tr
"\\n" " ") && echo "Stopping node server with PIDs:
${node_server_pids}" && kill -15 ${node_server_pids} &>/dev/null &&
echo 'Done.'
component: nodejs
- 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