Skip to content

Commit 26e145d

Browse files
niki4Ivan NikiforovCCFenner
authored
chore(deps): Update go version 1.24 (#5277)
* Bump go version 1.23.4->1.24 * Update go version 1.24.0 for github workflows * Update go version 1.23.4->1.24.0 for docker images * Replace deprecated cipher.NewCFBDecrypter/NewCFBEncrypter * Fix go vet error: non-constant format string * Fix go vet error: non-constant format string * Update cmd/golangBuild.go Co-authored-by: Christopher Fenner <[email protected]> --------- Co-authored-by: Ivan Nikiforov <[email protected]> Co-authored-by: Christopher Fenner <[email protected]>
1 parent 8be029f commit 26e145d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+98
-98
lines changed

.github/workflows/documentation.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323

2424
- uses: actions/setup-go@v5
2525
with:
26-
go-version: '1.23.4'
26+
go-version: '1.24.0'
2727

2828
- name: Install Groovy
2929
run: sudo apt-get update && sudo apt-get install groovy -y

.github/workflows/update-go-dependencies.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
- uses: actions/checkout@v4
1414
- uses: actions/setup-go@v5
1515
with:
16-
go-version: '1.23.4'
16+
go-version: '1.24.0'
1717
- name: Perform update
1818
run: |
1919
git checkout -B gh-action-update-golang-dependencies

.github/workflows/upload-go-master.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
- uses: actions/checkout@v4
1414
- uses: actions/setup-go@v5
1515
with:
16-
go-version: '1.23.4'
16+
go-version: '1.24.0'
1717
- env:
1818
CGO_ENABLED: 0
1919
run: |

.github/workflows/verify-go.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- uses: styfle/[email protected]
1616
- uses: actions/setup-go@v5
1717
with:
18-
go-version: '1.23.4'
18+
go-version: '1.24.0'
1919
- name: Cache Golang Packages
2020
uses: actions/cache@v3
2121
with:
@@ -43,7 +43,7 @@ jobs:
4343
steps:
4444
- uses: actions/setup-go@v5
4545
with:
46-
go-version: '1.23.4'
46+
go-version: '1.24.0'
4747
- name: Cache Golang Packages
4848
uses: actions/cache@v3
4949
with:
@@ -63,7 +63,7 @@ jobs:
6363
steps:
6464
- uses: actions/setup-go@v5
6565
with:
66-
go-version: '1.23.4'
66+
go-version: '1.24.0'
6767
- name: checkout
6868
uses: actions/checkout@v4
6969
with:
@@ -78,7 +78,7 @@ jobs:
7878
steps:
7979
- uses: actions/setup-go@v5
8080
with:
81-
go-version: '1.23.4'
81+
go-version: '1.24.0'
8282
- name: Cache Golang Packages
8383
uses: actions/cache@v3
8484
with:
@@ -98,7 +98,7 @@ jobs:
9898
steps:
9999
- uses: actions/setup-go@v5
100100
with:
101-
go-version: '1.23.4'
101+
go-version: '1.24.0'
102102
- name: Cache Golang Packages
103103
uses: actions/cache@v3
104104
with:

Dockerfile

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.23.4 AS build-env
1+
FROM golang:1.24.0 AS build-env
22
COPY . /build
33
WORKDIR /build
44

@@ -11,13 +11,13 @@ RUN go test ./... -tags=unit -cover
1111
RUN export GIT_COMMIT=$(git rev-parse HEAD) && \
1212
export GIT_REPOSITORY=$(git config --get remote.origin.url) && \
1313
CGO_ENABLED=0 go build \
14-
-ldflags \
15-
"-X github.com/SAP/jenkins-library/cmd.GitCommit=${GIT_COMMIT} \
16-
-X github.com/SAP/jenkins-library/pkg/log.LibraryRepository=${GIT_REPOSITORY} \
17-
-X github.com/SAP/jenkins-library/pkg/log.LibraryName=piper-lib-os \
18-
-X github.com/SAP/jenkins-library/pkg/telemetry.LibraryRepository=${GIT_REPOSITORY}" \
19-
-tags release \
20-
-o piper
14+
-ldflags \
15+
"-X github.com/SAP/jenkins-library/cmd.GitCommit=${GIT_COMMIT} \
16+
-X github.com/SAP/jenkins-library/pkg/log.LibraryRepository=${GIT_REPOSITORY} \
17+
-X github.com/SAP/jenkins-library/pkg/log.LibraryName=piper-lib-os \
18+
-X github.com/SAP/jenkins-library/pkg/telemetry.LibraryRepository=${GIT_REPOSITORY}" \
19+
-tags release \
20+
-o piper
2121

2222
# FROM gcr.io/distroless/base:latest
2323
# COPY --from=build-env /build/piper /piper

cmd/abapEnvironmentAssembleConfirm.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ func startingConfirm(repos []abaputils.Repository, conn abapbuild.Connector, del
9898
if releasePackagesFailed == nil {
9999
releasePackagesFailed = errors.New(errormessage)
100100
} else {
101-
releasePackagesFailed = errors.Wrapf(releasePackagesFailed, errormessage)
101+
releasePackagesFailed = errors.Wrap(releasePackagesFailed, errormessage)
102102
}
103103
} else {
104104
log.Entry().Infof("Packages %s was not assembled in this pipeline run, thus no need to confirm", repo.PackageName)

cmd/abapEnvironmentCloneGitRepo.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ func cloneSingleRepo(apiManager abaputils.SoftwareComponentApiManagerInterface,
101101

102102
alreadyCloned, activeBranch, errCheckCloned, isByog := api.GetRepository()
103103
if errCheckCloned != nil {
104-
return errors.Wrapf(errCheckCloned, errorString)
104+
return errors.Wrap(errCheckCloned, errorString)
105105
}
106106

107107
if !alreadyCloned {
@@ -110,22 +110,22 @@ func cloneSingleRepo(apiManager abaputils.SoftwareComponentApiManagerInterface,
110110
}
111111
errClone := api.Clone()
112112
if errClone != nil {
113-
return errors.Wrapf(errClone, errorString)
113+
return errors.Wrap(errClone, errorString)
114114
}
115115
// set correct filename for archive file
116116
logOutputManager.FileNameStep = "clone"
117117
status, errorPollEntity := abaputils.PollEntity(api, apiManager.GetPollIntervall(), logOutputManager)
118118
if errorPollEntity != nil {
119-
return errors.Wrapf(errorPollEntity, errorString)
119+
return errors.Wrap(errorPollEntity, errorString)
120120
}
121121
if status == "E" {
122122
return errors.New("Clone of " + logString + " failed on the ABAP System")
123123
}
124124
log.Entry().Info("The " + logString + " was cloned successfully")
125125
} else {
126126
abaputils.AddDefaultDashedLine(2)
127-
log.Entry().Infof("%s", "The repository / software component has already been cloned on the ABAP Environment system ")
128-
log.Entry().Infof("%s", "If required, a `checkout branch`, and a `pull` will be performed instead")
127+
log.Entry().Info("The repository / software component has already been cloned on the ABAP Environment system ")
128+
log.Entry().Info("If required, a `checkout branch`, and a `pull` will be performed instead")
129129
abaputils.AddDefaultDashedLine(2)
130130
var returnedError error
131131
if repo.Branch != "" && !(activeBranch == repo.Branch) {

cmd/abapEnvironmentCreateTag.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ func createTags(backlog []abaputils.CreateTagBacklog, con abaputils.ConnectionDe
6262

6363
if errorOccurred {
6464
message := "At least one tag has not been created"
65-
log.Entry().Errorf(message)
65+
log.Entry().Error(message)
6666
return errors.New(message)
6767
}
6868
return nil
@@ -94,7 +94,7 @@ func createSingleTag(item abaputils.CreateTagBacklog, index int, con abaputils.C
9494

9595
createTagError := api.CreateTag(item.Tags[index])
9696
if createTagError != nil {
97-
return errors.Wrapf(err, "Creation of Tag failed on the ABAP system")
97+
return errors.Wrap(err, "Creation of Tag failed on the ABAP system")
9898
}
9999

100100
logOutputManager := abaputils.LogOutputManager{

cmd/abapEnvironmentPullGitRepo.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,15 +106,15 @@ func handlePull(repo abaputils.Repository, con abaputils.ConnectionDetailsHTTP,
106106

107107
err = api.Pull()
108108
if err != nil {
109-
return errors.Wrapf(err, errorString)
109+
return errors.Wrap(err, errorString)
110110
}
111111

112112
// set correct filename for archive file
113113
logOutputManager.FileNameStep = "pull"
114114
// Polling the status of the repository import on the ABAP Environment system
115115
status, errorPollEntity := abaputils.PollEntity(api, apiManager.GetPollIntervall(), logOutputManager)
116116
if errorPollEntity != nil {
117-
return errors.Wrapf(errorPollEntity, errorString)
117+
return errors.Wrap(errorPollEntity, errorString)
118118
}
119119
if status == "E" {
120120
return errors.New(errorString)

cmd/abapEnvironmentPushATCSystemConfig.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ func checkATCSystemConfigurationFile(config *abapEnvironmentPushATCSystemConfigO
127127
//check if parsedConfigurationJson is not initial or Configuration Name not supplied
128128
if reflect.DeepEqual(parsedConfigurationJson, emptyConfigurationJson) ||
129129
parsedConfigurationJson.ConfName == "" {
130-
return parsedConfigurationJson, atcSystemConfiguartionJsonFile, errors.Errorf("pushing ATC System Configuration failed. Reason: Configured File does not contain required ATC System Configuration attributes (File: " + config.AtcSystemConfigFilePath + ")")
130+
return parsedConfigurationJson, atcSystemConfiguartionJsonFile, errors.Errorf("pushing ATC System Configuration failed. Reason: Configured File does not contain required ATC System Configuration attributes (File: %s)", config.AtcSystemConfigFilePath)
131131
}
132132

133133
return parsedConfigurationJson, atcSystemConfiguartionJsonFile, nil
@@ -145,7 +145,7 @@ func readATCSystemConfigurationFile(config *abapEnvironmentPushATCSystemConfigOp
145145
}
146146

147147
if len(filelocation) == 0 {
148-
return parsedConfigurationJson, atcSystemConfiguartionJsonFile, errors.Errorf("pushing ATC System Configuration failed. Reason: Configured Filelocation is empty (File: " + config.AtcSystemConfigFilePath + ")")
148+
return parsedConfigurationJson, atcSystemConfiguartionJsonFile, errors.Errorf("pushing ATC System Configuration failed. Reason: Configured Filelocation is empty (File: %s)", config.AtcSystemConfigFilePath)
149149
}
150150

151151
filename, err = filepath.Abs(filelocation[0])
@@ -157,7 +157,7 @@ func readATCSystemConfigurationFile(config *abapEnvironmentPushATCSystemConfigOp
157157
return parsedConfigurationJson, atcSystemConfiguartionJsonFile, err
158158
}
159159
if len(atcSystemConfiguartionJsonFile) == 0 {
160-
return parsedConfigurationJson, atcSystemConfiguartionJsonFile, errors.Errorf("pushing ATC System Configuration failed. Reason: Configured File is empty (File: " + config.AtcSystemConfigFilePath + ")")
160+
return parsedConfigurationJson, atcSystemConfiguartionJsonFile, errors.Errorf("pushing ATC System Configuration failed. Reason: Configured File is empty (File: %s)", config.AtcSystemConfigFilePath)
161161
}
162162

163163
err = json.Unmarshal(atcSystemConfiguartionJsonFile, &parsedConfigurationJson)

0 commit comments

Comments
 (0)