Closed v1v closed 1 year ago
the below badges are clickable and redirect to their specific view in the CI or DOCS
#### Build stats * Start Time: 2023-02-07T08:27:01.978+0000 * Duration: 5 min 12 sec #### Test stats :test_tube: | Test | Results | | ------------ | :-----------------------------: | | Failed | 0 | | Passed | 21 | | Skipped | 0 | | Total | 21 |
To re-run your PR in the CI, just comment with: - `/test` : Re-trigger the build.
Do we want to bump the version to the latest go version or the latest go minor version?
Do we want to bump the version to the latest go version or the latest go minor version?
There was no go minor version set in https://github.com/elastic/apm-pipeline-library/blob/d592c5e95a467213bb6f97ed24fe0cf5068d9ea7/.ci/.bump-go-release-version.yml#L99-L104 so It gets the latest available minor version
What does this PR do?
Automate the golang bump within the project itself using updatecli and github actions
Why is it important?
Remove the dependency with Jenkins and the definition of what to do in apm-pipeline-library
Use updatecli that provides the tooling for bumping versions
Issues
Similar to https://github.com/elastic/beats/pull/34458
Test
does nothing in terms of changing if no a new version.
if a new version is available then it bumps all those files as expected
Expand to view
``` +++++++++++ + PREPARE + +++++++++++ Loading Pipeline ".ci/bump-golang.yml" SCM repository retrieved: 1 ++++++++++++++++++ + AUTO DISCOVERY + ++++++++++++++++++ ++++++++++++ + PIPELINE + ++++++++++++ ######################################### # BUMP GOLANG-VERSION TO LATEST VERSION # ######################################### SOURCES ======= latestGoVersion --------------- WARNING: β No GitHub Release found, we fallback to published git tags Searching for version matching pattern "go1\\.(\\d+)(\\.(\\d+))?$" β Github Release version "go1.20" found matching pattern "go1\\.(\\d+)(\\.(\\d+))?$" CHANGELOG: ---------- no GitHub Release found for go1.20 on "https://github.com/golang/go" gomod ----- The shell π command "echo 1.20" ran successfully with the following output: ---- 1.20 ---- CONDITIONS: =========== dockerTag --------- β The Docker image index.docker.io/library/golang:1.20 (amd64) exists and is available. goDefaultVersion-check ---------------------- The shell π command "grep -v -q 1.20 .go-version # 1.20" ran successfully with the following output: ---- ---- TARGETS ======== update-dockerfiles ------------------ **Dry Run enabled** β updated the [dry run] content of the file "/var/folders/hn/j6gds1qx1f5bysfn0qp0t03c0000gn/T/updatecli/github/elastic/stream/Dockerfile" --- /var/folders/hn/j6gds1qx1f5bysfn0qp0t03c0000gn/T/updatecli/github/elastic/stream/Dockerfile +++ /var/folders/hn/j6gds1qx1f5bysfn0qp0t03c0000gn/T/updatecli/github/elastic/stream/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.19.5 as builder +FROM golang:1.20 as builder RUN apt-get update \ && apt-get dist-upgrade -y \ update-go-version ----------------- **Dry Run enabled** β updated the [dry run] content of the file "/var/folders/hn/j6gds1qx1f5bysfn0qp0t03c0000gn/T/updatecli/github/elastic/stream/.go-version" --- /var/folders/hn/j6gds1qx1f5bysfn0qp0t03c0000gn/T/updatecli/github/elastic/stream/.go-version +++ /var/folders/hn/j6gds1qx1f5bysfn0qp0t03c0000gn/T/updatecli/github/elastic/stream/.go-version @@ -1 +1 @@ -1.19.5 +1.20 update-gomod ------------ **Dry Run enabled** β updated the [dry run] content of the file "/var/folders/hn/j6gds1qx1f5bysfn0qp0t03c0000gn/T/updatecli/github/elastic/stream/go.mod" --- /var/folders/hn/j6gds1qx1f5bysfn0qp0t03c0000gn/T/updatecli/github/elastic/stream/go.mod +++ /var/folders/hn/j6gds1qx1f5bysfn0qp0t03c0000gn/T/updatecli/github/elastic/stream/go.mod @@ -1,6 +1,6 @@ module github.com/elastic/stream -go 1.19 +go 1.20 require ( cloud.google.com/go/pubsub v1.25.1 ACTIONS ======== WARNING: **Fallback** Please add a title to you configuration using the field 'title:'
[Dry Run] An action of kind "github/pullrequest" is expected.
=============================
REPORTS:
β Bump golang-version to latest version:
Source:
β [gomod] Get version in go.mod format (kind: shell)
β [latestGoVersion] Get Latest Go Release (kind: githubrelease)
Condition:
β [dockerTag] Is docker image golang:1.20 published (kind: dockerimage)
β [goDefaultVersion-check] Check if defined golang version differs (kind: shell)
Target:
β [update-dockerfiles] Update from dockerfiles (kind: file)
β [update-go-version] Update .go-version (kind: file)
β [update-gomod] Update go.mod (kind: file)
Run Summary
===========
Pipeline(s) run:
* Changed: 1
* Failed: 0
* Skipped: 0
* Succeeded: 0
* Total: 1
```
https://github.com/elastic/beats/pull/34486 was created to test these changes