1
0
mirror of https://github.com/openshift/source-to-image.git synced 2026-02-05 12:44:54 +01:00

Update golang to 1.23

Changes:
- Update go.mod to 1.23
- Update Dockerfiles and CI
This commit is contained in:
Sayan Biswas
2025-05-22 00:58:31 +05:30
committed by Sayan Biswas
parent 50dfa7cba9
commit 26d3bd019f
9 changed files with 10 additions and 7 deletions

View File

@@ -1,4 +1,4 @@
build_root_image: build_root_image:
name: release name: release
namespace: openshift namespace: openshift
tag: rhel-8-golang-1.22-openshift-4.16 tag: rhel-9-golang-1.23-openshift-4.19

View File

@@ -9,7 +9,7 @@ metadata:
pipelinesascode.tekton.dev/max-keep-runs: "3" pipelinesascode.tekton.dev/max-keep-runs: "3"
pipelinesascode.tekton.dev/on-cel-expression: | pipelinesascode.tekton.dev/on-cel-expression: |
event == "pull_request" && event == "pull_request" &&
target_branch == "master" target_branch == "master" &&
( (
files.all.exists(x, x.matches('cmd/|pkg/')) || files.all.exists(x, x.matches('cmd/|pkg/')) ||
files.all.exists(x, x.matches('go.mod|go.sum|rhel8.Dockerfile')) || files.all.exists(x, x.matches('go.mod|go.sum|rhel8.Dockerfile')) ||

View File

@@ -33,7 +33,7 @@ spec:
value: rhel9.Dockerfile value: rhel9.Dockerfile
- name: build-source-image - name: build-source-image
value: "true" value: "true"
- name: hermatic - name: hermetic
value: "true" value: "true"
- name: build-platforms - name: build-platforms
value: value:

View File

@@ -11,6 +11,7 @@
OUT_DIR = _output OUT_DIR = _output
export GOFLAGS export GOFLAGS
export S2I_BUILD_TAGS = "exclude_graphdriver_btrfs"
VERSION = latest VERSION = latest
CONTAINER_ENGINE = podman CONTAINER_ENGINE = podman

2
go.mod
View File

@@ -1,6 +1,6 @@
module github.com/openshift/source-to-image module github.com/openshift/source-to-image
go 1.22.0 go 1.23.0
require ( require (
github.com/containers/image/v5 v5.31.1 github.com/containers/image/v5 v5.31.1

View File

@@ -21,6 +21,7 @@ S2I_OUTPUT_BINPATH="${S2I_OUTPUT}/bin"
S2I_OUTPUT_PKGDIR="${S2I_OUTPUT}/pkgdir" S2I_OUTPUT_PKGDIR="${S2I_OUTPUT}/pkgdir"
S2I_LOCAL_BINPATH="${S2I_OUTPUT}/go/bin" S2I_LOCAL_BINPATH="${S2I_OUTPUT}/go/bin"
S2I_LOCAL_RELEASEPATH="${S2I_OUTPUT}/releases" S2I_LOCAL_RELEASEPATH="${S2I_OUTPUT}/releases"
S2I_BUILD_TAGS="${S2I_BUILD_TAGS:-}"
RELEASE_LDFLAGS=${RELEASE_LDFLAGS:-""} RELEASE_LDFLAGS=${RELEASE_LDFLAGS:-""}
@@ -97,6 +98,7 @@ s2i::build::build_binaries() {
CGO_ENABLED=0 go install "${goflags[@]:+${goflags[@]}}" \ CGO_ENABLED=0 go install "${goflags[@]:+${goflags[@]}}" \
-pkgdir "${S2I_OUTPUT_PKGDIR}" \ -pkgdir "${S2I_OUTPUT_PKGDIR}" \
-ldflags "${version_ldflags} ${RELEASE_LDFLAGS}" \ -ldflags "${version_ldflags} ${RELEASE_LDFLAGS}" \
-tags "${S2I_BUILD_TAGS}" \
-mod vendor \ -mod vendor \
"${binaries[@]}" "${binaries[@]}"
s2i::build::unset_platform_envs "${platform}" s2i::build::unset_platform_envs "${platform}"

View File

@@ -3,7 +3,7 @@
# #
# The standard name for this image is openshift/sti-release # The standard name for this image is openshift/sti-release
# #
FROM registry.redhat.io/ubi9/go-toolset:1.22.9 AS builder FROM registry.redhat.io/ubi9/go-toolset:1.23 AS builder
USER root USER root
ENV S2I_VERSION_FILE=/opt/app-root/src/source-to-image/sti-version-defs ENV S2I_VERSION_FILE=/opt/app-root/src/source-to-image/sti-version-defs

View File

@@ -1,4 +1,4 @@
FROM registry.access.redhat.com/ubi8/go-toolset:1.22 AS builder FROM registry.access.redhat.com/ubi8/go-toolset:1.23 AS builder
ENV S2I_GIT_VERSION="1.5.0" \ ENV S2I_GIT_VERSION="1.5.0" \
S2I_GIT_MAJOR="1" \ S2I_GIT_MAJOR="1" \

View File

@@ -1,4 +1,4 @@
FROM registry.access.redhat.com/ubi8/go-toolset:1.22 AS builder FROM registry.access.redhat.com/ubi8/go-toolset:1.23 AS builder
ENV S2I_GIT_VERSION="1.5.0" \ ENV S2I_GIT_VERSION="1.5.0" \
S2I_GIT_MAJOR="1" \ S2I_GIT_MAJOR="1" \
S2I_GIT_MINOR="5" S2I_GIT_MINOR="5"