From ac769f70f13e47652a11665599a36cac77401cf0 Mon Sep 17 00:00:00 2001 From: Michael Valdron Date: Wed, 9 Jul 2025 15:14:23 -0400 Subject: [PATCH 1/2] go 1.24 for 1.x stack Signed-off-by: Michael Valdron --- stacks/go/1.4.0/devfile.yaml | 79 ++++++++++++++++++++++++++++++++++++ stacks/go/stack.yaml | 2 + 2 files changed, 81 insertions(+) create mode 100644 stacks/go/1.4.0/devfile.yaml diff --git a/stacks/go/1.4.0/devfile.yaml b/stacks/go/1.4.0/devfile.yaml new file mode 100644 index 000000000..0db71903b --- /dev/null +++ b/stacks/go/1.4.0/devfile.yaml @@ -0,0 +1,79 @@ +schemaVersion: 2.2.0 +metadata: + name: go + displayName: Go Runtime + description: Go (version 1.24.x) is an open source programming language that makes it easy to build simple, reliable, and efficient software. + icon: https://raw.githubusercontent.com/devfile-samples/devfile-stack-icons/main/golang.svg + tags: + - Go + projectType: Go + language: Go + provider: Red Hat + version: 1.4.0 +starterProjects: + - name: go-starter + description: A Go project with a simple HTTP server + git: + checkoutFrom: + revision: main + remotes: + origin: https://github.com/devfile-samples/devfile-stack-go.git +components: + - container: + endpoints: + - name: https-go + targetPort: 8080 + protocol: https + - exposure: none + name: debug + targetPort: 5858 + image: registry.access.redhat.com/ubi9/go-toolset:1.24.4-1752083840 + args: ["tail", "-f", "/dev/null"] + env: + - name: DEBUG_PORT + value: '5858' + memoryLimit: 1024Mi + mountSources: true + name: runtime +commands: + - exec: + env: + - name: GOPATH + value: ${PROJECT_SOURCE}/.go + - name: GOCACHE + value: ${PROJECT_SOURCE}/.cache + commandLine: go build main.go + component: runtime + group: + isDefault: true + kind: build + workingDir: ${PROJECT_SOURCE} + id: build + - exec: + commandLine: ./main + component: runtime + group: + isDefault: true + kind: run + workingDir: ${PROJECT_SOURCE} + id: run + - exec: + env: + - name: GOPATH + value: ${PROJECT_SOURCE}/.go + - name: GOCACHE + value: ${PROJECT_SOURCE}/.cache + commandLine: | + dlv \ + --listen=127.0.0.1:${DEBUG_PORT} \ + --only-same-user=false \ + --headless=true \ + --api-version=2 \ + --accept-multiclient \ + debug --continue main.go + component: runtime + group: + isDefault: true + kind: debug + workingDir: ${PROJECT_SOURCE} + id: debug diff --git a/stacks/go/stack.yaml b/stacks/go/stack.yaml index c23b0b236..15758164c 100644 --- a/stacks/go/stack.yaml +++ b/stacks/go/stack.yaml @@ -15,6 +15,8 @@ versions: - version: 1.3.0 # 1.3.1: use https protocol for endpoint - version: 1.3.1 + # 1.4.0: go 1.24 + - version: 1.4.0 - version: 2.0.0 # 2.1.0: debug command via dlv - version: 2.1.0 From e7341d84dab5b6a72d831d3e961a947c242a1d1d Mon Sep 17 00:00:00 2001 From: Michael Valdron Date: Wed, 16 Jul 2025 18:50:47 -0400 Subject: [PATCH 2/2] use stack version as starter project revision ref Signed-off-by: Michael Valdron --- stacks/go/1.4.0/devfile.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stacks/go/1.4.0/devfile.yaml b/stacks/go/1.4.0/devfile.yaml index 0db71903b..c0afd9abb 100644 --- a/stacks/go/1.4.0/devfile.yaml +++ b/stacks/go/1.4.0/devfile.yaml @@ -15,7 +15,7 @@ starterProjects: description: A Go project with a simple HTTP server git: checkoutFrom: - revision: main + revision: v1.4.0 remotes: origin: https://github.com/devfile-samples/devfile-stack-go.git components: