Skip to content

Conversation

@daniel-cit
Copy link
Owner

This PR adds support for using GitHub and GitLab in the deploy helper

@gemini-code-assist
Copy link

Summary of Changes

Hello @daniel-cit, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the flexibility of the foundation deployer by extending its CI/CD integration capabilities to include GitHub Actions and GitLab CI/CD. It introduces a streamlined mechanism for configuring different build environments through a new helper script and updates the core Go deployment tool to interact seamlessly with these new platforms. These changes aim to simplify the setup and management of CI/CD pipelines, offering users more choices for their version control and automation needs.

Highlights

  • CI/CD Platform Support: Introduced support for GitHub Actions and GitLab CI/CD within the deploy helper, alongside existing Cloud Build functionality.
  • Automated Build Type Configuration: Added a new choose_build_type.sh helper script to automate the setup of Terraform files (variables, outputs, versions) for a selected CI/CD platform (Cloud Build, GitHub, GitLab, Jenkins, Terraform Cloud).
  • Modular Terraform Configuration: Refactored 0-bootstrap Terraform files by renaming generic *.tf files to build_*.tf and creating new outputs_*.tf.example and versions_*.tf.example files specific to each CI/CD provider, enabling easier switching between build types.
  • Go Deployer Tool Enhancements: Updated the foundation-deployer Go helper tool to integrate with GitHub and GitLab APIs, allowing it to trigger, monitor, and retry builds on these platforms. This includes new Go packages for GitHub and GitLab interactions.
  • Conditional Resource Deployment: Modified Terraform configurations in 4-projects to conditionally deploy or enable resources (e.g., IAM bindings, artifact registry builds) based on whether Cloud Build is the active deployment mechanism.
  • Documentation Updates: Updated README files for GitHub, GitLab, Jenkins, and Terraform Cloud to reflect the new choose_build_type.sh script and simplified setup instructions.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@daniel-cit daniel-cit changed the title Feat add support for GitHub and gitlab in helper feat: add support for GitHub and GitLab in the deploy helper Nov 6, 2025
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a significant and valuable feature by adding support for GitHub Actions and GitLab CI/CD to the deployment helper, in addition to the existing Cloud Build support. The refactoring is extensive, involving the creation of a new Executor abstraction in the Go helper, splitting Terraform configurations, and adding a new script to manage build types. This greatly improves the flexibility of the foundation.

The overall implementation is well-structured. I've identified a critical bug in how environment variables for CI/CD tokens are handled, which needs to be addressed. I also have a few suggestions for improving the new shell script and some of the new Go code for better robustness and readability.

@daniel-cit
Copy link
Owner Author

/gemini review

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a significant refactoring to add support for GitHub and GitLab as CI/CD providers in the deploy helper. The changes include a new script and Go functions to switch between build types, a restructuring of Terraform files, and the abstraction of CI/CD interactions within the Go application. While the overall structure is sound, I've identified a few high-severity issues concerning flawed logic in environment variable handling, inverted retry logic in the new API clients, and a discrepancy in file renaming logic. Additionally, there are some minor copy-paste errors in the documentation. My review includes specific suggestions to address these points.

@daniel-cit
Copy link
Owner Author

/gemini review

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a significant feature by adding support for GitHub and GitLab as CI/CD providers, alongside the existing Cloud Build option. The changes are well-structured, introducing a helper script to switch between build types and refactoring the Go deployer application to use an Executor interface, which is a great design choice for modularity. My review focuses on ensuring the new manual setup instructions are correct and robust, as I've found some critical issues with script paths and permissions in the README files. I've also included some suggestions to improve script robustness and code clarity.

@daniel-cit daniel-cit force-pushed the feat-add-support-for-github-and-gitlab-in-helper branch from 7ff1010 to 30df6ad Compare November 7, 2025 18:48
@daniel-cit
Copy link
Owner Author

/gemini review

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a significant and well-executed refactoring to add support for GitHub and GitLab as CI/CD providers in the deploy helper, alongside the existing Cloud Build support. The changes modularize the Terraform configurations and the Go deployer application effectively, simplifying the setup process for different CI/CD systems with the new choose_build_type.sh script and corresponding Go logic. The use of an Executor interface is a solid design choice for abstracting provider-specific interactions. My review includes a few suggestions to improve the robustness of the new CI/CD integration logic, primarily by replacing fixed-time sleeps with more reliable polling mechanisms.

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.

2 participants