Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TT-755] only add grafana bearer token if it's not empty #13224

Merged
merged 2 commits into from
May 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@ runs:
pyroscope_enabled=false
fi
grafana_bearer_token=""
if [ -n "$GRAFANA_BEARER_TOKEN" ]; then
grafana_bearer_token="bearer_token_secret=\"$GRAFANA_BEARER_TOKEN\""
fi
cat << EOF > config.toml
[Common]
chainlink_node_funding=0.5
Expand Down Expand Up @@ -118,7 +123,7 @@ runs:
[Logging.Grafana]
base_url="$GRAFANA_URL"
dashboard_url="$GRAFANA_DASHBOARD_URL"
bearer_token_secret="$GRAFANA_BEARER_TOKEN"
$grafana_bearer_token
[Network]
selected_networks=["$NETWORK"]
Expand Down
7 changes: 6 additions & 1 deletion .github/actions/setup-create-base64-config/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,11 @@ runs:
else
execution_layer="geth"
fi

grafana_bearer_token=""
if [ -n "$GRAFANA_BEARER_TOKEN" ]; then
grafana_bearer_token="bearer_token_secret=\"$GRAFANA_BEARER_TOKEN\""
fi

cat << EOF > config.toml
[Network]
Expand Down Expand Up @@ -142,7 +147,7 @@ runs:
[Logging.Grafana]
base_url="$GRAFANA_URL"
dashboard_url="$GRAFANA_DASHBOARD_URL"
bearer_token_secret="$GRAFANA_BEARER_TOKEN"
$grafana_bearer_token

[PrivateEthereumNetwork]
execution_layer="$execution_layer"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,11 @@ runs:

log_targets=$(convert_to_toml_array "$LOGSTREAM_LOG_TARGETS")

grafana_bearer_token=""
if [ -n "$GRAFANA_BEARER_TOKEN" ]; then
grafana_bearer_token="bearer_token_secret=\"$GRAFANA_BEARER_TOKEN\""
fi

cat << EOF > config.toml
[Network]
selected_networks=$selected_networks
Expand Down Expand Up @@ -112,7 +117,7 @@ runs:
[Logging.Grafana]
base_url="$GRAFANA_URL"
dashboard_url="$GRAFANA_DASHBOARD_URL"
bearer_token_secret="$GRAFANA_BEARER_TOKEN"
$grafana_bearer_token
EOF

BASE64_CONFIG_OVERRIDE=$(cat config.toml | base64 -w 0)
Expand Down
7 changes: 6 additions & 1 deletion .github/actions/setup-merge-base64-config/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ runs:
echo "NETWORKS=$NETWORKS" >> $GITHUB_ENV
fi

grafana_bearer_token=""
if [ -n "$GRAFANA_BEARER_TOKEN" ]; then
grafana_bearer_token="bearer_token_secret=\"$GRAFANA_BEARER_TOKEN\""
fi

# use Loki config from GH secrets and merge it with base64 input
cat << EOF > config.toml
[Logging.Loki]
Expand All @@ -57,7 +62,7 @@ runs:
[Logging.Grafana]
base_url="$GRAFANA_URL"
dashboard_url="$GRAFANA_DASHBOARD_URL"
bearer_token_secret="$GRAFANA_BEARER_TOKEN"
$grafana_bearer_token
EOF

echo "$decoded_toml" >> final_config.toml
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/automation-ondemand-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,11 @@ jobs:

log_targets=$(convert_to_toml_array "$LOGSTREAM_LOG_TARGETS")

grafana_bearer_token=""
if [ -n "$GRAFANA_BEARER_TOKEN" ]; then
grafana_bearer_token="bearer_token_secret=\"$GRAFANA_BEARER_TOKEN\""
fi

cat << EOF > config.toml
[Network]
selected_networks=$selected_networks
Expand Down Expand Up @@ -300,7 +305,7 @@ jobs:
[Logging.Grafana]
base_url="$GRAFANA_URL"
dashboard_url="$GRAFANA_DASHBOARD_URL"
bearer_token_secret="$GRAFANA_BEARER_TOKEN"
$grafana_bearer_token

[Pyroscope]
enabled=$pyroscope_enabled
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/client-compatibility-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,11 @@ jobs:
pyroscope_enabled=false
fi

grafana_bearer_token=""
if [ -n "$GRAFANA_BEARER_TOKEN" ]; then
grafana_bearer_token="bearer_token_secret=\"$GRAFANA_BEARER_TOKEN\""
fi

cat << EOF > config.toml
[Network]
selected_networks=$selected_networks
Expand All @@ -212,7 +217,7 @@ jobs:
[Logging.Grafana]
base_url="$GRAFANA_URL"
dashboard_url="$GRAFANA_DASHBOARD_URL"
bearer_token_secret="$GRAFANA_BEARER_TOKEN"
$grafana_bearer_token

[PrivateEthereumNetwork]
ethereum_version="eth2"
Expand Down
Loading