mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Chore: Remove verification steps for deb/rpm in drone (#96991)
remove verification steps for deb/rpm in drone
This commit is contained in:
231
.drone.yml
231
.drone.yml
@@ -3925,132 +3925,6 @@ volumes:
|
||||
path: /var/run/docker.sock
|
||||
name: docker
|
||||
---
|
||||
clone:
|
||||
retries: 3
|
||||
depends_on: []
|
||||
image_pull_secrets:
|
||||
- gcr
|
||||
- gar
|
||||
kind: pipeline
|
||||
name: verify-linux-packages
|
||||
node:
|
||||
type: no-parallel
|
||||
platform:
|
||||
arch: amd64
|
||||
os: linux
|
||||
services: []
|
||||
steps:
|
||||
- commands:
|
||||
- export version=$(echo ${TAG} | sed -e "s/+security-/-/g")
|
||||
- 'echo "Step 1: Updating package lists..."'
|
||||
- apt-get update >/dev/null 2>&1
|
||||
- 'echo "Step 2: Installing prerequisites..."'
|
||||
- DEBIAN_FRONTEND=noninteractive apt-get install -yq apt-transport-https software-properties-common
|
||||
wget >/dev/null 2>&1
|
||||
- 'echo "Step 3: Adding Grafana GPG key..."'
|
||||
- mkdir -p /etc/apt/keyrings/
|
||||
- wget -q -O - https://apt.grafana.com/gpg.key | gpg --dearmor | tee /etc/apt/keyrings/grafana.gpg
|
||||
> /dev/null
|
||||
- 'echo "Step 4: Adding Grafana repository..."'
|
||||
- echo "deb [signed-by=/etc/apt/keyrings/grafana.gpg] https://apt.grafana.com stable
|
||||
main" | tee -a /etc/apt/sources.list.d/grafana.list
|
||||
- 'echo "Step 5: Installing Grafana..."'
|
||||
- for i in $(seq 1 60); do
|
||||
- ' if apt-get update >/dev/null 2>&1 && DEBIAN_FRONTEND=noninteractive apt-get
|
||||
install -yq grafana=$version >/dev/null 2>&1; then'
|
||||
- ' echo "Command succeeded on attempt $i"'
|
||||
- ' break'
|
||||
- ' else'
|
||||
- ' echo "Attempt $i failed"'
|
||||
- ' if [ $i -eq 60 ]; then'
|
||||
- ' echo ''All attempts failed'''
|
||||
- ' exit 1'
|
||||
- ' fi'
|
||||
- ' echo "Waiting 30 seconds before next attempt..."'
|
||||
- ' sleep 30'
|
||||
- ' fi'
|
||||
- done
|
||||
- 'echo "Step 6: Verifying Grafana installation..."'
|
||||
- 'if dpkg -s grafana | grep -q "Version: $version"; then'
|
||||
- ' echo "Successfully verified Grafana version $version"'
|
||||
- else
|
||||
- ' echo "Failed to verify Grafana version $version"'
|
||||
- ' exit 1'
|
||||
- fi
|
||||
- echo "Verification complete."
|
||||
depends_on: []
|
||||
environment: {}
|
||||
image: ubuntu:22.04
|
||||
name: verify-linux-DEB-packages
|
||||
- commands:
|
||||
- 'echo "Step 1: Updating package lists..."'
|
||||
- dnf check-update -y >/dev/null 2>&1 || true
|
||||
- 'echo "Step 2: Installing prerequisites..."'
|
||||
- dnf install -y dnf-utils >/dev/null 2>&1
|
||||
- 'echo "Step 3: Adding Grafana GPG key..."'
|
||||
- rpm --import https://rpm.grafana.com/gpg.key
|
||||
- 'echo "Step 4: Configuring Grafana repository..."'
|
||||
- |-
|
||||
echo -e '[grafana]
|
||||
name=grafana
|
||||
baseurl=https://rpm.grafana.com
|
||||
repo_gpgcheck=0
|
||||
enabled=1
|
||||
gpgcheck=0
|
||||
gpgkey=https://rpm.grafana.com/gpg.key
|
||||
sslverify=1
|
||||
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
|
||||
' > /etc/yum.repos.d/grafana.repo
|
||||
- 'echo "Step 5: Checking RPM repository..."'
|
||||
- export version=$(echo "${TAG}" | sed -e "s/+security-/^security_/g")
|
||||
- dnf list available grafana-$version
|
||||
- if [ $? -eq 0 ]; then
|
||||
- ' echo "Grafana package found in repository. Installing from repo..."'
|
||||
- for i in $(seq 1 60); do
|
||||
- ' if dnf install -y --nogpgcheck grafana-$version >/dev/null 2>&1; then'
|
||||
- ' echo "Command succeeded on attempt $i"'
|
||||
- ' break'
|
||||
- ' else'
|
||||
- ' echo "Attempt $i failed"'
|
||||
- ' if [ $i -eq 60 ]; then'
|
||||
- ' echo ''All attempts failed'''
|
||||
- ' exit 1'
|
||||
- ' fi'
|
||||
- ' echo "Waiting 30 seconds before next attempt..."'
|
||||
- ' sleep 30'
|
||||
- ' fi'
|
||||
- done
|
||||
- ' echo "Verifying GPG key..."'
|
||||
- ' rpm --import https://rpm.grafana.com/gpg.key'
|
||||
- ' rpm -qa gpg-pubkey* | xargs rpm -qi | grep -i grafana'
|
||||
- else
|
||||
- ' echo "Grafana package version $version not found in repository."'
|
||||
- ' dnf repolist'
|
||||
- ' dnf list available grafana*'
|
||||
- ' exit 1'
|
||||
- fi
|
||||
- 'echo "Step 6: Verifying Grafana installation..."'
|
||||
- if rpm -q grafana | grep -q "$verison"; then
|
||||
- ' echo "Successfully verified Grafana version $version"'
|
||||
- else
|
||||
- ' echo "Failed to verify Grafana version $version"'
|
||||
- ' exit 1'
|
||||
- fi
|
||||
- echo "Verification complete."
|
||||
depends_on: []
|
||||
environment: {}
|
||||
image: rockylinux:9
|
||||
name: verify-linux-RPM-packages
|
||||
trigger:
|
||||
event:
|
||||
- promote
|
||||
target: verify-linux-packages
|
||||
type: docker
|
||||
volumes:
|
||||
- host:
|
||||
path: /var/run/docker.sock
|
||||
name: docker
|
||||
---
|
||||
clone:
|
||||
retries: 3
|
||||
depends_on:
|
||||
@@ -4119,109 +3993,6 @@ steps:
|
||||
service_account_json:
|
||||
from_secret: packages_service_account
|
||||
target_bucket: grafana-packages
|
||||
- commands:
|
||||
- export version=$(echo ${TAG} | sed -e "s/+security-/-/g")
|
||||
- 'echo "Step 1: Updating package lists..."'
|
||||
- apt-get update >/dev/null 2>&1
|
||||
- 'echo "Step 2: Installing prerequisites..."'
|
||||
- DEBIAN_FRONTEND=noninteractive apt-get install -yq apt-transport-https software-properties-common
|
||||
wget >/dev/null 2>&1
|
||||
- 'echo "Step 3: Adding Grafana GPG key..."'
|
||||
- mkdir -p /etc/apt/keyrings/
|
||||
- wget -q -O - https://apt.grafana.com/gpg.key | gpg --dearmor | tee /etc/apt/keyrings/grafana.gpg
|
||||
> /dev/null
|
||||
- 'echo "Step 4: Adding Grafana repository..."'
|
||||
- echo "deb [signed-by=/etc/apt/keyrings/grafana.gpg] https://apt.grafana.com stable
|
||||
main" | tee -a /etc/apt/sources.list.d/grafana.list
|
||||
- 'echo "Step 5: Installing Grafana..."'
|
||||
- for i in $(seq 1 60); do
|
||||
- ' if apt-get update >/dev/null 2>&1 && DEBIAN_FRONTEND=noninteractive apt-get
|
||||
install -yq grafana=$version >/dev/null 2>&1; then'
|
||||
- ' echo "Command succeeded on attempt $i"'
|
||||
- ' break'
|
||||
- ' else'
|
||||
- ' echo "Attempt $i failed"'
|
||||
- ' if [ $i -eq 60 ]; then'
|
||||
- ' echo ''All attempts failed'''
|
||||
- ' exit 1'
|
||||
- ' fi'
|
||||
- ' echo "Waiting 30 seconds before next attempt..."'
|
||||
- ' sleep 30'
|
||||
- ' fi'
|
||||
- done
|
||||
- 'echo "Step 6: Verifying Grafana installation..."'
|
||||
- 'if dpkg -s grafana | grep -q "Version: $version"; then'
|
||||
- ' echo "Successfully verified Grafana version $version"'
|
||||
- else
|
||||
- ' echo "Failed to verify Grafana version $version"'
|
||||
- ' exit 1'
|
||||
- fi
|
||||
- echo "Verification complete."
|
||||
depends_on:
|
||||
- publish-linux-packages-deb
|
||||
environment: {}
|
||||
image: ubuntu:22.04
|
||||
name: verify-linux-DEB-packages
|
||||
- commands:
|
||||
- 'echo "Step 1: Updating package lists..."'
|
||||
- dnf check-update -y >/dev/null 2>&1 || true
|
||||
- 'echo "Step 2: Installing prerequisites..."'
|
||||
- dnf install -y dnf-utils >/dev/null 2>&1
|
||||
- 'echo "Step 3: Adding Grafana GPG key..."'
|
||||
- rpm --import https://rpm.grafana.com/gpg.key
|
||||
- 'echo "Step 4: Configuring Grafana repository..."'
|
||||
- |-
|
||||
echo -e '[grafana]
|
||||
name=grafana
|
||||
baseurl=https://rpm.grafana.com
|
||||
repo_gpgcheck=0
|
||||
enabled=1
|
||||
gpgcheck=0
|
||||
gpgkey=https://rpm.grafana.com/gpg.key
|
||||
sslverify=1
|
||||
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
|
||||
' > /etc/yum.repos.d/grafana.repo
|
||||
- 'echo "Step 5: Checking RPM repository..."'
|
||||
- export version=$(echo "${TAG}" | sed -e "s/+security-/^security_/g")
|
||||
- dnf list available grafana-$version
|
||||
- if [ $? -eq 0 ]; then
|
||||
- ' echo "Grafana package found in repository. Installing from repo..."'
|
||||
- for i in $(seq 1 60); do
|
||||
- ' if dnf install -y --nogpgcheck grafana-$version >/dev/null 2>&1; then'
|
||||
- ' echo "Command succeeded on attempt $i"'
|
||||
- ' break'
|
||||
- ' else'
|
||||
- ' echo "Attempt $i failed"'
|
||||
- ' if [ $i -eq 60 ]; then'
|
||||
- ' echo ''All attempts failed'''
|
||||
- ' exit 1'
|
||||
- ' fi'
|
||||
- ' echo "Waiting 30 seconds before next attempt..."'
|
||||
- ' sleep 30'
|
||||
- ' fi'
|
||||
- done
|
||||
- ' echo "Verifying GPG key..."'
|
||||
- ' rpm --import https://rpm.grafana.com/gpg.key'
|
||||
- ' rpm -qa gpg-pubkey* | xargs rpm -qi | grep -i grafana'
|
||||
- else
|
||||
- ' echo "Grafana package version $version not found in repository."'
|
||||
- ' dnf repolist'
|
||||
- ' dnf list available grafana*'
|
||||
- ' exit 1'
|
||||
- fi
|
||||
- 'echo "Step 6: Verifying Grafana installation..."'
|
||||
- if rpm -q grafana | grep -q "$verison"; then
|
||||
- ' echo "Successfully verified Grafana version $version"'
|
||||
- else
|
||||
- ' echo "Failed to verify Grafana version $version"'
|
||||
- ' exit 1'
|
||||
- fi
|
||||
- echo "Verification complete."
|
||||
depends_on:
|
||||
- publish-linux-packages-rpm
|
||||
environment: {}
|
||||
image: rockylinux:9
|
||||
name: verify-linux-RPM-packages
|
||||
- commands:
|
||||
- ./bin/build publish grafana-com --edition oss ${DRONE_TAG}
|
||||
depends_on:
|
||||
@@ -5969,6 +5740,6 @@ kind: secret
|
||||
name: gcr_credentials
|
||||
---
|
||||
kind: signature
|
||||
hmac: b164dd562488c482f2e670688fca02ae20dcd2e7841ec80c95838472842b4b5e
|
||||
hmac: 9b3538ec1bc7180fe775bfab88591c4afb390e2620a279aab6cfe0034d288754
|
||||
|
||||
...
|
||||
|
||||
Reference in New Issue
Block a user