Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
devfile-registry
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
esa-common
che7
devfile-registry
Commits
dd218f60
Unverified
Commit
dd218f60
authored
4 years ago
by
Vitaliy Gulyy
Committed by
GitHub
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Add sample project to Go stack (#268)
Signed-off-by:
Vitaliy Gulyy
<
vgulyy@redhat.com
>
parent
c0ae0207
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
devfiles/go/devfile.yaml
+48
-9
48 additions, 9 deletions
devfiles/go/devfile.yaml
with
48 additions
and
9 deletions
devfiles/go/devfile.yaml
+
48
−
9
View file @
dd218f60
...
...
@@ -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.1
2
:nightly
image
:
quay.io/eclipse/che-golang-1.1
4
: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
:
512M
i
memoryLimit
:
2G
i
mountSources
:
true
commands
:
-
name
:
r
un outyet
name
:
'
1.1
R
un
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
:
s
top outyet
name
:
'
1.2
S
top
outyet
'
actions
:
-
type
:
exec
component
:
go-cli
command
:
kill $(pidof go)
-
name
:
t
est outyet
name
:
'
1.3
T
est
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
:
|
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment