mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Alerting: Allow remote Alertmanager integration tests to fail (#88664)
* Alerting: Allow remote Alertmanager integration tests to fail * format drone * rebase from main * the wait-for container needs canFail more than the acutal integration-tests container --------- Co-authored-by: Charandas Batra <charandas.batra@grafana.com>
This commit is contained in:
@@ -1137,6 +1137,7 @@ steps:
|
|||||||
environment:
|
environment:
|
||||||
AM_TENANT_ID: test
|
AM_TENANT_ID: test
|
||||||
AM_URL: http://mimir_backend:8080
|
AM_URL: http://mimir_backend:8080
|
||||||
|
failure: ignore
|
||||||
image: golang:1.22.4-alpine
|
image: golang:1.22.4-alpine
|
||||||
name: remote-alertmanager-integration-tests
|
name: remote-alertmanager-integration-tests
|
||||||
trigger:
|
trigger:
|
||||||
@@ -2642,6 +2643,7 @@ steps:
|
|||||||
environment:
|
environment:
|
||||||
AM_TENANT_ID: test
|
AM_TENANT_ID: test
|
||||||
AM_URL: http://mimir_backend:8080
|
AM_URL: http://mimir_backend:8080
|
||||||
|
failure: ignore
|
||||||
image: golang:1.22.4-alpine
|
image: golang:1.22.4-alpine
|
||||||
name: remote-alertmanager-integration-tests
|
name: remote-alertmanager-integration-tests
|
||||||
trigger:
|
trigger:
|
||||||
@@ -4534,6 +4536,7 @@ steps:
|
|||||||
environment:
|
environment:
|
||||||
AM_TENANT_ID: test
|
AM_TENANT_ID: test
|
||||||
AM_URL: http://mimir_backend:8080
|
AM_URL: http://mimir_backend:8080
|
||||||
|
failure: ignore
|
||||||
image: golang:1.22.4-alpine
|
image: golang:1.22.4-alpine
|
||||||
name: remote-alertmanager-integration-tests
|
name: remote-alertmanager-integration-tests
|
||||||
trigger:
|
trigger:
|
||||||
@@ -5178,6 +5181,6 @@ kind: secret
|
|||||||
name: gcr_credentials
|
name: gcr_credentials
|
||||||
---
|
---
|
||||||
kind: signature
|
kind: signature
|
||||||
hmac: c4a656d676b1228248f6948ac0347aea1d67016429aa24351d0a5c3e2d7dc617
|
hmac: e296b5401c0632dc2549a2c3d0594a58c459f5d185376e9f1728ce75c1d8ff3c
|
||||||
|
|
||||||
...
|
...
|
||||||
|
|||||||
@@ -218,8 +218,8 @@ def validate_openapi_spec_step():
|
|||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
|
||||||
def dockerize_step(name, hostname, port):
|
def dockerize_step(name, hostname, port, canFail = False):
|
||||||
return {
|
step = {
|
||||||
"name": name,
|
"name": name,
|
||||||
"image": images["dockerize"],
|
"image": images["dockerize"],
|
||||||
"commands": [
|
"commands": [
|
||||||
@@ -227,6 +227,11 @@ def dockerize_step(name, hostname, port):
|
|||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if canFail:
|
||||||
|
step["failure"] = "ignore"
|
||||||
|
|
||||||
|
return step
|
||||||
|
|
||||||
def build_storybook_step(ver_mode):
|
def build_storybook_step(ver_mode):
|
||||||
return {
|
return {
|
||||||
"name": "build-storybook",
|
"name": "build-storybook",
|
||||||
@@ -959,7 +964,7 @@ def publish_images_step(ver_mode, docker_repo, trigger = None):
|
|||||||
|
|
||||||
return step
|
return step
|
||||||
|
|
||||||
def integration_tests_steps(name, cmds, hostname = None, port = None, environment = None):
|
def integration_tests_steps(name, cmds, hostname = None, port = None, environment = None, canFail = False):
|
||||||
"""Integration test steps
|
"""Integration test steps
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
@@ -968,6 +973,7 @@ def integration_tests_steps(name, cmds, hostname = None, port = None, environmen
|
|||||||
hostname: the hostname where the remote server is available.
|
hostname: the hostname where the remote server is available.
|
||||||
port: the port where the remote server is available.
|
port: the port where the remote server is available.
|
||||||
environment: Any extra environment variables needed to run the integration tests.
|
environment: Any extra environment variables needed to run the integration tests.
|
||||||
|
canFail: controls whether the step can fail.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
A list of drone steps. If a hostname / port were provided, then a step to wait for the remove server to be
|
A list of drone steps. If a hostname / port were provided, then a step to wait for the remove server to be
|
||||||
@@ -988,6 +994,9 @@ def integration_tests_steps(name, cmds, hostname = None, port = None, environmen
|
|||||||
] + cmds,
|
] + cmds,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if canFail:
|
||||||
|
step["failure"] = "ignore"
|
||||||
|
|
||||||
if environment:
|
if environment:
|
||||||
step["environment"] = environment
|
step["environment"] = environment
|
||||||
|
|
||||||
@@ -1064,7 +1073,7 @@ def remote_alertmanager_integration_tests_steps():
|
|||||||
"AM_URL": "http://mimir_backend:8080",
|
"AM_URL": "http://mimir_backend:8080",
|
||||||
}
|
}
|
||||||
|
|
||||||
return integration_tests_steps("remote-alertmanager", cmds, "mimir_backend", "8080", environment = environment)
|
return integration_tests_steps("remote-alertmanager", cmds, "mimir_backend", "8080", environment = environment, canFail = True)
|
||||||
|
|
||||||
def memcached_integration_tests_steps():
|
def memcached_integration_tests_steps():
|
||||||
cmds = [
|
cmds = [
|
||||||
|
|||||||
Reference in New Issue
Block a user