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.
Test your custom sample by following the steps to create an app from a custom sample.
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 |
{ "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." } ] }
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 |
{ "path":"path/to/sample1", "name":"My Sample 1", "description":"The first sample of its name." }
Key | Description | Type |
version | The version of the sample schema to use. The only valid version is 1 . | String |
{ "version":"1" }
To delete a custom sample, which removes it from the custom application selector flow and from users' machines:
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" } ],
Delete the template folder at the path.
Delete the custom sample section from the settings.json
file.
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-04-17 UTC.