Repository navigation
Expand file tree
/
Copy pathdevfile.yaml
More file actions
97 lines (89 loc) · 2.27 KB
/
Copy pathdevfile.yaml
File metadata and controls
97 lines (89 loc) · 2.27 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
#
# 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:
- 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.9-1778675823
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
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