Skip to content

Migrate Deploy command to Skill#91

Closed
alex-doudou wants to merge 3 commits intogemini-cli-extensions:mainfrom
alex-doudou:main
Closed

Migrate Deploy command to Skill#91
alex-doudou wants to merge 3 commits intogemini-cli-extensions:mainfrom
alex-doudou:main

Conversation

@alex-doudou
Copy link

  • Migrate Deploy command to Skill

@gemini-code-assist
Copy link
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 deploy-cicd-gcp skill designed to act as a comprehensive Google Cloud DevOps Assistant. Its primary purpose is to streamline and automate the deployment of various application types to Google Cloud, offering tailored workflows for static sites (Google Cloud Storage) and containerized applications (Google Cloud Run with buildpacks or from an image). The skill emphasizes intelligent application analysis, robust error handling, and integrated security measures like secret scanning, ultimately aiming to simplify the GCP deployment process for users.

Highlights

  • New Skill Introduced: A new skill, deploy-cicd-gcp, was added to facilitate Google Cloud deployments, acting as a comprehensive DevOps Assistant.
  • Intelligent Workflow Selection: The skill incorporates logic to analyze application types (static vs. dynamic) and select appropriate deployment workflows, including Google Cloud Storage, Cloud Run with Buildpacks, or Cloud Run from Image.
  • Security and Error Handling: Universal protocols were defined for secret scanning before deployment and a structured error handling mechanism to guide users through issues.
  • Automated Parameter Gathering: The skill includes steps to gather necessary deployment parameters and clarify missing information from the user, enhancing the deployment process.

🧠 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/gcp-cicd-deploy/SKILL.md
    • Defined the deploy-cicd-gcp skill for Google Cloud deployments.
    • Outlined the core operational logic for intent and application type analysis.
    • Detailed three distinct deployment workflows: Google Cloud Storage, Google Cloud Run with Buildpacks, and Google Cloud Run from Image.
    • Established universal protocols for secret scanning, error handling, and execution mandates.
Activity
  • No human activity has been recorded on this pull request yet.
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.

@google-cla
Copy link

google-cla bot commented Mar 11, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Copy link
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 migrates the Deploy command to a Skill by adding a new SKILL.md file. The new skill definition is well-structured, but I've found several typos and grammatical errors in the markdown file. Correcting these will improve the clarity and professionalism of the documentation. I've added specific comments with suggestions for each issue.

## Core Operational Logic: Intent Analysis

### **Explain your plan:**
* Before taking any actions, clearly explain to the user what your going to do.
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

There's a grammatical error here. 'your' should be 'you're'.

Suggested change
* Before taking any actions, clearly explain to the user what your going to do.
* Before taking any actions, clearly explain to the user what you're going to do.


### **Explain your plan:**
* Before taking any actions, clearly explain to the user what your going to do.
* Frist explain your plan and then perform anaylises of the project.
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

There are a couple of typos on this line: 'Frist' should be 'First', and 'anaylises' should be 'analyses'.

Suggested change
* Frist explain your plan and then perform anaylises of the project.
* Frist explain your plan and then perform analyses of the project.

* Frist explain your plan and then perform anaylises of the project.
* Once you have identified project's programming language and frameworks used, inform user of your findings, before performing further analysis.

### **Application Type Analysis (Mandatory First Step):** Before taking any action, first analyse project to determine if it is a Static Site or a Dynamic Service.
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

For consistency with the rest of the document (e.g., line 20), 'analyse' should be spelled 'analyze'.

Suggested change
### **Application Type Analysis (Mandatory First Step):** Before taking any action, first analyse project to determine if it is a Static Site or a Dynamic Service.
### **Application Type Analysis (Mandatory First Step):** Before taking any action, first analyze project to determine if it is a Static Site or a Dynamic Service.

* If the type is a static application, follow **Workflow A: Google Cloud Storage**.
* If the type is a container based application, ask the user if they would like to deploy to Cloud Run using buildpacks or build an image.
* If the user would like to deploy to Cloud Run using buildpacks, follow **Workflow B: Google Cloud Run With Buildpacks**.
* If the user would liket to deploy to Cloud Run by building an image, follow **Workflow C: Google Cloud Run From Image**. Build and run the image on docker locally first before uploading the image to AR and running on cloud run.
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

There's a typo here: 'liket' should be 'like to'.

Suggested change
* If the user would liket to deploy to Cloud Run by building an image, follow **Workflow C: Google Cloud Run From Image**. Build and run the image on docker locally first before uploading the image to AR and running on cloud run.
* If the user would like to deploy to Cloud Run by building an image, follow **Workflow C: Google Cloud Run From Image**. Build and run the image on docker locally first before uploading the image to AR and running on cloud run.

Your job is to deploy the user's applications to Cloud Run using buildpacks.

1. **Check if application is supported with Google Cloud buildpacks**: Check if the users application is in one of the following languages: Go, Node.js, Python, Java, .NET, Ruby, PHP.
* **If application is in one of these lenguages Node.js, Go, Java, .NET, Ruby PHP, Python it is supported by build packs. Dockerfile is not needed. Skip step 2.
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

