Skip to content

Commit

Permalink
feat(orchestrator): move pushgateway url to env var
Browse files Browse the repository at this point in the history
  • Loading branch information
pepoviola committed Apr 1, 2024
1 parent 8b134ea commit 3226a2f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ variables:
# Improve gitlab cache performance
CACHE_COMPRESSION_LEVEL: "fastest"
FF_USE_FASTZIP: "true"
PUSHGATEWAY_URL: "http://zombienet-prometheus-pushgateway.managed-monitoring:9091/metrics/job/zombie-metrics"

cache:
- key:
Expand Down
4 changes: 2 additions & 2 deletions javascript/packages/orchestrator/src/orchestrator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ export async function start(
const spawnElapsedSecs = Math.round((spawnEnd - spawnStart) / 1000);
debug(`\t 🕰 [Spawn] elapsed time: ${spawnElapsedSecs} secs`);

if (options?.inCI && process.env["CI_JOB_NAME"]) {
if (options?.inCI && process.env["PUSHGATEWAY_URL"] && process.env["CI_JOB_NAME"]) {

Check failure on line 545 in javascript/packages/orchestrator/src/orchestrator.ts

View workflow job for this annotation

GitHub Actions / build (18.x)

Replace `options?.inCI·&&·process.env["PUSHGATEWAY_URL"]·&&·process.env["CI_JOB_NAME"]` with `⏎······options?.inCI·&&⏎······process.env["PUSHGATEWAY_URL"]·&&⏎······process.env["CI_JOB_NAME"]⏎····`

Check failure on line 545 in javascript/packages/orchestrator/src/orchestrator.ts

View workflow job for this annotation

GitHub Actions / build (19.x)

Replace `options?.inCI·&&·process.env["PUSHGATEWAY_URL"]·&&·process.env["CI_JOB_NAME"]` with `⏎······options?.inCI·&&⏎······process.env["PUSHGATEWAY_URL"]·&&⏎······process.env["CI_JOB_NAME"]⏎····`

Check failure on line 545 in javascript/packages/orchestrator/src/orchestrator.ts

View workflow job for this annotation

GitHub Actions / build (20.x)

Replace `options?.inCI·&&·process.env["PUSHGATEWAY_URL"]·&&·process.env["CI_JOB_NAME"]` with `⏎······options?.inCI·&&⏎······process.env["PUSHGATEWAY_URL"]·&&⏎······process.env["CI_JOB_NAME"]⏎····`
const jobId = process.env["CI_JOB_ID"];
const jobName = process.env["CI_JOB_NAME"];
const projectName = process.env["CI_PROJECT_NAME"] || "";
Expand All @@ -553,7 +553,7 @@ export async function start(
const body = [help, type, metricString, "\n"].join("\n");
debug!(`Sending metric with content:\n ${body}`);
await fetch(

Check failure on line 555 in javascript/packages/orchestrator/src/orchestrator.ts

View workflow job for this annotation

GitHub Actions / build (18.x)

Replace `⏎········process.env["PUSHGATEWAY_URL"],⏎·······` with `process.env["PUSHGATEWAY_URL"],`

Check failure on line 555 in javascript/packages/orchestrator/src/orchestrator.ts

View workflow job for this annotation

GitHub Actions / build (19.x)

Replace `⏎········process.env["PUSHGATEWAY_URL"],⏎·······` with `process.env["PUSHGATEWAY_URL"],`

Check failure on line 555 in javascript/packages/orchestrator/src/orchestrator.ts

View workflow job for this annotation

GitHub Actions / build (20.x)

Replace `⏎········process.env["PUSHGATEWAY_URL"],⏎·······` with `process.env["PUSHGATEWAY_URL"],`
"http://zombienet-prometheus-pushgateway.managed-monitoring:9091/metrics/job/zombie-metrics",
process.env["PUSHGATEWAY_URL"],
{
method: "POST",

Check failure on line 558 in javascript/packages/orchestrator/src/orchestrator.ts

View workflow job for this annotation

GitHub Actions / build (18.x)

Delete `··`

Check failure on line 558 in javascript/packages/orchestrator/src/orchestrator.ts

View workflow job for this annotation

GitHub Actions / build (19.x)

Delete `··`

Check failure on line 558 in javascript/packages/orchestrator/src/orchestrator.ts

View workflow job for this annotation

GitHub Actions / build (20.x)

Delete `··`
body,

Check failure on line 559 in javascript/packages/orchestrator/src/orchestrator.ts

View workflow job for this annotation

GitHub Actions / build (18.x)

Delete `··`

Check failure on line 559 in javascript/packages/orchestrator/src/orchestrator.ts

View workflow job for this annotation

GitHub Actions / build (19.x)

Delete `··`

Check failure on line 559 in javascript/packages/orchestrator/src/orchestrator.ts

View workflow job for this annotation

GitHub Actions / build (20.x)

Delete `··`
Expand Down

0 comments on commit 3226a2f

Please sign in to comment.