xref: /aosp_15_r20/external/googleapis/google/appengine/v1beta/deploy.proto (revision d5c09012810ac0c9f33fe448fb6da8260d444cc9)
1// Copyright 2021 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.v1beta;
18
19import "google/protobuf/duration.proto";
20
21option csharp_namespace = "Google.Cloud.AppEngine.V1Beta";
22option go_package = "google.golang.org/genproto/googleapis/appengine/v1beta;appengine";
23option java_multiple_files = true;
24option java_outer_classname = "DeployProto";
25option java_package = "com.google.appengine.v1beta";
26option php_namespace = "Google\\Cloud\\AppEngine\\V1beta";
27option ruby_package = "Google::Cloud::AppEngine::V1beta";
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  // Google Cloud Build build information. Only applicable for instances running
44  // in the App Engine flexible environment.
45  BuildInfo build = 5;
46
47  // Options for any Google Cloud Build builds created as a part of this
48  // deployment.
49  //
50  // These options will only be used if a new build is created, such as when
51  // deploying to the App Engine flexible environment using files or zip.
52  CloudBuildOptions cloud_build_options = 6;
53}
54
55// Single source file that is part of the version to be deployed. Each source
56// file that is deployed must be specified separately.
57message FileInfo {
58  // URL source to use to fetch this file. Must be a URL to a resource in
59  // Google Cloud Storage in the form
60  // 'http(s)://storage.googleapis.com/\<bucket\>/\<object\>'.
61  string source_url = 1;
62
63  // The SHA1 hash of the file, in hex.
64  string sha1_sum = 2;
65
66  // The MIME type of the file.
67  //
68  // Defaults to the value from Google Cloud Storage.
69  string mime_type = 3;
70}
71
72// Docker image that is used to create a container and start a VM instance for
73// the version that you deploy. Only applicable for instances running in the App
74// Engine flexible environment.
75message ContainerInfo {
76  // URI to the hosted container image in Google Container Registry. The URI
77  // must be fully qualified and include a tag or digest.
78  // Examples: "gcr.io/my-project/image:tag" or "gcr.io/my-project/image@digest"
79  string image = 1;
80}
81
82// Google Cloud Build information.
83message BuildInfo {
84  // The Google Cloud Build id.
85  // Example: "f966068f-08b2-42c8-bdfe-74137dff2bf9"
86  string cloud_build_id = 1;
87}
88
89// Options for the build operations performed as a part of the version
90// deployment. Only applicable for App Engine flexible environment when creating
91// a version using source code directly.
92message CloudBuildOptions {
93  // Path to the yaml file used in deployment, used to determine runtime
94  // configuration details.
95  //
96  // Required for flexible environment builds.
97  //
98  // See https://cloud.google.com/appengine/docs/standard/python/config/appref
99  // for more details.
100  string app_yaml_path = 1;
101
102  // The Cloud Build timeout used as part of any dependent builds performed by
103  // version creation. Defaults to 10 minutes.
104  google.protobuf.Duration cloud_build_timeout = 2;
105}
106
107// The zip file information for a zip deployment.
108message ZipInfo {
109  // URL of the zip file to deploy from. Must be a URL to a resource in
110  // Google Cloud Storage in the form
111  // 'http(s)://storage.googleapis.com/\<bucket\>/\<object\>'.
112  string source_url = 3;
113
114  // An estimate of the number of files in a zip for a zip deployment.
115  // If set, must be greater than or equal to the actual number of files.
116  // Used for optimizing performance; if not provided, deployment may be slow.
117  int32 files_count = 4;
118}
119