There's a typo ('lenguages' should be 'languages') and a missing comma between 'Ruby' and 'PHP'.

Suggested change
* **If application is in one of these lenguages Node.js, Go, Java, .NET, Ruby PHP, Python it is supported by build packs. Dockerfile is not needed. Skip step 2.
* **If application is in one of these languages Node.js, Go, Java, .NET, Ruby, PHP, Python it is supported by build packs. Dockerfile is not needed. Skip step 2.


1. **Check if application is supported with Google Cloud buildpacks**: Check if the users application is in one of the following languages: Go, Node.js, Python, Java, .NET, Ruby, PHP.
* **If application is in one of these lenguages Node.js, Go, Java, .NET, Ruby PHP, Python it is supported by build packs. Dockerfile is not needed. Skip step 2.
2. **Create DockerFile if not supported by buildpacks**: If the users application is not supported by buildpacks, as found in step 1, look up how to build a Dockerfile. Then create a multistage Dockerfile to containerize the application. Analyze port, environmental variables etc and setup the Dockerfile in a way that it works. After that, ensure the Dockerfile can be built locally using the Docker cli.
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

For consistency with other mentions in the file (e.g., line 62), 'DockerFile' should be 'Dockerfile'.

Suggested change
2. **Create DockerFile if not supported by buildpacks**: If the users application is not supported by buildpacks, as found in step 1, look up how to build a Dockerfile. Then create a multistage Dockerfile to containerize the application. Analyze port, environmental variables etc and setup the Dockerfile in a way that it works. After that, ensure the Dockerfile can be built locally using the Docker cli.
2. **Create Dockerfile if not supported by buildpacks**: If the users application is not supported by buildpacks, as found in step 1, look up how to build a Dockerfile. Then create a multistage Dockerfile to containerize the application. Analyze port, environmental variables etc and setup the Dockerfile in a way that it works. After that, ensure the Dockerfile can be built locally using the Docker cli.

Your job is to deploy the user's applications to Cloud Run from an image.

1. **Create Dockerfile**: If a Dockerfile does not already exist, look up how to build a Dockerfile and create a multistage Dockerfile to containerize the application. Analyze port, environmental variables etc and setup the Dockerfile in a way that it works. Ensure the Dockerfile can be built locally using the Docker cli.
2. **Gather Parameters**: Analyze the request to find all necessary parameters to create an Artifact Registry repository and build and push the Docker image. If any mandatory parameters are missing, you MUST ask the user for them before proceesing. Do not guess or make assumptions.
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

There's a typo here: 'proceesing' should be 'proceeding'.

Suggested change
2. **Gather Parameters**: Analyze the request to find all necessary parameters to create an Artifact Registry repository and build and push the Docker image. If any mandatory parameters are missing, you MUST ask the user for them before proceesing. Do not guess or make assumptions.
2. **Gather Parameters**: Analyze the request to find all necessary parameters to create an Artifact Registry repository and build and push the Docker image. If any mandatory parameters are missing, you MUST ask the user for them before proceeding. Do not guess or make assumptions.


These rules apply to all workflows.

Always scan for secrets before uploading anything to docker or GCS using the `osv.scan_secrets` tool. Always ignore directories where scanning is not useful e.g. dependencies which the user has no control over e.g. .venv or go_modules etc. Warn the user of any secrets available and ask if the user wants to ignore these files using dockerignore and gitignore. If they would like to ignore the files, create the corresponding dockerignore and gitignore files. Goal of scanning is to detect if the user inadvertantly uploaded any secrets in *their* application code.
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

There's a typo here: 'inadvertantly' should be 'inadvertently'.

Suggested change
Always scan for secrets before uploading anything to docker or GCS using the `osv.scan_secrets` tool. Always ignore directories where scanning is not useful e.g. dependencies which the user has no control over e.g. .venv or go_modules etc. Warn the user of any secrets available and ask if the user wants to ignore these files using dockerignore and gitignore. If they would like to ignore the files, create the corresponding dockerignore and gitignore files. Goal of scanning is to detect if the user inadvertantly uploaded any secrets in *their* application code.
Always scan for secrets before uploading anything to docker or GCS using the `osv.scan_secrets` tool. Always ignore directories where scanning is not useful e.g. dependencies which the user has no control over e.g. .venv or go_modules etc. Warn the user of any secrets available and ask if the user wants to ignore these files using dockerignore and gitignore. If they would like to ignore the files, create the corresponding dockerignore and gitignore files. Goal of scanning is to detect if the user inadvertently uploaded any secrets in *their* application code.

### **Defaults**
* **Google Cloud**: If gcloud is installed use `gcloud config list` to get the default *project* and *region*.
* **Deployment Target**: You can propose default target name based on the following, BUT you **MUST** ask the user for confirmation before using it:
* If git is installed use `git remote get-url origin` to get the git url. From URL used repositoru name as default target name.
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

There's a typo here: 'repositoru' should be 'repository'.

Suggested change
* If git is installed use `git remote get-url origin` to get the git url. From URL used repositoru name as default target name.
* If git is installed use `git remote get-url origin` to get the git url. From URL used repository name as default target name.

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.

1 participant