Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve dev file #42

Merged
merged 2 commits into from
Aug 12, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,4 @@ For communication with che-machine-exec use websocket protocol.

#### Stop che-machine-exec server

To stop che-machine-exec server you can use task with name `kill exec server`.
To stop che-machine-exec server you can use task with name `stop exec server`.
24 changes: 13 additions & 11 deletions devfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,12 @@ projects:
type: git
location: https://github.com/eclipse/che-machine-exec.git
components:
- alias: theia-editor
type: cheEditor
id: eclipse/che-theia/next
- alias: exec-plugin
type: chePlugin
id: eclipse/che-machine-exec-plugin/0.0.1
- alias: ms-vscode.go
type: chePlugin
id: ms-vscode/go/0.9.2
id: ms-vscode/go/0.11.0
- alias: typescript-plugin
type: chePlugin
id: che-incubator/typescript/1.30.2
Expand All @@ -34,7 +31,7 @@ components:
memoryLimit: 3Gi
- alias: dev
type: dockerimage
image: eclipse/che-machine-exec-dev
image: eclipse/che-machine-exec-dev:next
mountSources: true
endpoints:
- name: exec-server
Expand All @@ -47,9 +44,11 @@ components:
memoryLimit: 1024M
env:
- name: GOPATH
value: $(CHE_PROJECTS_ROOT)
value: /go:$(CHE_PROJECTS_ROOT)
- name: GOCACHE
value: $(GOPATH)/.cache
# replicate the GOCACHE from the plugin, even though the cache is not shared
# between the two
value: /tmp/.cache
commands:
- name: compile
actions:
Expand All @@ -67,22 +66,25 @@ commands:
actions:
- type: exec
component: dev
command: go fmt ./...
command: go fmt ./... && printf "\033[32mDone.\033[0m"
workdir: /projects/src/github.com/eclipse/che-machine-exec
- name: update dependencies
actions:
- type: exec
component: dev
command: dep ensure
command: dep ensure && printf "\033[32mDone.\033[0m"
workdir: /projects/src/github.com/eclipse/che-machine-exec
- name: start exec server
actions:
- type: exec
component: dev
command: ./che-machine-exec --url 0.0.0.0:5555
workdir: /projects/src/github.com/eclipse/che-machine-exec
- name: kill exec server
- name: stop exec server
actions:
- type: exec
component: dev
command: ps aux | grep "[.]/che-machine-exec" | head -1 | cut -d " " -f 2 | xargs kill
command: >-
pid=$(pidof che-machine-exec) && kill ${pid} &&
printf "\033[32mDone.\033[0m" ||
printf "\033[32mNothing to stop... Done.\033[0m"
12 changes: 3 additions & 9 deletions dockerfiles/dev/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,10 @@
# Dockerfile defines che-machine-exec development image eclipse/che-machine-exec-dev
#

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

ARG DEP_LOCATION=/go/bin/dep

RUN apk add --update git bash wget less && \
wget https://github.com/golang/dep/releases/download/v0.5.1/dep-linux-amd64 -O ${DEP_LOCATION} && \
chmod +x ${DEP_LOCATION} && \
apk del wget
RUN wget https://github.com/golang/dep/releases/download/v0.5.1/dep-linux-amd64 -O ${DEP_LOCATION} && \
chmod +x ${DEP_LOCATION}
EXPOSE 5555 5555

WORKDIR /projects

CMD tail -f /dev/null