xref: /aosp_15_r20/external/googleapis/google/appengine/v1/deploy.proto (revision d5c09012810ac0c9f33fe448fb6da8260d444cc9)
1// Copyright 2022 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15syntax = "proto3";
16
17package google.appengine.v1;
18
19import "google/protobuf/duration.proto";
20
21option csharp_namespace = "Google.Cloud.AppEngine.V1";
22option go_package = "cloud.google.com/go/appengine/apiv1/appenginepb;appenginepb";
23option java_multiple_files = true;
24option java_outer_classname = "DeployProto";
25option java_package = "com.google.appengine.v1";
26option php_namespace = "Google\\Cloud\\AppEngine\\V1";
27option ruby_package = "Google::Cloud::AppEngine::V1";
28
29// Code and application artifacts used to deploy a version to App Engine.
30message Deployment {
31  // Manifest of the files stored in Google Cloud Storage that are included
32  // as part of this version. All files must be readable using the
33  // credentials supplied with this call.
34  map<string, FileInfo> files = 1;
35
36  // The Docker image for the container that runs the version.
37  // Only applicable for instances running in the App Engine flexible environment.
38  ContainerInfo container = 2;
39
40  // The zip file for this deployment, if this is a zip deployment.
41  ZipInfo zip = 3;
42
43  // Options for any Google Cloud Build builds created as a part of this
44  // deployment.
45  //
46  // These options will only be used if a new build is created, such as when
47  // deploying to the App Engine flexible environment using files or zip.
48  CloudBuildOptions cloud_build_options = 6;
49}
50
51// Single source file that is part of the version to be deployed. Each source
52// file that is deployed must be specified separately.
53message FileInfo {
54  // URL source to use to fetch this file. Must be a URL to a resource in
55  // Google Cloud Storage in the form
56  // 'http(s)://storage.googleapis.com/\<bucket\>/\<object\>'.
57  string source_url = 1;
58
59  // The SHA1 hash of the file, in hex.
60  string sha1_sum = 2;
61
62  // The MIME type of the file.
63  //
64  // Defaults to the value from Google Cloud Storage.
65  string mime_type = 3;
66}
67
68// Docker image that is used to create a container and start a VM instance for
69// the version that you deploy. Only applicable for instances running in the App
70// Engine flexible environment.
71message ContainerInfo {
72  // URI to the hosted container image in Google Container Registry. The URI
73  // must be fully qualified and include a tag or digest.
74  // Examples: "gcr.io/my-project/image:tag" or "gcr.io/my-project/image@digest"
75  string image = 1;
76}
77
78// Options for the build operations performed as a part of the version
79// deployment. Only applicable for App Engine flexible environment when creating
80// a version using source code directly.
81message CloudBuildOptions {
82  // Path to the yaml file used in deployment, used to determine runtime
83  // configuration details.
84  //
85  // Required for flexible environment builds.
86  //
87  // See https://cloud.google.com/appengine/docs/standard/python/config/appref
88  // for more details.
89  string app_yaml_path = 1;
90
91  // The Cloud Build timeout used as part of any dependent builds performed by
92  // version creation. Defaults to 10 minutes.
93  google.protobuf.Duration cloud_build_timeout = 2;
94}
95
96// The zip file information for a zip deployment.
97message ZipInfo {
98  // URL of the zip file to deploy from. Must be a URL to a resource in
99  // Google Cloud Storage in the form
100  // 'http(s)://storage.googleapis.com/\<bucket\>/\<object\>'.
101  string source_url = 3;
102
103  // An estimate of the number of files in a zip for a zip deployment.
104  // If set, must be greater than or equal to the actual number of files.
105  // Used for optimizing performance; if not provided, deployment may be slow.
106  int32 files_count = 4;
107}
108