Skip to content

Commit 2f38b1d

Browse files
Improve dev file (#42)
* Use newer go-lang language server. Make development container working on the minishift. Improve devfile tasks. Signed-off-by: Oleksandr Andriienko <[email protected]> * Use stable editor for development. Improve some commands. Signed-off-by: Oleksandr Andriienko <[email protected]>
1 parent 9c264be commit 2f38b1d

File tree

3 files changed

+17
-21
lines changed

3 files changed

+17
-21
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,4 +80,4 @@ For communication with che-machine-exec use websocket protocol.
8080

8181
#### Stop che-machine-exec server
8282

83-
To stop che-machine-exec server you can use task with name `kill exec server`.
83+
To stop che-machine-exec server you can use task with name `stop exec server`.

devfile.yaml

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,12 @@ projects:
88
type: git
99
location: https://github.com/eclipse/che-machine-exec.git
1010
components:
11-
- alias: theia-editor
12-
type: cheEditor
13-
id: eclipse/che-theia/next
1411
- alias: exec-plugin
1512
type: chePlugin
1613
id: eclipse/che-machine-exec-plugin/0.0.1
1714
- alias: ms-vscode.go
1815
type: chePlugin
19-
id: ms-vscode/go/0.9.2
16+
id: ms-vscode/go/0.11.0
2017
- alias: typescript-plugin
2118
type: chePlugin
2219
id: che-incubator/typescript/1.30.2
@@ -34,7 +31,7 @@ components:
3431
memoryLimit: 3Gi
3532
- alias: dev
3633
type: dockerimage
37-
image: eclipse/che-machine-exec-dev
34+
image: eclipse/che-machine-exec-dev:next
3835
mountSources: true
3936
endpoints:
4037
- name: exec-server
@@ -47,9 +44,11 @@ components:
4744
memoryLimit: 1024M
4845
env:
4946
- name: GOPATH
50-
value: $(CHE_PROJECTS_ROOT)
47+
value: /go:$(CHE_PROJECTS_ROOT)
5148
- name: GOCACHE
52-
value: $(GOPATH)/.cache
49+
# replicate the GOCACHE from the plugin, even though the cache is not shared
50+
# between the two
51+
value: /tmp/.cache
5352
commands:
5453
- name: compile
5554
actions:
@@ -67,22 +66,25 @@ commands:
6766
actions:
6867
- type: exec
6968
component: dev
70-
command: go fmt ./...
69+
command: go fmt ./... && printf "\033[32mDone.\033[0m"
7170
workdir: /projects/src/github.com/eclipse/che-machine-exec
7271
- name: update dependencies
7372
actions:
7473
- type: exec
7574
component: dev
76-
command: dep ensure
75+
command: dep ensure && printf "\033[32mDone.\033[0m"
7776
workdir: /projects/src/github.com/eclipse/che-machine-exec
7877
- name: start exec server
7978
actions:
8079
- type: exec
8180
component: dev
8281
command: ./che-machine-exec --url 0.0.0.0:5555
8382
workdir: /projects/src/github.com/eclipse/che-machine-exec
84-
- name: kill exec server
83+
- name: stop exec server
8584
actions:
8685
- type: exec
8786
component: dev
88-
command: ps aux | grep "[.]/che-machine-exec" | head -1 | cut -d " " -f 2 | xargs kill
87+
command: >-
88+
pid=$(pidof che-machine-exec) && kill ${pid} &&
89+
printf "\033[32mDone.\033[0m" ||
90+
printf "\033[32mNothing to stop... Done.\033[0m"

dockerfiles/dev/Dockerfile

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,10 @@
1212
# Dockerfile defines che-machine-exec development image eclipse/che-machine-exec-dev
1313
#
1414

15-
FROM golang:1.10.3-alpine
15+
FROM quay.io/eclipse/che-golang-1.10:nightly
1616

1717
ARG DEP_LOCATION=/go/bin/dep
1818

19-
RUN apk add --update git bash wget less && \
20-
wget https://github.com/golang/dep/releases/download/v0.5.1/dep-linux-amd64 -O ${DEP_LOCATION} && \
21-
chmod +x ${DEP_LOCATION} && \
22-
apk del wget
19+
RUN wget https://github.com/golang/dep/releases/download/v0.5.1/dep-linux-amd64 -O ${DEP_LOCATION} && \
20+
chmod +x ${DEP_LOCATION}
2321
EXPOSE 5555 5555
24-
25-
WORKDIR /projects
26-
27-
CMD tail -f /dev/null

0 commit comments

Comments
 (0)