Skip to content

Migrate Design command to Skill#87

Merged
haroonc merged 3 commits intomainfrom
migrate-design-skill
Mar 10, 2026
Merged

Migrate Design command to Skill#87
haroonc merged 3 commits intomainfrom
migrate-design-skill

Conversation

@yeshwanth1993
Copy link
Copy Markdown
Contributor

Fixes #<issue_number_goes_here>

It's a good idea to open an issue first for discussion.

  • Tests pass
  • Appropriate changes to documentation are included in the PR

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, 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 introduces a new capability to assist users in designing and implementing robust CI/CD pipelines on Google Cloud. It provides a structured approach, guiding users through architectural design and implementation phases, while incorporating best practices for containerization and deployment. The changes aim to streamline the process of setting up automated build and deployment workflows within a GCP environment.

Highlights

  • New Skill: Design CI/CD on GCP: Introduced a new skill, design-cicd-gcp, which acts as a Google Cloud DevOps Assistant to help users design, build, and manage CI/CD pipelines on Google Cloud. This skill includes a two-stage workflow for architectural design and plan implementation.
  • CI/CD Pattern Definitions: Added two new CI/CD pipeline patterns: 'Git Tag-Triggered Release' for controlled deployments and 'Trunk-Based Push-to-Deploy' for rapid iteration, complete with their stages, applicability, and tradeoffs.
  • Comprehensive Reference Guides: Included detailed documentation on best practices for generating cloudbuild.yaml files, creating idempotent Cloud Build triggers, and writing professional-grade Dockerfiles, covering topics like multi-stage builds and Cloud Run specifics.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • skills/design-cicd-gcp/SKILL.md
    • Added the core definition and operational logic for the new design-cicd-gcp skill.
  • skills/design-cicd-gcp/references/how_to_build_cloudbuild_yaml.md
    • Added a guide on how to automatically generate cloudbuild.yaml files based on application archetypes.
  • skills/design-cicd-gcp/references/how_to_create_cloudbuild_trigger.md
    • Added an end-to-end guide for creating idempotent Google Cloud Build triggers, including prerequisite checks.
  • skills/design-cicd-gcp/references/how_to_write_dockerfile.md
    • Added a comprehensive guide detailing best practices for writing Dockerfiles, including multi-stage builds and Cloud Run specifics.
  • skills/design-cicd-gcp/references/pattern_git_tag_triggered_release.txt
    • Added a CI/CD pattern definition for Git tag-triggered releases, outlining stages and tradeoffs.
  • skills/design-cicd-gcp/references/pattern_trunk_based_push_to_deploy.txt
    • Added a CI/CD pattern definition for trunk-based push-to-deploy workflows, detailing stages and tradeoffs.
Activity
  • The pull request description indicates that it fixes an issue, but the issue number was not provided.
  • The author has included checkboxes for 'Tests pass' and 'Appropriate changes to documentation are included in the PR', suggesting these are considerations for the PR's readiness.
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.

Copy link
Copy Markdown
Contributor

@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 new skill, "design-cicd-gcp", along with comprehensive documentation and patterns for building CI/CD pipelines on Google Cloud. The added files, including SKILL.md, how_to_build_cloudbuild_yaml.md, how_to_create_cloudbuild_trigger.md, how_to_write_dockerfile.md, and two pattern definition files, provide detailed guidance for the AI assistant. The documentation is generally well-structured and covers important best practices such as idempotency, multi-stage Docker builds, and security considerations. The overall approach to defining the AI's workflow and knowledge base is sound.

Note: Security Review has been skipped due to the limited scope of the PR.

haroonc and others added 2 commits March 10, 2026 12:46
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
* `package.json` → **Node.js**
* `requirements.txt` or `pyproject.toml` → **Python**
* `go.mod` → **Go**

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do we want to add a fall back? i.e. What to do if none of the given patterns match?

2. **Test**: Execute the project's unit tests. The test runner should match the archetype (e.g., `pytest` for Python, `go test` for Go, `mvn test` for Maven).
3. **Build Container**: Use the native `gcr.io/cloud-builders/docker` builder to build the container image from the `Dockerfile` in the repository.
4. **Push Container**: Push the newly built container image to the verified Artifact Registry repository.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should we suggest AA vuln scan for built containers using On-demand scanning?

* **Image Tagging**: The container image must be tagged with the `$SHORT_SHA` substitution variable. This ensures a unique, traceable image for every single commit.
* **Use the `images` Attribute**: The final image URI should be explicitly listed under the top-level `images` attribute in the `cloudbuild.yaml`. This allows Cloud Build to push the image concurrently with other build steps, potentially speeding up the build.
* **Enable Provenance**: To enhance supply chain security, build provenance should always be enabled. This is done by adding an `options` block and setting `requestedVerifyOption: VERIFIED`.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should we also add other preferred options by default?
e.g.

options:
  - automapSubstitutions: true
  - requestedVerifyOption: VERIFIED
  - dynamicSubstitutions: true


# Explicitly list the final image to be pushed for potential build speed improvements.
images:
- '${_LOCATION}-docker.pkg.dev/${PROJECT_ID}/${_REPO_NAME}/${_IMAGE_NAME}:$SHORT_SHA'
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You are using some env. variables some of these are substitutions e.g. $_IMAGE_NAME or $_REPO_NAME, we should provide guidance on how to set values for these substitutions.


---

## Example: Python Application
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

There should be an example for a multi-container application built via a single cloudbuild.yaml. e.g. a front-end and a back-end service in the app.

* **Action**: Parse the `cloudbuild.yaml` file to identify the Artifact Registry image path (e.g., `us-central1-docker.pkg.dev/my-project/my-app-repo/my-image`).
* **Extract** the repository portion (`us-central1-docker.pkg.dev/my-project/my-app-repo`).
* **Check** if this repository already exists in the target GCP project.
* **If it does not exist**: Create it using the available tools.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Does it make sense to call the specific tool from MCP server here?


### ### 3. Ensure Developer Connect and Repository Link Exist

Cloud Build triggers connect to source code via Developer Connect. The entire connection and repository link must be in place.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Not sure what you mean by this:
The entire connection and repository link must be in place.


Cloud Build triggers connect to source code via Developer Connect. The entire connection and repository link must be in place.

1. **Check for Connection**: First, check if a Developer Connect connection already exists for the relevant Git provider (e.g., GitHub) in the target project and region.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should there be guidance on how to pick a name for the connection? e.g. org name from GitHub URL or project name from GitLab URL etc.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Or we can simply say:

check if a connection exists in proposed project and region:
* if a single connection exists use it
* if there are more then one connections, use the one that matches with the git-url
* when no connections are found create one

@@ -0,0 +1,63 @@
---
name: design-cicd-gcp
description: Design and implement a Google Cloud based CI/CD pipeline. Use when the user wants to build a new pipeline, design an architecture on GCP.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: the word build is overloaded in this context, we can avoid that.

Suggested change
description: Design and implement a Google Cloud based CI/CD pipeline. Use when the user wants to build a new pipeline, design an architecture on GCP.
description: Design and implement a Google Cloud based CI/CD pipeline. Use when the user wants to create a new pipeline, design an CI/CD architecture on GCP.

@haroonc haroonc merged commit 66b56fb into main Mar 10, 2026
4 checks passed
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