File tree Expand file tree Collapse file tree 10 files changed +246
-2
lines changed Expand file tree Collapse file tree 10 files changed +246
-2
lines changed Original file line number Diff line number Diff line change 36
36
" stacks/java-openliberty-gradle/**" ,
37
37
" stacks/java-websphereliberty/**" ,
38
38
" stacks/java-websphereliberty-gradle/**" ,
39
- " stacks/nodejs/**"
39
+ " stacks/nodejs/**" ,
40
+ " stacks/go/1.0.2/**" ,
41
+ " stacks/go/1.1.0/**" ,
42
+ " stacks/go/2.0.0/**" ,
43
+ " stacks/go/2.1.0/**"
40
44
],
41
45
"prHourlyLimit" : 20 ,
42
46
"prConcurrentLimit" : 5
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ metadata:
6
6
icon : https://raw.githubusercontent.com/devfile-samples/devfile-stack-icons/main/golang.svg
7
7
tags :
8
8
- Go
9
+ - Deprecated
9
10
projectType : Go
10
11
language : Go
11
12
provider : Red Hat
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ metadata:
6
6
icon : https://raw.githubusercontent.com/devfile-samples/devfile-stack-icons/main/golang.svg
7
7
tags :
8
8
- Go
9
+ - Deprecated
9
10
projectType : Go
10
11
language : Go
11
12
provider : Red Hat
Original file line number Diff line number Diff line change
1
+ schemaVersion : 2.1.0
2
+ metadata :
3
+ name : go
4
+ displayName : Go Runtime
5
+ description : Go (version 1.19.x) is an open source programming language that makes it easy to build simple, reliable, and efficient software.
6
+ icon : https://raw.githubusercontent.com/devfile-samples/devfile-stack-icons/main/golang.svg
7
+ tags :
8
+ - Go
9
+ projectType : Go
10
+ language : Go
11
+ provider : Red Hat
12
+ version : 1.2.0
13
+ starterProjects :
14
+ - name : go-starter
15
+ description : A Go project with a simple HTTP server
16
+ git :
17
+ checkoutFrom :
18
+ revision : main
19
+ remotes :
20
+ origin : https://github.com/devfile-samples/devfile-stack-go.git
21
+ components :
22
+ - container :
23
+ endpoints :
24
+ - name : http-go
25
+ targetPort : 8080
26
+ - exposure : none
27
+ name : debug
28
+ targetPort : 5858
29
+ image : registry.access.redhat.com/ubi9/go-toolset:1.19.13-4.1697647145
30
+ args : ["tail", "-f", "/dev/null"]
31
+ env :
32
+ - name : DEBUG_PORT
33
+ value : ' 5858'
34
+ memoryLimit : 1024Mi
35
+ mountSources : true
36
+ name : runtime
37
+ commands :
38
+ - exec :
39
+ env :
40
+ - name : GOPATH
41
+ value : ${PROJECT_SOURCE}/.go
42
+ - name : GOCACHE
43
+ value : ${PROJECT_SOURCE}/.cache
44
+ commandLine : go build main.go
45
+ component : runtime
46
+ group :
47
+ isDefault : true
48
+ kind : build
49
+ workingDir : ${PROJECT_SOURCE}
50
+ id : build
51
+ - exec :
52
+ commandLine : ./main
53
+ component : runtime
54
+ group :
55
+ isDefault : true
56
+ kind : run
57
+ workingDir : ${PROJECT_SOURCE}
58
+ id : run
59
+
60
+ - exec :
61
+ commandLine : |
62
+ GOPATH=${PROJECT_SOURCE}/.go \
63
+ GOCACHE=${PROJECT_SOURCE}/.cache \
64
+ dlv \
65
+ --listen=127.0.0.1:${DEBUG_PORT} \
66
+ --only-same-user=false \
67
+ --headless=true \
68
+ --api-version=2 \
69
+ --accept-multiclient \
70
+ debug --continue main.go
71
+ component : runtime
72
+ group :
73
+ isDefault : true
74
+ kind : debug
75
+ workingDir : ${PROJECT_SOURCE}
76
+ id : debug
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ metadata:
6
6
icon : https://raw.githubusercontent.com/devfile-samples/devfile-stack-icons/main/golang.svg
7
7
tags :
8
8
- Go
9
+ - Deprecated
9
10
projectType : Go
10
11
language : Go
11
12
provider : Red Hat
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ metadata:
6
6
icon : https://raw.githubusercontent.com/devfile-samples/devfile-stack-icons/main/golang.svg
7
7
tags :
8
8
- Go
9
+ - Deprecated
9
10
projectType : Go
10
11
language : Go
11
12
provider : Red Hat
Original file line number Diff line number Diff line change
1
+ schemaVersion : 2.2.0
2
+ metadata :
3
+ name : go
4
+ displayName : Go Runtime
5
+ description : Go (version 1.19.x) is an open source programming language that makes it easy to build simple, reliable, and efficient software.
6
+ icon : https://raw.githubusercontent.com/devfile-samples/devfile-stack-icons/main/golang.svg
7
+ tags :
8
+ - Go
9
+ projectType : Go
10
+ language : Go
11
+ provider : Red Hat
12
+ version : 2.2.0
13
+ starterProjects :
14
+ - name : go-starter
15
+ description : A Go project with a simple HTTP server
16
+ git :
17
+ checkoutFrom :
18
+ revision : main
19
+ remotes :
20
+ origin : https://github.com/devfile-samples/devfile-stack-go.git
21
+ components :
22
+ - name : build
23
+ image :
24
+ imageName : go-image:latest
25
+ dockerfile :
26
+ uri : docker/Dockerfile
27
+ buildContext : .
28
+ rootRequired : false
29
+ - name : deploy
30
+ kubernetes :
31
+ uri : kubernetes/deploy.yaml
32
+ endpoints :
33
+ - name : http-8081
34
+ targetPort : 8081
35
+ - container :
36
+ endpoints :
37
+ - name : http-go
38
+ targetPort : 8080
39
+ - exposure : none
40
+ name : debug
41
+ targetPort : 5858
42
+ image : registry.access.redhat.com/ubi9/go-toolset:1.19.13-4.1697647145
43
+ args : ['tail', '-f', '/dev/null']
44
+ env :
45
+ - name : DEBUG_PORT
46
+ value : ' 5858'
47
+ memoryLimit : 1024Mi
48
+ mountSources : true
49
+ name : runtime
50
+ commands :
51
+ - id : build-image
52
+ apply :
53
+ component : build
54
+ - id : deployk8s
55
+ apply :
56
+ component : deploy
57
+ - id : deploy
58
+ composite :
59
+ commands :
60
+ - build-image
61
+ - deployk8s
62
+ group :
63
+ kind : deploy
64
+ isDefault : true
65
+ - exec :
66
+ env :
67
+ - name : GOPATH
68
+ value : ${PROJECT_SOURCE}/.go
69
+ - name : GOCACHE
70
+ value : ${PROJECT_SOURCE}/.cache
71
+ commandLine : go build main.go
72
+ component : runtime
73
+ group :
74
+ isDefault : true
75
+ kind : build
76
+ workingDir : ${PROJECT_SOURCE}
77
+ id : build
78
+ - exec :
79
+ commandLine : ./main
80
+ component : runtime
81
+ group :
82
+ isDefault : true
83
+ kind : run
84
+ workingDir : ${PROJECT_SOURCE}
85
+ id : run
86
+
87
+ - exec :
88
+ commandLine : |
89
+ GOPATH=${PROJECT_SOURCE}/.go \
90
+ GOCACHE=${PROJECT_SOURCE}/.cache \
91
+ dlv \
92
+ --listen=127.0.0.1:${DEBUG_PORT} \
93
+ --only-same-user=false \
94
+ --headless=true \
95
+ --api-version=2 \
96
+ --accept-multiclient \
97
+ debug --continue main.go
98
+ component : runtime
99
+ group :
100
+ isDefault : true
101
+ kind : debug
102
+ workingDir : ${PROJECT_SOURCE}
103
+ id : debug
Original file line number Diff line number Diff line change
1
+ FROM registry.access.redhat.com/ubi9/go-toolset:1.19.13-4.1697647145
2
+
3
+ COPY go.mod ./
4
+ RUN go mod download
5
+
6
+ COPY *.go ./
7
+
8
+ RUN go build -o ./main
9
+
10
+ EXPOSE 8081
11
+
12
+ CMD [ "./main" , "-p=8081" ]
Original file line number Diff line number Diff line change
1
+ kind : Service
2
+ apiVersion : v1
3
+ metadata :
4
+ name : my-go-svc
5
+ spec :
6
+ ports :
7
+ - name : http-8081
8
+ port : 8081
9
+ protocol : TCP
10
+ targetPort : 8081
11
+ selector :
12
+ app : go-app
13
+ ---
14
+ kind : Deployment
15
+ apiVersion : apps/v1
16
+ metadata :
17
+ name : my-go
18
+ spec :
19
+ replicas : 1
20
+ selector :
21
+ matchLabels :
22
+ app : go-app
23
+ template :
24
+ metadata :
25
+ labels :
26
+ app : go-app
27
+ spec :
28
+ containers :
29
+ - name : my-go
30
+ image : go-image:latest
31
+ ports :
32
+ - name : http
33
+ containerPort : 8081
34
+ protocol : TCP
35
+ resources :
36
+ requests :
37
+ memory : " 10Mi"
38
+ cpu : " 10m"
39
+ limits :
40
+ memory : " 100Mi"
41
+ cpu : " 100m"
Original file line number Diff line number Diff line change @@ -4,9 +4,13 @@ displayName: Go Runtime
4
4
icon : https://raw.githubusercontent.com/devfile-samples/devfile-stack-icons/main/golang.svg
5
5
versions :
6
6
- version : 1.0.2
7
- default : true # should have one and only one default version
8
7
# 1.1.0: debug command via dlv
9
8
- version : 1.1.0
9
+ # 1.2.0: debug command via dlv & go 1.19
10
+ - version : 1.2.0
11
+ default : true # should have one and only one default version
10
12
- version : 2.0.0
11
13
# 2.1.0: debug command via dlv
12
14
- version : 2.1.0
15
+ # 2.2.0: debug command via dlv & go 1.19
16
+ - version : 2.2.0
You can’t perform that action at this time.
0 commit comments