Created
August 22, 2019 13:29
-
-
Save sparkoo/1a97f55afdbf8a02060c90d8e16e5462 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
apiVersion: 1.0.0 | |
metadata: | |
name: prdel | |
generateName: golang- | |
projects: | |
- | |
name: example | |
source: | |
type: git | |
location: https://github.com/golang/example.git | |
clonePath: src/github.com/golang/example/ | |
components: | |
- | |
type: chePlugin | |
id: ms-vscode/go/latest | |
alias: go-plugin | |
memoryLimit: 512Mi | |
- | |
type: dockerimage | |
# this version is used in the plugin | |
image: quay.io/eclipse/che-golang-1.10:nightly | |
alias: go-cli | |
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 | |
endpoints: | |
- name: '8080/tcp' | |
port: 8080 | |
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: stop outyet | |
actions: | |
- type: exec | |
component: go-cli | |
command: kill $(pidof go) | |
- | |
name: test outyet | |
actions: | |
- type: exec | |
component: go-cli | |
command: go test | |
workdir: ${CHE_PROJECTS_ROOT}/src/github.com/golang/example/outyet | |
- | |
name: Debug current file | |
actions: | |
- type: vscode-launch | |
referenceContent: | | |
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"name": "Debug current file", | |
"type": "go", | |
"request": "launch", | |
"mode": "auto", | |
"program": "${fileDirname}", | |
}, | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment