GoogleCloudPlatform / prometheus-test-infra

Apache License 2.0
11 stars 3 forks source link

Adding GitHub Actions to build and publish the prombench image to GHCR #10

Closed saketjajoo closed 1 year ago

saketjajoo commented 1 year ago

Once a commit lands to the master (default) branch, this GH Action would get triggered to build the prombench image and publish it to GHCR.

Reference: GitHub Docs - Publishing and installing a package with GitHub Actions.

The reason to have the container image in GHCR (instead of GCR/GAR) is that it simplifies the project structure as everything required to build and trigger prombench lives within the GitHub ecosystem.

maxamins commented 1 year ago

nit:

  1. add in the description tutorial or api used to create this file.
  2. add reasoning behind using github repository.
bwplotka commented 1 year ago

I wonder, why not reusing prombench images? We don't build anything special. Essentially less copied infra = better if we can avoid it.

saketjajoo commented 1 year ago

There are some minor changes from the upstream prombench image - using the collector (with an option to have a custom version), changing the nginx service type and updating the scrape interval.

The image build process copies all the files (which have these changes) present in the prombench directory to the image. Hence, we cannot reuse the prombench image.

bwplotka commented 1 year ago

Ok, let's double check if really change the code for it.

However, same PR or similar would be needed in upstream so images are rebuild every commit unless it's done already