Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
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
9 changes: 9 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,15 @@ cargo-check-macos:
tags:
- osx

test-prometheus-alerting-rules:
stage: test
image: paritytech/tools:latest
<<: *kubernetes-build
script:
- curl -L https://github.com/prometheus/prometheus/releases/download/v2.19.0/prometheus-2.19.0.linux-amd64.tar.gz --output prometheus.tar.gz
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not add it to the base image?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of reasons (not strong opinions though):

  • I doubt any other user of the paritytech/tools image would use promtool.

  • With the above in mind it adds an additional 49 MB to the image.

  • When we want to update to a newer version of promtool we need to touch the image.

  • The pipeline step is not the bottleneck of the stage (13s vs. 18 m and 46 s for test-linux-stable).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We always download this file, for each run. We need to touch the yaml file for updating the version with this approach.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I let @TriplEight decide.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now promtool is already in the tools image.

- tar -xzf prometheus.tar.gz
- ./prometheus-*/promtool check rules .maintain/monitoring/alerting-rules/alerting-rules.yaml

#### stage: build

check-polkadot-companion-status:
Expand Down