Skip to content

Commit bea3a02

Browse files
Go 1.24 for 1.x stack version (#621)
* go 1.24 for 1.x stack Signed-off-by: Michael Valdron <[email protected]> * use stack version as starter project revision ref Signed-off-by: Michael Valdron <[email protected]> --------- Signed-off-by: Michael Valdron <[email protected]>
1 parent be007a5 commit bea3a02

File tree

2 files changed

+81
-0
lines changed

2 files changed

+81
-0
lines changed

stacks/go/1.4.0/devfile.yaml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
schemaVersion: 2.2.0
2+
metadata:
3+
name: go
4+
displayName: Go Runtime
5+
description: Go (version 1.24.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.4.0
13+
starterProjects:
14+
- name: go-starter
15+
description: A Go project with a simple HTTP server
16+
git:
17+
checkoutFrom:
18+
revision: v1.4.0
19+
remotes:
20+
origin: https://github.com/devfile-samples/devfile-stack-go.git
21+
components:
22+
- container:
23+
endpoints:
24+
- name: https-go
25+
targetPort: 8080
26+
protocol: https
27+
- exposure: none
28+
name: debug
29+
targetPort: 5858
30+
image: registry.access.redhat.com/ubi9/go-toolset:1.24.4-1752083840
31+
args: ["tail", "-f", "/dev/null"]
32+
env:
33+
- name: DEBUG_PORT
34+
value: '5858'
35+
memoryLimit: 1024Mi
36+
mountSources: true
37+
name: runtime
38+
commands:
39+
- exec:
40+
env:
41+
- name: GOPATH
42+
value: ${PROJECT_SOURCE}/.go
43+
- name: GOCACHE
44+
value: ${PROJECT_SOURCE}/.cache
45+
commandLine: go build main.go
46+
component: runtime
47+
group:
48+
isDefault: true
49+
kind: build
50+
workingDir: ${PROJECT_SOURCE}
51+
id: build
52+
- exec:
53+
commandLine: ./main
54+
component: runtime
55+
group:
56+
isDefault: true
57+
kind: run
58+
workingDir: ${PROJECT_SOURCE}
59+
id: run
60+
- exec:
61+
env:
62+
- name: GOPATH
63+
value: ${PROJECT_SOURCE}/.go
64+
- name: GOCACHE
65+
value: ${PROJECT_SOURCE}/.cache
66+
commandLine: |
67+
dlv \
68+
--listen=127.0.0.1:${DEBUG_PORT} \
69+
--only-same-user=false \
70+
--headless=true \
71+
--api-version=2 \
72+
--accept-multiclient \
73+
debug --continue main.go
74+
component: runtime
75+
group:
76+
isDefault: true
77+
kind: debug
78+
workingDir: ${PROJECT_SOURCE}
79+
id: debug

stacks/go/stack.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ versions:
1515
- version: 1.3.0
1616
# 1.3.1: use https protocol for endpoint
1717
- version: 1.3.1
18+
# 1.4.0: go 1.24
19+
- version: 1.4.0
1820
- version: 2.0.0
1921
# 2.1.0: debug command via dlv
2022
- version: 2.1.0

0 commit comments

Comments
 (0)