Chore: Upgrade Go to 1.21.5 (#79329)

* bumping grafanas go version to 1.21.5

* adding how to upgrade go doc

* removing the whole ci-build and corresponding pipelines

* clarifying that we have to run make drone

* fixing starlark linter and removing unused code

* Adding note about enterprise

* trying to change the underyling image to avoid musl issues

* only need to golang one
This commit is contained in:
Timur Olzhabayev
2023-12-15 10:36:49 +01:00
committed by GitHub
parent 79fca7dce4
commit 4991e71b85
18 changed files with 134 additions and 435 deletions

View File

@ -2,10 +2,6 @@
This module contains steps and pipelines relating to creating CI Docker images.
"""
load(
"scripts/drone/utils/images.star",
"images",
)
load(
"scripts/drone/utils/utils.star",
"pipeline",
@ -17,7 +13,6 @@ load(
load(
"scripts/drone/vault.star",
"from_secret",
"gcp_download_build_container_assets_key",
)
def publish_ci_windows_test_image_pipeline():
@ -69,50 +64,3 @@ def publish_ci_windows_test_image_pipeline():
}
return [pl]
def publish_ci_build_container_image_pipeline():
trigger = {
"event": ["promote"],
"target": ["ci-build-container-image"],
}
pl = pipeline(
name = "publish-ci-build-container-image",
trigger = trigger,
steps = [
{
"name": "validate-version",
"image": images["alpine"],
"commands": [
"if [ -z \"${BUILD_CONTAINER_VERSION}\" ]; then echo Missing BUILD_CONTAINER_VERSION; false; fi",
],
},
{
"name": "download-macos-sdk",
"image": images["cloudsdk"],
"environment": {
"GCP_KEY": from_secret(gcp_download_build_container_assets_key),
},
"commands": [
"printenv GCP_KEY > /tmp/key.json",
"gcloud auth activate-service-account --key-file=/tmp/key.json",
"gsutil cp gs://grafana-private-downloads/MacOSX10.15.sdk.tar.xz ./scripts/build/ci-build/MacOSX10.15.sdk.tar.xz",
],
},
{
"name": "build-and-publish", # Consider splitting the build and the upload task.
"image": images["cloudsdk"],
"volumes": [{"name": "docker", "path": "/var/run/docker.sock"}],
"environment": {
"DOCKER_USERNAME": from_secret("docker_username"),
"DOCKER_PASSWORD": from_secret("docker_password"),
},
"commands": [
"printenv DOCKER_PASSWORD | docker login -u \"$DOCKER_USERNAME\" --password-stdin",
"docker build -t \"grafana/build-container:${BUILD_CONTAINER_VERSION}\" ./scripts/build/ci-build",
"docker push \"grafana/build-container:${BUILD_CONTAINER_VERSION}\"",
],
},
],
)
return [pl]

View File

@ -8,9 +8,10 @@ load(
"nodejs_version",
)
# "go" image can be switched back to golang:{}-alpine once this is resolved https://github.com/mattn/go-sqlite3/pull/1177#issuecomment-1849176090
images = {
"git": "alpine/git:2.40.1",
"go": "golang:{}-alpine".format(golang_version),
"go": "golang:{}-alpine3.18".format(golang_version),
"node": "node:{}-alpine".format(nodejs_version),
"cloudsdk": "google/cloud-sdk:431.0.0",
"publish": "grafana/grafana-ci-deploy:1.3.3",

View File

@ -3,7 +3,7 @@ global variables
"""
grabpl_version = "v3.0.42"
golang_version = "1.21.3"
golang_version = "1.21.5"
# nodejs_version should match what's in ".nvmrc", but without the v prefix.
nodejs_version = "20.9.0"