Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
f8fd897f
Unverified
Commit
f8fd897f
authored
Oct 10, 2023
by
Wyatt Barnes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ufm-metamask correct envs
parent
9ee5ac1f
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
11 additions
and
11 deletions
+11
-11
.env.example
ufm-test-services/.env.example
+1
-1
.secrets.example
ufm-test-services/.secrets.example
+1
-1
docker-compose.yml
ufm-test-services/docker-compose.yml
+2
-2
Dockerfile
ufm-test-services/metamask/Dockerfile
+1
-1
github_workflow.example.yaml
ufm-test-services/metamask/github_workflow.example.yaml
+1
-1
start.sh
ufm-test-services/metamask/start.sh
+1
-1
prometheusUtils.ts
ufm-test-services/metamask/tests/prometheusUtils.ts
+4
-4
No files found.
ufm-test-services/.env.example
View file @
f8fd897f
...
@@ -15,7 +15,7 @@ METRICS_WRITE_URL="http://pushgateway:9091"
...
@@ -15,7 +15,7 @@ METRICS_WRITE_URL="http://pushgateway:9091"
# Dictates how the request body is structured when pushing metrics. Should be either "grafana" or "prometheus-pushgateway"
# Dictates how the request body is structured when pushing metrics. Should be either "grafana" or "prometheus-pushgateway"
METRICS_WRITE_TOOL="prometheus-pushgateway"
METRICS_WRITE_TOOL="prometheus-pushgateway"
# This is the source the pushed metric will be labeled as originting from. May not need this value
# This is the source the pushed metric will be labeled as originting from. May not need this value
METRIC_WRITE_SOURCE=""
METRIC
S
_WRITE_SOURCE=""
# The needed credentials to access METRICS_READ_URL. Will be sent as: Authorization: Bearer username:password
# The needed credentials to access METRICS_READ_URL. Will be sent as: Authorization: Bearer username:password
METRICS_WRITE_USERNAME=""
METRICS_WRITE_USERNAME=""
METRICS_WRITE_PASSWORD=""
METRICS_WRITE_PASSWORD=""
...
...
ufm-test-services/.secrets.example
View file @
f8fd897f
...
@@ -15,7 +15,7 @@ METRICS_WRITE_URL="http://pushgateway:9091"
...
@@ -15,7 +15,7 @@ METRICS_WRITE_URL="http://pushgateway:9091"
# Dictates how the request body is structured when pushing metrics. Should be either "grafana" or "prometheus-pushgateway"
# Dictates how the request body is structured when pushing metrics. Should be either "grafana" or "prometheus-pushgateway"
METRICS_WRITE_TOOL="prometheus-pushgateway"
METRICS_WRITE_TOOL="prometheus-pushgateway"
# This is the source the pushed metric will be labeled as originting from. May not need this value
# This is the source the pushed metric will be labeled as originting from. May not need this value
METRIC_WRITE_SOURCE=""
METRIC
S
_WRITE_SOURCE=""
# The needed credentials to access METRICS_READ_URL. Will be sent as: Authorization: Bearer username:password
# The needed credentials to access METRICS_READ_URL. Will be sent as: Authorization: Bearer username:password
METRICS_WRITE_USERNAME=""
METRICS_WRITE_USERNAME=""
METRICS_WRITE_PASSWORD=""
METRICS_WRITE_PASSWORD=""
...
...
ufm-test-services/docker-compose.yml
View file @
f8fd897f
...
@@ -42,7 +42,7 @@ services:
...
@@ -42,7 +42,7 @@ services:
context
:
./metamask
context
:
./metamask
dockerfile
:
Dockerfile
dockerfile
:
Dockerfile
args
:
args
:
-
METAMASK_
RUN_HEADLESS=${METAMASK
_RUN_HEADLESS}
-
METAMASK_
PLAYWRIGHT_RUN_HEADLESS=${METAMASK_PLAYWRIGHT
_RUN_HEADLESS}
container_name
:
test-service-metamask
container_name
:
test-service-metamask
profiles
:
[
"
5minute"
]
profiles
:
[
"
5minute"
]
environment
:
environment
:
...
@@ -54,7 +54,7 @@ services:
...
@@ -54,7 +54,7 @@ services:
METRICS_READ_PASSWORD
:
${METRICS_READ_PASSWORD}
METRICS_READ_PASSWORD
:
${METRICS_READ_PASSWORD}
METRICS_WRITE_URL
:
${METRICS_WRITE_URL}
METRICS_WRITE_URL
:
${METRICS_WRITE_URL}
METRICS_WRITE_TOOL
:
${METRICS_WRITE_TOOL}
METRICS_WRITE_TOOL
:
${METRICS_WRITE_TOOL}
METRIC
_WRITE_SOURCE
:
${METRIC
_WRITE_SOURCE}
METRIC
S_WRITE_SOURCE
:
${METRICS
_WRITE_SOURCE}
METRICS_WRITE_USERNAME
:
${METRICS_WRITE_USERNAME}
METRICS_WRITE_USERNAME
:
${METRICS_WRITE_USERNAME}
METRICS_WRITE_PASSWORD
:
${METRICS_WRITE_PASSWORD}
METRICS_WRITE_PASSWORD
:
${METRICS_WRITE_PASSWORD}
METAMASK_PLAYWRIGHT_RUN_HEADLESS
:
${METAMASK_PLAYWRIGHT_RUN_HEADLESS}
METAMASK_PLAYWRIGHT_RUN_HEADLESS
:
${METAMASK_PLAYWRIGHT_RUN_HEADLESS}
...
...
ufm-test-services/metamask/Dockerfile
View file @
f8fd897f
...
@@ -7,7 +7,7 @@ WORKDIR /app
...
@@ -7,7 +7,7 @@ WORKDIR /app
# Update PATH
# Update PATH
ENV
PATH /app/node_modules/.bin:$PATH
ENV
PATH /app/node_modules/.bin:$PATH
RUN if
[
"
$METAMASK_RUN_HEADLESS
"
!=
"false"
]
;
then
\
RUN if
[
"
$METAMASK_
PLAYWRIGHT_
RUN_HEADLESS
"
!=
"false"
]
;
then
\
apt-get update
&&
\
apt-get update
&&
\
apt-get
install
-y
xvfb
&&
\
apt-get
install
-y
xvfb
&&
\
rm
-rf
/var/lib/apt/lists/
*
;
\
rm
-rf
/var/lib/apt/lists/
*
;
\
...
...
ufm-test-services/metamask/github_workflow.example.yaml
View file @
f8fd897f
...
@@ -22,7 +22,7 @@ jobs:
...
@@ -22,7 +22,7 @@ jobs:
METRICS_READ_PASSWORD
:
${{ secrets.METRICS_READ_PASSWORD }}
METRICS_READ_PASSWORD
:
${{ secrets.METRICS_READ_PASSWORD }}
METRICS_WRITE_URL
:
${{ secrets.METRICS_WRITE_URL }}
METRICS_WRITE_URL
:
${{ secrets.METRICS_WRITE_URL }}
METRICS_WRITE_TOOL
:
${{ secrets.METRICS_WRITE_TOOL }}
METRICS_WRITE_TOOL
:
${{ secrets.METRICS_WRITE_TOOL }}
METRIC
_WRITE_SOURCE
:
${{ secrets.METRIC
_WRITE_SOURCE }}
METRIC
S_WRITE_SOURCE
:
${{ secrets.METRICS
_WRITE_SOURCE }}
METRICS_WRITE_USERNAME
:
${{ secrets.METRICS_WRITE_USERNAME }}
METRICS_WRITE_USERNAME
:
${{ secrets.METRICS_WRITE_USERNAME }}
METRICS_WRITE_PASSWORD
:
${{ secrets.METRICS_WRITE_PASSWORD }}
METRICS_WRITE_PASSWORD
:
${{ secrets.METRICS_WRITE_PASSWORD }}
METAMASK_SECRET_WORDS_OR_PRIVATEKEY
:
${{ secrets.METAMASK_SECRET_WORDS_OR_PRIVATEKEY }}
METAMASK_SECRET_WORDS_OR_PRIVATEKEY
:
${{ secrets.METAMASK_SECRET_WORDS_OR_PRIVATEKEY }}
...
...
ufm-test-services/metamask/start.sh
View file @
f8fd897f
#!/bin/bash
#!/bin/bash
if
[
"
$METAMASK_
RUN_HEADLESS
"
==
"tru
e"
]
;
then
if
[
"
$METAMASK_
PLAYWRIGHT_RUN_HEADLESS
"
!=
"fals
e"
]
;
then
# Start Xvfb in the background on display :99
# Start Xvfb in the background on display :99
Xvfb :99 &
Xvfb :99 &
...
...
ufm-test-services/metamask/tests/prometheusUtils.ts
View file @
f8fd897f
...
@@ -9,7 +9,7 @@ const env = z
...
@@ -9,7 +9,7 @@ const env = z
METRICS_READ_PASSWORD
:
z
.
string
().
optional
(),
METRICS_READ_PASSWORD
:
z
.
string
().
optional
(),
METRICS_WRITE_URL
:
z
.
string
().
url
(),
METRICS_WRITE_URL
:
z
.
string
().
url
(),
METRICS_WRITE_TOOL
:
z
.
enum
([
'
grafana
'
,
'
prometheus-pushgateway
'
]),
METRICS_WRITE_TOOL
:
z
.
enum
([
'
grafana
'
,
'
prometheus-pushgateway
'
]),
METRIC_WRITE_SOURCE
:
z
.
string
().
optional
(),
METRIC
S
_WRITE_SOURCE
:
z
.
string
().
optional
(),
METRICS_WRITE_USERNAME
:
z
.
string
().
optional
(),
METRICS_WRITE_USERNAME
:
z
.
string
().
optional
(),
METRICS_WRITE_PASSWORD
:
z
.
string
().
optional
(),
METRICS_WRITE_PASSWORD
:
z
.
string
().
optional
(),
})
})
...
@@ -40,7 +40,7 @@ const env = z
...
@@ -40,7 +40,7 @@ const env = z
(
data
)
=>
{
(
data
)
=>
{
if
(
if
(
data
.
METRICS_WRITE_TOOL
===
'
grafana
'
&&
data
.
METRICS_WRITE_TOOL
===
'
grafana
'
&&
data
.
METRIC_WRITE_SOURCE
===
undefined
data
.
METRIC
S
_WRITE_SOURCE
===
undefined
)
)
return
false
return
false
...
@@ -48,7 +48,7 @@ const env = z
...
@@ -48,7 +48,7 @@ const env = z
},
},
{
{
message
:
message
:
'
Writing to Grafana requires a source, please specify one using METRIC_WRITE_SOURCE env
'
,
'
Writing to Grafana requires a source, please specify one using METRIC
S
_WRITE_SOURCE env
'
,
}
}
)
)
.
parse
(
process
.
env
)
.
parse
(
process
.
env
)
...
@@ -164,7 +164,7 @@ export const getSelfSendGaugeValue = async () => {
...
@@ -164,7 +164,7 @@ export const getSelfSendGaugeValue = async () => {
const
pushMetricsGrafana
=
(
metricName
:
string
,
valueToSetTo
:
number
)
=>
const
pushMetricsGrafana
=
(
metricName
:
string
,
valueToSetTo
:
number
)
=>
pushMetricsWriteUrl
(
pushMetricsWriteUrl
(
`
${
metricName
}
,source=
${
`
${
metricName
}
,source=
${
env
.
METRIC_WRITE_SOURCE
env
.
METRIC
S
_WRITE_SOURCE
}
metric=
${
valueToSetTo
}
`
}
metric=
${
valueToSetTo
}
`
)
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment