-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdevfile.yaml
50 lines (50 loc) · 1.2 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
---
apiVersion: 1.0.0
metadata:
name: golang
projects:
-
name: example
source:
type: git
location: /~https://github.com/golang/example.git
clonePath: src/github.com/golang/example/
components:
-
type: chePlugin
reference: https://raw.githubusercontent.com/tolusha/plugins-registry/master/plugins/tolusha/go/0.11.0/meta.yaml
alias: go-plugin
memoryLimit: 512Mi
-
type: dockerimage
# this version is used in the plugin
image: golang:1.10.7-stretch
alias: go-cli
command: ['sleep']
args: ['infinity']
env:
- name: GOPATH
# replicate the GOPATH from the plugin
value: /go:$(CHE_PROJECTS_ROOT)
- name: GOCACHE
# replicate the GOCACHE from the plugin, even though the cache is not shared
# between the two
value: /tmp/.cache
- name: PS1
value: $(echo ${0})\\$
memoryLimit: 512Mi
mountSources: true
commands:
-
name: run outyet
actions:
- type: exec
component: go-cli
command: go get -d && go run main.go
workdir: ${CHE_PROJECTS_ROOT}/src/github.com/golang/example/outyet
- name: test outyet
actions:
- type: exec
component: go-cli
command: go test
workdir: ${CHE_PROJECTS_ROOT}/src/github.com/golang/example/outyet