A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://cloud.google.com/code/docs/vscode/set-up-sample-repo below:

Manage custom sample repositories in Cloud Code for VS Code

Skip to main content Manage custom sample repositories in Cloud Code for VS Code

Stay organized with collections Save and categorize content based on your preferences.

A sample repository is a Git repository that contains custom samples you create that your team can use to develop applications.

This means that, within an organization or team, you can set up sample repositories with Cloud Code, custom to your organization, to offer a standard set of starter applications, services, and infrastructure configuration that others can use. This helps align new projects with your organization's preferred technical stack and standards, and encourages best practices at the beginning of the development cycle.

A sample repository can be an existing repository of sample applications you've already created or a new set of samples you'd like others to use. To import a repository with Cloud Code, you add a sample descriptor file to the repository.

When ready, sample repositories are easy to share with your team; they'll need Cloud Code set up and the Git URL of the sample repository to use. For private Git repositories, only members that have access to the repository can use the underlying custom samples.

To see an example of how a sample repository might be set up, reference this repository.

Before you begin

Make sure that Git version 2.25.0 or later is installed on your local machine.

Creating a sample repository

To use an existing repository, skip to creating a sample descriptor file. To create a new repository to use as a sample repository, follow these steps:

  1. Create a new Git repository.

    Your Git repository can be hosted remotely or live on your local machine. This example uses a new GitHub repository, 'custom-sample-repo'.

  2. Add sample directories to the repository.

    Your sample directories can contain anything and be located anywhere you want in the repository. In this example, two sample directories, 'hello-world' and 'kubernetes-custom-sample', have been added to 'custom-sample-repo'.

    A readme file with instructions on how best to use your custom samples is highly recommended.

  3. Create a sample descriptor file.

    A sample descriptor file provides Cloud Code with information on your sample to properly create your application. This file must be named .cctemplate, must be located in your root directory, and must have the schema defined in the sample descriptor file schema section.

  4. Test your custom sample by following the steps to create an app from a custom sample.

Sample descriptor schema Key Description Type metadata Metadata used by Cloud Code to read. Conforms to the metadata schema. Metadata templates Array of samples contained in a repository. Objects in this array must conform to the Sample Schema. Array<Sample> name (optional) Name of the sample repository. String Example
{
   "metadata":{
      "version":"1"
   },
   "name": "My Sample Repository",
   "templates":[
      {
         "path":"/path/to/sample1_location",
         "name":"My Sample 1",
         "description":"The first sample of its name."
      },
      {
         "path":"/path/to/sample2_location",
         "name":"My Sample 2",
         "description":"The sequel."
      }
   ]
}
Sample schema Key Description Type path The location of the sample in a repository.
The path is relative to the root of the repository. String name Name of a sample.
The name is displayed in an IDE when selecting a sample to base an application on. String description (optional) Description of a sample.
The description is displayed in an IDE when selecting a sample to base an application on. String Example
{
   "path":"path/to/sample1",
   "name":"My Sample 1",
   "description":"The first sample of its name."
}
Metadata schema Key Description Type version The version of the sample schema to use. The only valid version is 1. String Example
{
   "version":"1"
}
Deleting a custom sample repository

To delete a custom sample, which removes it from the custom application selector flow and from users' machines:

  1. In the settings.json file, look up the localPath for the custom sample entry.

    "cloudcode.customApplications": [
      {
        "repoUrl": https://github.com/GoogleCloudPlatform/cloud-code-custom-samples-example.git,
        "branchName": "",
        "localPath": "/Users/username/Library/cloud-code/custom-templates/https-github-com-google-cloud-platform-cloud-code-custom-samples-example-git"
      }
    ],
    
  2. Delete the template folder at the path.

    Note: On Macs, Library is a hidden folder.
  3. Delete the custom sample section from the settings.json file.

Get Support

To send feedback, report issues on

GitHub

, or ask a question on

Stack Overflow

.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-08-07 UTC.

[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["A sample repository is a Git repository containing custom samples that teams can use to develop applications, ensuring alignment with the organization's technical standards and best practices."],["Sample repositories can be existing or new, and require a `.cctemplate` sample descriptor file in the root directory to be properly imported and used by Cloud Code."],["Sharing sample repositories involves providing the Git URL to team members with Cloud Code setup, and private repositories will restrict access to authorized members."],["The `.cctemplate` file contains metadata, such as the sample schema version and an array of samples, each with a specified path, name, and description."],["Deleting a custom sample repository involves removing its folder from the designated `localPath` and deleting its entry in the `settings.json` file."]]],[]]


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4