Skip to content

Commit

Permalink
ci: Skip monitoring if secrets are not present (#2880)
Browse files Browse the repository at this point in the history
  • Loading branch information
marun authored Mar 29, 2024
1 parent 835d9ff commit d046f29
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,18 +68,22 @@ jobs:
shell: bash
run: ./scripts/build.sh -r
- name: Start prometheus
# Only run for the original repo; a forked repo won't have access to the monitoring credentials
if: (github.event.pull_request.head.repo.full_name == github.repository) || (github.event.repository.fork == false)
shell: bash
run: bash -x ./scripts/run_prometheus.sh
env:
PROMETHEUS_ID: ${{ secrets.PROMETHEUS_ID }}
PROMETHEUS_PASSWORD: ${{ secrets.PROMETHEUS_PASSWORD }}
- name: Start promtail
if: (github.event.pull_request.head.repo.full_name == github.repository) || (github.event.repository.fork == false)
shell: bash
run: bash -x ./scripts/run_promtail.sh
env:
LOKI_ID: ${{ secrets.LOKI_ID }}
LOKI_PASSWORD: ${{ secrets.LOKI_PASSWORD }}
- name: Notify of metrics availability
if: (github.event.pull_request.head.repo.full_name == github.repository) || (github.event.repository.fork == false)
shell: bash
run: .github/workflows/notify-metrics-availability.sh
env:
Expand Down Expand Up @@ -118,18 +122,22 @@ jobs:
shell: bash
run: ./scripts/build.sh -r
- name: Start prometheus
# Only run for the original repo; a forked repo won't have access to the monitoring credentials
if: (github.event.pull_request.head.repo.full_name == github.repository) || (github.event.repository.fork == false)
shell: bash
run: bash -x ./scripts/run_prometheus.sh
env:
PROMETHEUS_ID: ${{ secrets.PROMETHEUS_ID }}
PROMETHEUS_PASSWORD: ${{ secrets.PROMETHEUS_PASSWORD }}
- name: Start promtail
if: (github.event.pull_request.head.repo.full_name == github.repository) || (github.event.repository.fork == false)
shell: bash
run: bash -x ./scripts/run_promtail.sh
env:
LOKI_ID: ${{ secrets.LOKI_ID }}
LOKI_PASSWORD: ${{ secrets.LOKI_PASSWORD }}
- name: Notify of metrics availability
if: (github.event.pull_request.head.repo.full_name == github.repository) || (github.event.repository.fork == false)
shell: bash
run: .github/workflows/notify-metrics-availability.sh
env:
Expand Down Expand Up @@ -167,18 +175,22 @@ jobs:
shell: bash
run: ./scripts/build.sh
- name: Start prometheus
# Only run for the original repo; a forked repo won't have access to the monitoring credentials
if: (github.event.pull_request.head.repo.full_name == github.repository) || (github.event.repository.fork == false)
shell: bash
run: bash -x ./scripts/run_prometheus.sh
env:
PROMETHEUS_ID: ${{ secrets.PROMETHEUS_ID }}
PROMETHEUS_PASSWORD: ${{ secrets.PROMETHEUS_PASSWORD }}
- name: Start promtail
if: (github.event.pull_request.head.repo.full_name == github.repository) || (github.event.repository.fork == false)
shell: bash
run: bash -x ./scripts/run_promtail.sh
env:
LOKI_ID: ${{ secrets.LOKI_ID }}
LOKI_PASSWORD: ${{ secrets.LOKI_PASSWORD }}
- name: Notify of metrics availability
if: (github.event.pull_request.head.repo.full_name == github.repository) || (github.event.repository.fork == false)
shell: bash
run: .github/workflows/notify-metrics-availability.sh
env:
Expand Down

0 comments on commit d046f29

Please sign in to comment.