[v10.4.x] CI: Additional changes for +security versions (#94926)

CI: Additional changes for +security versions (#94854)

* Build: Fix docker manifest create not using correct IMAGE_TAG

* Support publishing security versions of NPM packages

---------

Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
Co-authored-by: Kevin Minehart <kmineh0151@gmail.com>
Co-authored-by: Diego Augusto Molina <diegoaugustomolina@gmail.com>
(cherry picked from commit 8f7352e862)

Co-authored-by: Josh Hunt <joshhunt@users.noreply.github.com>
release-10.4.11 v10.4.11
Diego Augusto Molina 8 months ago committed by GitHub
parent 7cfb3ec25a
commit a40fee9162
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 72
      .drone.yml
  2. 3
      pkg/build/cmd/grafanacom.go
  3. 16
      pkg/build/cmd/npm.go
  4. 10
      pkg/build/packaging/artifacts.go
  5. 19
      pkg/build/versions/version.go
  6. 4
      scripts/drone/pipelines/publish_images.star
  7. 22
      scripts/drone/steps/lib.star
  8. 2
      scripts/drone/variables.star

@ -492,7 +492,7 @@ steps:
name: identify-runner name: identify-runner
- commands: - commands:
- mkdir -p bin - mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.53/grabpl - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.56/grabpl
- chmod +x bin/grabpl - chmod +x bin/grabpl
image: byrnedo/alpine-curl:0.1.8 image: byrnedo/alpine-curl:0.1.8
name: grabpl name: grabpl
@ -846,7 +846,7 @@ steps:
name: clone-enterprise name: clone-enterprise
- commands: - commands:
- mkdir -p bin - mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.53/grabpl - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.56/grabpl
- chmod +x bin/grabpl - chmod +x bin/grabpl
image: byrnedo/alpine-curl:0.1.8 image: byrnedo/alpine-curl:0.1.8
name: grabpl name: grabpl
@ -1765,7 +1765,7 @@ steps:
name: identify-runner name: identify-runner
- commands: - commands:
- mkdir -p bin - mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.53/grabpl - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.56/grabpl
- chmod +x bin/grabpl - chmod +x bin/grabpl
image: byrnedo/alpine-curl:0.1.8 image: byrnedo/alpine-curl:0.1.8
name: grabpl name: grabpl
@ -2216,7 +2216,7 @@ services:
steps: steps:
- commands: - commands:
- mkdir -p bin - mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.53/grabpl - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.56/grabpl
- chmod +x bin/grabpl - chmod +x bin/grabpl
image: byrnedo/alpine-curl:0.1.8 image: byrnedo/alpine-curl:0.1.8
name: grabpl name: grabpl
@ -2420,7 +2420,7 @@ steps:
name: identify-runner name: identify-runner
- commands: - commands:
- $$ProgressPreference = "SilentlyContinue" - $$ProgressPreference = "SilentlyContinue"
- Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.53/windows/grabpl.exe - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.56/windows/grabpl.exe
-OutFile grabpl.exe -OutFile grabpl.exe
image: grafana/ci-wix:0.1.1 image: grafana/ci-wix:0.1.1
name: windows-init name: windows-init
@ -2550,7 +2550,7 @@ steps:
name: identify-runner name: identify-runner
- commands: - commands:
- mkdir -p bin - mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.53/grabpl - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.56/grabpl
- chmod +x bin/grabpl - chmod +x bin/grabpl
image: byrnedo/alpine-curl:0.1.8 image: byrnedo/alpine-curl:0.1.8
name: grabpl name: grabpl
@ -2596,9 +2596,9 @@ steps:
$$debug docker push grafana/grafana-image-tags:$${IMAGE_TAG}-ubuntu-armv7 $$debug docker push grafana/grafana-image-tags:$${IMAGE_TAG}-ubuntu-armv7
# Create the grafana manifests # Create the grafana manifests
$$debug docker manifest create grafana/grafana:${TAG} grafana/grafana-image-tags:$${IMAGE_TAG}-amd64 grafana/grafana-image-tags:$${IMAGE_TAG}-arm64 grafana/grafana-image-tags:$${IMAGE_TAG}-armv7 $$debug docker manifest create grafana/grafana:$${IMAGE_TAG} grafana/grafana-image-tags:$${IMAGE_TAG}-amd64 grafana/grafana-image-tags:$${IMAGE_TAG}-arm64 grafana/grafana-image-tags:$${IMAGE_TAG}-armv7
$$debug docker manifest create grafana/grafana:${TAG}-ubuntu grafana/grafana-image-tags:$${IMAGE_TAG}-ubuntu-amd64 grafana/grafana-image-tags:$${IMAGE_TAG}-ubuntu-arm64 grafana/grafana-image-tags:$${IMAGE_TAG}-ubuntu-armv7 $$debug docker manifest create grafana/grafana:$${IMAGE_TAG}-ubuntu grafana/grafana-image-tags:$${IMAGE_TAG}-ubuntu-amd64 grafana/grafana-image-tags:$${IMAGE_TAG}-ubuntu-arm64 grafana/grafana-image-tags:$${IMAGE_TAG}-ubuntu-armv7
# Push the grafana manifests # Push the grafana manifests
$$debug docker manifest push grafana/grafana:$${IMAGE_TAG} $$debug docker manifest push grafana/grafana:$${IMAGE_TAG}
@ -2682,7 +2682,7 @@ steps:
name: identify-runner name: identify-runner
- commands: - commands:
- mkdir -p bin - mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.53/grabpl - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.56/grabpl
- chmod +x bin/grabpl - chmod +x bin/grabpl
image: byrnedo/alpine-curl:0.1.8 image: byrnedo/alpine-curl:0.1.8
name: grabpl name: grabpl
@ -2728,9 +2728,9 @@ steps:
$$debug docker push grafana/grafana-image-tags:$${IMAGE_TAG}-ubuntu-armv7 $$debug docker push grafana/grafana-image-tags:$${IMAGE_TAG}-ubuntu-armv7
# Create the grafana manifests # Create the grafana manifests
$$debug docker manifest create grafana/grafana:${TAG} grafana/grafana-image-tags:$${IMAGE_TAG}-amd64 grafana/grafana-image-tags:$${IMAGE_TAG}-arm64 grafana/grafana-image-tags:$${IMAGE_TAG}-armv7 $$debug docker manifest create grafana/grafana:$${IMAGE_TAG} grafana/grafana-image-tags:$${IMAGE_TAG}-amd64 grafana/grafana-image-tags:$${IMAGE_TAG}-arm64 grafana/grafana-image-tags:$${IMAGE_TAG}-armv7
$$debug docker manifest create grafana/grafana:${TAG}-ubuntu grafana/grafana-image-tags:$${IMAGE_TAG}-ubuntu-amd64 grafana/grafana-image-tags:$${IMAGE_TAG}-ubuntu-arm64 grafana/grafana-image-tags:$${IMAGE_TAG}-ubuntu-armv7 $$debug docker manifest create grafana/grafana:$${IMAGE_TAG}-ubuntu grafana/grafana-image-tags:$${IMAGE_TAG}-ubuntu-amd64 grafana/grafana-image-tags:$${IMAGE_TAG}-ubuntu-arm64 grafana/grafana-image-tags:$${IMAGE_TAG}-ubuntu-armv7
# Push the grafana manifests # Push the grafana manifests
$$debug docker manifest push grafana/grafana:$${IMAGE_TAG} $$debug docker manifest push grafana/grafana:$${IMAGE_TAG}
@ -2993,6 +2993,7 @@ platform:
services: [] services: []
steps: steps:
- commands: - commands:
- export version=$(echo ${TAG} | sed -e "s/+security-/-/g")
- 'echo "Step 1: Updating package lists..."' - 'echo "Step 1: Updating package lists..."'
- apt-get update >/dev/null 2>&1 - apt-get update >/dev/null 2>&1
- 'echo "Step 2: Installing prerequisites..."' - 'echo "Step 2: Installing prerequisites..."'
@ -3008,7 +3009,7 @@ steps:
- 'echo "Step 5: Installing Grafana..."' - 'echo "Step 5: Installing Grafana..."'
- for i in $(seq 1 60); do - for i in $(seq 1 60); do
- ' if apt-get update >/dev/null 2>&1 && DEBIAN_FRONTEND=noninteractive apt-get - ' if apt-get update >/dev/null 2>&1 && DEBIAN_FRONTEND=noninteractive apt-get
install -yq grafana=${TAG} >/dev/null 2>&1; then' install -yq grafana=$version >/dev/null 2>&1; then'
- ' echo "Command succeeded on attempt $i"' - ' echo "Command succeeded on attempt $i"'
- ' break' - ' break'
- ' else' - ' else'
@ -3022,10 +3023,10 @@ steps:
- ' fi' - ' fi'
- done - done
- 'echo "Step 6: Verifying Grafana installation..."' - 'echo "Step 6: Verifying Grafana installation..."'
- 'if dpkg -s grafana | grep -q "Version: ${TAG}"; then' - 'if dpkg -s grafana | grep -q "Version: $version"; then'
- ' echo "Successfully verified Grafana version ${TAG}"' - ' echo "Successfully verified Grafana version $version"'
- else - else
- ' echo "Failed to verify Grafana version ${TAG}"' - ' echo "Failed to verify Grafana version $version"'
- ' exit 1' - ' exit 1'
- fi - fi
- echo "Verification complete." - echo "Verification complete."
@ -3053,11 +3054,12 @@ steps:
sslcacert=/etc/pki/tls/certs/ca-bundle.crt sslcacert=/etc/pki/tls/certs/ca-bundle.crt
' > /etc/yum.repos.d/grafana.repo ' > /etc/yum.repos.d/grafana.repo
- 'echo "Step 5: Checking RPM repository..."' - 'echo "Step 5: Checking RPM repository..."'
- dnf list available grafana-${TAG} - export version=$(echo "${TAG}" | sed -e "s/+security-/^security_/g")
- dnf list available grafana-$version
- if [ $? -eq 0 ]; then - if [ $? -eq 0 ]; then
- ' echo "Grafana package found in repository. Installing from repo..."' - ' echo "Grafana package found in repository. Installing from repo..."'
- for i in $(seq 1 60); do - for i in $(seq 1 60); do
- ' if dnf install -y --nogpgcheck grafana-${TAG} >/dev/null 2>&1; then' - ' if dnf install -y --nogpgcheck grafana-$version >/dev/null 2>&1; then'
- ' echo "Command succeeded on attempt $i"' - ' echo "Command succeeded on attempt $i"'
- ' break' - ' break'
- ' else' - ' else'
@ -3074,16 +3076,16 @@ steps:
- ' rpm --import https://rpm.grafana.com/gpg.key' - ' rpm --import https://rpm.grafana.com/gpg.key'
- ' rpm -qa gpg-pubkey* | xargs rpm -qi | grep -i grafana' - ' rpm -qa gpg-pubkey* | xargs rpm -qi | grep -i grafana'
- else - else
- ' echo "Grafana package version ${TAG} not found in repository."' - ' echo "Grafana package version $version not found in repository."'
- ' dnf repolist' - ' dnf repolist'
- ' dnf list available grafana*' - ' dnf list available grafana*'
- ' exit 1' - ' exit 1'
- fi - fi
- 'echo "Step 6: Verifying Grafana installation..."' - 'echo "Step 6: Verifying Grafana installation..."'
- if rpm -q grafana | grep -q "${TAG}"; then - if rpm -q grafana | grep -q "$verison"; then
- ' echo "Successfully verified Grafana version ${TAG}"' - ' echo "Successfully verified Grafana version $version"'
- else - else
- ' echo "Failed to verify Grafana version ${TAG}"' - ' echo "Failed to verify Grafana version $version"'
- ' exit 1' - ' exit 1'
- fi - fi
- echo "Verification complete." - echo "Verification complete."
@ -3170,6 +3172,7 @@ steps:
from_secret: packages_service_account from_secret: packages_service_account
target_bucket: grafana-packages target_bucket: grafana-packages
- commands: - commands:
- export version=$(echo ${TAG} | sed -e "s/+security-/-/g")
- 'echo "Step 1: Updating package lists..."' - 'echo "Step 1: Updating package lists..."'
- apt-get update >/dev/null 2>&1 - apt-get update >/dev/null 2>&1
- 'echo "Step 2: Installing prerequisites..."' - 'echo "Step 2: Installing prerequisites..."'
@ -3185,7 +3188,7 @@ steps:
- 'echo "Step 5: Installing Grafana..."' - 'echo "Step 5: Installing Grafana..."'
- for i in $(seq 1 60); do - for i in $(seq 1 60); do
- ' if apt-get update >/dev/null 2>&1 && DEBIAN_FRONTEND=noninteractive apt-get - ' if apt-get update >/dev/null 2>&1 && DEBIAN_FRONTEND=noninteractive apt-get
install -yq grafana=${TAG} >/dev/null 2>&1; then' install -yq grafana=$version >/dev/null 2>&1; then'
- ' echo "Command succeeded on attempt $i"' - ' echo "Command succeeded on attempt $i"'
- ' break' - ' break'
- ' else' - ' else'
@ -3199,10 +3202,10 @@ steps:
- ' fi' - ' fi'
- done - done
- 'echo "Step 6: Verifying Grafana installation..."' - 'echo "Step 6: Verifying Grafana installation..."'
- 'if dpkg -s grafana | grep -q "Version: ${TAG}"; then' - 'if dpkg -s grafana | grep -q "Version: $version"; then'
- ' echo "Successfully verified Grafana version ${TAG}"' - ' echo "Successfully verified Grafana version $version"'
- else - else
- ' echo "Failed to verify Grafana version ${TAG}"' - ' echo "Failed to verify Grafana version $version"'
- ' exit 1' - ' exit 1'
- fi - fi
- echo "Verification complete." - echo "Verification complete."
@ -3231,11 +3234,12 @@ steps:
sslcacert=/etc/pki/tls/certs/ca-bundle.crt sslcacert=/etc/pki/tls/certs/ca-bundle.crt
' > /etc/yum.repos.d/grafana.repo ' > /etc/yum.repos.d/grafana.repo
- 'echo "Step 5: Checking RPM repository..."' - 'echo "Step 5: Checking RPM repository..."'
- dnf list available grafana-${TAG} - export version=$(echo "${TAG}" | sed -e "s/+security-/^security_/g")
- dnf list available grafana-$version
- if [ $? -eq 0 ]; then - if [ $? -eq 0 ]; then
- ' echo "Grafana package found in repository. Installing from repo..."' - ' echo "Grafana package found in repository. Installing from repo..."'
- for i in $(seq 1 60); do - for i in $(seq 1 60); do
- ' if dnf install -y --nogpgcheck grafana-${TAG} >/dev/null 2>&1; then' - ' if dnf install -y --nogpgcheck grafana-$version >/dev/null 2>&1; then'
- ' echo "Command succeeded on attempt $i"' - ' echo "Command succeeded on attempt $i"'
- ' break' - ' break'
- ' else' - ' else'
@ -3252,16 +3256,16 @@ steps:
- ' rpm --import https://rpm.grafana.com/gpg.key' - ' rpm --import https://rpm.grafana.com/gpg.key'
- ' rpm -qa gpg-pubkey* | xargs rpm -qi | grep -i grafana' - ' rpm -qa gpg-pubkey* | xargs rpm -qi | grep -i grafana'
- else - else
- ' echo "Grafana package version ${TAG} not found in repository."' - ' echo "Grafana package version $version not found in repository."'
- ' dnf repolist' - ' dnf repolist'
- ' dnf list available grafana*' - ' dnf list available grafana*'
- ' exit 1' - ' exit 1'
- fi - fi
- 'echo "Step 6: Verifying Grafana installation..."' - 'echo "Step 6: Verifying Grafana installation..."'
- if rpm -q grafana | grep -q "${TAG}"; then - if rpm -q grafana | grep -q "$verison"; then
- ' echo "Successfully verified Grafana version ${TAG}"' - ' echo "Successfully verified Grafana version $version"'
- else - else
- ' echo "Failed to verify Grafana version ${TAG}"' - ' echo "Failed to verify Grafana version $version"'
- ' exit 1' - ' exit 1'
- fi - fi
- echo "Verification complete." - echo "Verification complete."
@ -3516,7 +3520,7 @@ steps:
name: identify-runner name: identify-runner
- commands: - commands:
- $$ProgressPreference = "SilentlyContinue" - $$ProgressPreference = "SilentlyContinue"
- Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.53/windows/grabpl.exe - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.56/windows/grabpl.exe
-OutFile grabpl.exe -OutFile grabpl.exe
image: grafana/ci-wix:0.1.1 image: grafana/ci-wix:0.1.1
name: windows-init name: windows-init
@ -4317,7 +4321,7 @@ services:
steps: steps:
- commands: - commands:
- mkdir -p bin - mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.53/grabpl - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.56/grabpl
- chmod +x bin/grabpl - chmod +x bin/grabpl
image: byrnedo/alpine-curl:0.1.8 image: byrnedo/alpine-curl:0.1.8
name: grabpl name: grabpl
@ -5106,6 +5110,6 @@ kind: secret
name: gcr_credentials name: gcr_credentials
--- ---
kind: signature kind: signature
hmac: 2a32dc429015af78ca434ae6d1fb9ea527148f6c1979563861303a4606c62d7e hmac: a1f1352bd6233f5d8623cd26af7429cc60ca45bb621e739e8cdc49563cb37f6f
... ...

@ -145,6 +145,9 @@ func Builds(baseURL *url.URL, grafana, version string, packages []packaging.Buil
if arch == "aarch64" { if arch == "aarch64" {
arch = "arm64" arch = "arm64"
} }
if arch == "x86_64" {
arch = "amd64"
}
} }
if v.Distro == "deb" { if v.Distro == "deb" {

@ -2,6 +2,7 @@ package main
import ( import (
"fmt" "fmt"
"log"
"os" "os"
"strings" "strings"
@ -23,6 +24,11 @@ func NpmRetrieveAction(c *cli.Context) error {
return fmt.Errorf("no tag version specified, exitting") return fmt.Errorf("no tag version specified, exitting")
} }
if strings.Contains(tag, "security") {
log.Printf("skipping npm publish because version '%s' has 'security'", tag)
return nil
}
prereleaseBucket := strings.TrimSpace(os.Getenv("PRERELEASE_BUCKET")) prereleaseBucket := strings.TrimSpace(os.Getenv("PRERELEASE_BUCKET"))
if prereleaseBucket == "" { if prereleaseBucket == "" {
return cli.Exit("the environment variable PRERELEASE_BUCKET must be set", 1) return cli.Exit("the environment variable PRERELEASE_BUCKET must be set", 1)
@ -48,6 +54,11 @@ func NpmStoreAction(c *cli.Context) error {
return fmt.Errorf("no tag version specified, exiting") return fmt.Errorf("no tag version specified, exiting")
} }
if strings.Contains(tag, "security") {
log.Printf("skipping npm publish because version '%s' has 'security'", tag)
return nil
}
prereleaseBucket := strings.TrimSpace(os.Getenv("PRERELEASE_BUCKET")) prereleaseBucket := strings.TrimSpace(os.Getenv("PRERELEASE_BUCKET"))
if prereleaseBucket == "" { if prereleaseBucket == "" {
return cli.Exit("the environment variable PRERELEASE_BUCKET must be set", 1) return cli.Exit("the environment variable PRERELEASE_BUCKET must be set", 1)
@ -73,6 +84,11 @@ func NpmReleaseAction(c *cli.Context) error {
return fmt.Errorf("no tag version specified, exitting") return fmt.Errorf("no tag version specified, exitting")
} }
if strings.Contains(tag, "security") {
log.Printf("skipping npm publish because version '%s' has 'security'", tag)
return nil
}
err := npm.PublishNpmPackages(c.Context, tag) err := npm.PublishNpmPackages(c.Context, tag)
if err != nil { if err != nil {
return err return err

@ -113,6 +113,16 @@ var ARMArtifacts = []BuildArtifact{
Arch: "armv7", Arch: "armv7",
Ext: "tar.gz", Ext: "tar.gz",
}, },
{
Distro: "linux",
Arch: "arm64",
Ext: "tar.gz",
},
{
Distro: "linux",
Arch: "amd64",
Ext: "tar.gz",
},
} }
func join(a []BuildArtifact, b ...[]BuildArtifact) []BuildArtifact { func join(a []BuildArtifact, b ...[]BuildArtifact) []BuildArtifact {

@ -13,15 +13,17 @@ import (
) )
var ( var (
reGrafanaTag = regexp.MustCompile(`^v(\d+\.\d+\.\d+$)`) reGrafanaTag = regexp.MustCompile(`^v(\d+\.\d+\.\d+$)`)
reGrafanaTagPreview = regexp.MustCompile(`^v(\d+\.\d+\.\d+-preview)`) reGrafanaTagPreview = regexp.MustCompile(`^v(\d+\.\d+\.\d+-preview)`)
reGrafanaTagCustom = regexp.MustCompile(`^v(\d+\.\d+\.\d+-\w+)`) reGrafanaTagCustom = regexp.MustCompile(`^v(\d+\.\d+\.\d+-\w+)`)
reGrafanaTagSecurity = regexp.MustCompile(`^v(\d+\.\d+\.\d+\+\w+\-\d+)`)
) )
const ( const (
Latest = "latest" Latest = "latest"
Next = "next" Next = "next"
Test = "test" Test = "test"
Security = "security"
) )
type Version struct { type Version struct {
@ -152,6 +154,11 @@ func GetVersion(tag string) (*Version, error) {
Version: reGrafanaTagCustom.FindStringSubmatch(tag)[1], Version: reGrafanaTagCustom.FindStringSubmatch(tag)[1],
Channel: Test, Channel: Test,
} }
case reGrafanaTagSecurity.MatchString(tag):
version = Version{
Version: reGrafanaTagSecurity.FindStringSubmatch(tag)[1],
Channel: Security,
}
default: default:
return nil, fmt.Errorf("%s not a supported Grafana version, exitting", tag) return nil, fmt.Errorf("%s not a supported Grafana version, exitting", tag)
} }

@ -45,12 +45,12 @@ def publish_image_public_step():
$$debug docker push grafana/grafana-image-tags:$${IMAGE_TAG}-ubuntu-armv7 $$debug docker push grafana/grafana-image-tags:$${IMAGE_TAG}-ubuntu-armv7
# Create the grafana manifests # Create the grafana manifests
$$debug docker manifest create grafana/grafana:${TAG} \ $$debug docker manifest create grafana/grafana:$${IMAGE_TAG} \
grafana/grafana-image-tags:$${IMAGE_TAG}-amd64 \ grafana/grafana-image-tags:$${IMAGE_TAG}-amd64 \
grafana/grafana-image-tags:$${IMAGE_TAG}-arm64 \ grafana/grafana-image-tags:$${IMAGE_TAG}-arm64 \
grafana/grafana-image-tags:$${IMAGE_TAG}-armv7 grafana/grafana-image-tags:$${IMAGE_TAG}-armv7
$$debug docker manifest create grafana/grafana:${TAG}-ubuntu \ $$debug docker manifest create grafana/grafana:$${IMAGE_TAG}-ubuntu \
grafana/grafana-image-tags:$${IMAGE_TAG}-ubuntu-amd64 \ grafana/grafana-image-tags:$${IMAGE_TAG}-ubuntu-amd64 \
grafana/grafana-image-tags:$${IMAGE_TAG}-ubuntu-arm64 \ grafana/grafana-image-tags:$${IMAGE_TAG}-ubuntu-arm64 \
grafana/grafana-image-tags:$${IMAGE_TAG}-ubuntu-armv7 grafana/grafana-image-tags:$${IMAGE_TAG}-ubuntu-armv7

@ -1164,13 +1164,14 @@ def retry_command(command, attempts = 60, delay = 30):
] ]
def verify_linux_DEB_packages_step(depends_on = []): def verify_linux_DEB_packages_step(depends_on = []):
install_command = "apt-get update >/dev/null 2>&1 && DEBIAN_FRONTEND=noninteractive apt-get install -yq grafana=${TAG} >/dev/null 2>&1" install_command = "apt-get update >/dev/null 2>&1 && DEBIAN_FRONTEND=noninteractive apt-get install -yq grafana=$version >/dev/null 2>&1"
return { return {
"name": "verify-linux-DEB-packages", "name": "verify-linux-DEB-packages",
"image": images["ubuntu"], "image": images["ubuntu"],
"environment": {}, "environment": {},
"commands": [ "commands": [
'export version=$(echo ${TAG} | sed -e "s/+security-/-/g")',
'echo "Step 1: Updating package lists..."', 'echo "Step 1: Updating package lists..."',
"apt-get update >/dev/null 2>&1", "apt-get update >/dev/null 2>&1",
'echo "Step 2: Installing prerequisites..."', 'echo "Step 2: Installing prerequisites..."',
@ -1184,10 +1185,10 @@ def verify_linux_DEB_packages_step(depends_on = []):
# The packages take a bit of time to propogate within the repo. This retry will check their availability within 10 minutes. # The packages take a bit of time to propogate within the repo. This retry will check their availability within 10 minutes.
] + retry_command(install_command) + [ ] + retry_command(install_command) + [
'echo "Step 6: Verifying Grafana installation..."', 'echo "Step 6: Verifying Grafana installation..."',
'if dpkg -s grafana | grep -q "Version: ${TAG}"; then', 'if dpkg -s grafana | grep -q "Version: $version"; then',
' echo "Successfully verified Grafana version ${TAG}"', ' echo "Successfully verified Grafana version $version"',
"else", "else",
' echo "Failed to verify Grafana version ${TAG}"', ' echo "Failed to verify Grafana version $version"',
" exit 1", " exit 1",
"fi", "fi",
'echo "Verification complete."', 'echo "Verification complete."',
@ -1208,7 +1209,7 @@ def verify_linux_RPM_packages_step(depends_on = []):
"sslcacert=/etc/pki/tls/certs/ca-bundle.crt\n" "sslcacert=/etc/pki/tls/certs/ca-bundle.crt\n"
) )
install_command = "dnf install -y --nogpgcheck grafana-${TAG} >/dev/null 2>&1" install_command = "dnf install -y --nogpgcheck grafana-$version >/dev/null 2>&1"
return { return {
"name": "verify-linux-RPM-packages", "name": "verify-linux-RPM-packages",
@ -1224,7 +1225,8 @@ def verify_linux_RPM_packages_step(depends_on = []):
'echo "Step 4: Configuring Grafana repository..."', 'echo "Step 4: Configuring Grafana repository..."',
"echo -e '" + repo_config + "' > /etc/yum.repos.d/grafana.repo", "echo -e '" + repo_config + "' > /etc/yum.repos.d/grafana.repo",
'echo "Step 5: Checking RPM repository..."', 'echo "Step 5: Checking RPM repository..."',
"dnf list available grafana-${TAG}", 'export version=$(echo "${TAG}" | sed -e "s/+security-/^security_/g")',
"dnf list available grafana-$version",
"if [ $? -eq 0 ]; then", "if [ $? -eq 0 ]; then",
' echo "Grafana package found in repository. Installing from repo..."', ' echo "Grafana package found in repository. Installing from repo..."',
] + retry_command(install_command) + [ ] + retry_command(install_command) + [
@ -1232,16 +1234,16 @@ def verify_linux_RPM_packages_step(depends_on = []):
" rpm --import https://rpm.grafana.com/gpg.key", " rpm --import https://rpm.grafana.com/gpg.key",
" rpm -qa gpg-pubkey* | xargs rpm -qi | grep -i grafana", " rpm -qa gpg-pubkey* | xargs rpm -qi | grep -i grafana",
"else", "else",
' echo "Grafana package version ${TAG} not found in repository."', ' echo "Grafana package version $version not found in repository."',
" dnf repolist", " dnf repolist",
" dnf list available grafana*", " dnf list available grafana*",
" exit 1", " exit 1",
"fi", "fi",
'echo "Step 6: Verifying Grafana installation..."', 'echo "Step 6: Verifying Grafana installation..."',
'if rpm -q grafana | grep -q "${TAG}"; then', 'if rpm -q grafana | grep -q "$verison"; then',
' echo "Successfully verified Grafana version ${TAG}"', ' echo "Successfully verified Grafana version $version"',
"else", "else",
' echo "Failed to verify Grafana version ${TAG}"', ' echo "Failed to verify Grafana version $version"',
" exit 1", " exit 1",
"fi", "fi",
'echo "Verification complete."', 'echo "Verification complete."',

@ -2,7 +2,7 @@
global variables global variables
""" """
grabpl_version = "v3.0.53" grabpl_version = "v3.0.56"
golang_version = "1.22.7" golang_version = "1.22.7"
# nodejs_version should match what's in ".nvmrc", but without the v prefix. # nodejs_version should match what's in ".nvmrc", but without the v prefix.

Loading…
Cancel
Save