Skip to content
Snippets Groups Projects
Unverified Commit dd218f60 authored by Vitaliy Gulyy's avatar Vitaliy Gulyy Committed by GitHub
Browse files

Add sample project to Go stack (#268)


Signed-off-by: default avatarVitaliy Gulyy <vgulyy@redhat.com>
parent c0ae0207
No related branches found
No related tags found
No related merge requests found
......@@ -9,10 +9,21 @@ projects:
type: git
location: https://github.com/golang/example.git
clonePath: src/github.com/golang/example/
-
name: golang-echo-realworld-example-app
source:
type: git
location: https://github.com/xesina/golang-echo-realworld-example-app.git
clonePath: src/github.com/xesina/golang-echo-realworld-example-app
components:
-
type: cheEditor
id: eclipse/che-theia/next
memoryLimit: 1Gi
-
type: chePlugin
id: ms-vscode/go/latest
id: golang/go/latest
alias: go-plugin
memoryLimit: 512Mi
env:
......@@ -25,12 +36,12 @@ components:
-
type: dockerimage
# this version is used in the plugin
image: quay.io/eclipse/che-golang-1.12:nightly
image: quay.io/eclipse/che-golang-1.14:nightly
alias: go-cli
env:
- name: GOPATH
# replicate the GOPATH from the plugin
value: /go:$(CHE_PROJECTS_ROOT)
value: $(CHE_PROJECTS_ROOT)
- name: GOCACHE
# replicate the GOCACHE from the plugin, even though the cache is not shared
# between the two
......@@ -38,38 +49,66 @@ components:
endpoints:
- name: '8080-tcp'
port: 8080
memoryLimit: 512Mi
memoryLimit: 2Gi
mountSources: true
commands:
-
name: run outyet
name: '1.1 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
name: '1.2 Stop outyet'
actions:
- type: exec
component: go-cli
command: kill $(pidof go)
-
name: test outyet
name: '1.3 Test outyet'
actions:
- type: exec
component: go-cli
command: go test
workdir: ${CHE_PROJECTS_ROOT}/src/github.com/golang/example/outyet
-
name: run current file
name: '2.1 xenisa :: install dependencies'
actions:
- type: exec
component: go-cli
command: go mod download
workdir: ${GOPATH}/src/github.com/xesina/golang-echo-realworld-example-app
-
name: '2.2 xenisa :: run'
actions:
- type: exec
component: go-cli
command: go run main.go
workdir: ${GOPATH}/src/github.com/xesina/golang-echo-realworld-example-app
-
name: '2.3 xenisa :: build'
actions:
- type: exec
component: go-cli
command: go build
workdir: ${GOPATH}/src/github.com/xesina/golang-echo-realworld-example-app
-
name: '2.4 xenisa :: test'
actions:
- type: exec
component: go-cli
command: go test ./...
workdir: ${GOPATH}/src/github.com/xesina/golang-echo-realworld-example-app
-
name: 'Run current file'
actions:
- type: exec
component: go-cli
command: go get -d && go run ${file}
workdir: ${fileDirname}
-
name: Debug current file
name: 'Debug current file'
actions:
- type: vscode-launch
referenceContent: |
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment