-
Notifications
You must be signed in to change notification settings - Fork 41
Expand file tree
/
Copy pathdevfile.yaml
More file actions
137 lines (126 loc) · 3.33 KB
/
devfile.yaml
File metadata and controls
137 lines (126 loc) · 3.33 KB
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
#
# Copyright (c) 2019-2026 Red Hat, Inc.
# This program and the accompanying materials are made
# available under the terms of the Eclipse Public License 2.0
# which is available at https://www.eclipse.org/legal/epl-2.0/
#
# SPDX-License-Identifier: EPL-2.0
#
# Contributors:
# Red Hat, Inc. - initial API and implementation
#
schemaVersion: 2.3.0
metadata:
name: che-machine-exec
components:
- container:
endpoints:
- name: cloud-shell
targetPort: 3130
exposure: public
protocol: http
- exposure: none
name: debug
targetPort: 5858
- name: exec-server
targetPort: 5555
exposure: public
attributes:
type: terminal-dev
protocol: ws
secure: false
image: registry.access.redhat.com/ubi9/go-toolset:1.25.5-1770596585
args:
- tail
- '-f'
- /dev/null
env:
- name: DEBUG_PORT
value: '5858'
- name: GOPATH
value: $(PROJECTS_ROOT)/.go
- name: GOMODCACHE
value: /var/tmp/.go/pkg/mod
- name: GOCACHE
value: /var/tmp/.go/build
- name: XDG_CACHE_HOME
value: /var/tmp/.go/xdg
memoryLimit: 2.5Gi
mountSources: true
name: dev
- name: node
container:
image: docker.io/node:22-alpine
args:
- tail
- '-f'
- /dev/null
mountSources: true
memoryLimit: 1.5Gi
commands:
- id: compile
exec:
component: dev
commandLine: ./compile.sh
workingDir: /projects/che-machine-exec
group:
kind: build
isDefault: true
- id: format
exec:
component: dev
commandLine: go fmt ./... && printf "\033[32mDone.\033[0m"
workingDir: /projects/che-machine-exec
group:
kind: build
isDefault: false
- id: test
exec:
component: dev
commandLine: export CHE_WORKSPACE_ID=test_id; go test ./...
workingDir: /projects/che-machine-exec
group:
kind: test
isDefault: true
- id: start-exec-server
exec:
component: dev
commandLine: ./che-machine-exec --url 0.0.0.0:5555
workingDir: /projects/che-machine-exec
group:
kind: run
isDefault: true
- id: stop-exec-server
exec:
component: dev
commandLine: >-
pid=$(pidof che-machine-exec) && kill ${pid} &&
printf "\033[32mDone.\033[0m" ||
printf "\033[32mNothing to stop... Done.\033[0m"
group:
kind: run
isDefault: false
- id: build-cloud-shell
exec:
component: node
commandLine: >-
export HOME=/projects &&
export GOPATH=/projects/.go &&
export GOMODCACHE=/var/tmp/.go/pkg/mod &&
export GOCACHE=/var/tmp/.go/build &&
export XDG_CACHE_HOME=/var/tmp/.go/xdg &&
YARN_NETWORK_CONCURRENCY=1 corepack yarn install --immutable &&
corepack yarn run build
workingDir: /projects/che-machine-exec/cloud-shell
group:
kind: build
isDefault: false
- id: start-cloud-shell
exec:
component: dev
commandLine: >-
./che-machine-exec --url 0.0.0.0:3130 --static /projects/che-machine-exec/cloud-shell
workingDir: /projects/che-machine-exec
group:
kind: run
isDefault: false