Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First cut at CloudBuild config #146

Merged
merged 6 commits into from
Aug 19, 2024
Merged

Conversation

AlCutter
Copy link
Collaborator

@AlCutter AlCutter commented Aug 16, 2024

This PR adds a first cut of a Cloud Build config for the Tessera repo.

It's mostly a trimmed-down version of the same thing from the distributor repo.

This is primarily intended to provide support for doing CI/CD for the Tessera GCP backend via the example-gcp binary.

Towards #7.

@codecov-commenter
Copy link

codecov-commenter commented Aug 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 36.01%. Comparing base (46ec9c2) to head (1790c93).
Report is 66 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #146      +/-   ##
==========================================
+ Coverage   35.80%   36.01%   +0.20%     
==========================================
  Files          16       33      +17     
  Lines        1363     2824    +1461     
==========================================
+ Hits          488     1017     +529     
- Misses        801     1697     +896     
- Partials       74      110      +36     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@AlCutter AlCutter marked this pull request as ready for review August 16, 2024 17:58
Copy link
Contributor

Choose a reason for hiding this comment

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

WDYT about a subdirectory like live/gcp/cloudbuild ? At the moment this is disambiguated by different cloud providers having different naming, which seems like it could get hard to understand if any author/user doesn't have a good mental map of all these names?

This would also affect the modules directory. I imagine both modules and live would contain {gcp, aws, local} or something like that? The other option is to refactor later, but it's a bit messier/riskier because there are non statically-built links like docs and the terraform files that are only checked at runtime.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah, good call - done.

@@ -0,0 +1,14 @@
# Cloudbuild Triggers and Steps

This directory contains a terragrunt file that can be deployed using `terragrunt apply` to define the necessary triggers and steps in GCB.
Copy link
Contributor

Choose a reason for hiding this comment

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

Link to terragrunt installation docs?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

These are linked from the README in the higher-level deployment directory, I've added a ptr to there.

required_providers {
google = {
source = "hashicorp/google"
version = "5.14.0"
Copy link
Contributor

Choose a reason for hiding this comment

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

Lastest version is 5.41. Would recommend using the latest version (if not now, in a follow-up PR). Usually there are no changes needed, but with this many releases, there could be...

https://registry.terraform.io/providers/hashicorp/google/latest

Relatedly, but orthogonally, we should look at dependabot for these config bumps. https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#terraform suggests the feature is there, but the TL;DR of dependabot/dependabot-core#8725 is "use renovate".

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Bumped.

@AlCutter AlCutter merged commit a419214 into transparency-dev:main Aug 19, 2024
8 checks passed
@AlCutter AlCutter deleted the cloudbuild branch August 19, 2024 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants