| Server IP : 35.236.43.222 / Your IP : 216.73.216.143 Web Server : Apache System : Linux order-form-vm-001 5.10.0-37-cloud-amd64 #1 SMP Debian 5.10.247-1 (2025-12-11) x86_64 User : deploy ( 1002) PHP Version : 8.1.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /usr/lib/google-cloud-sdk/lib/surface/app/__pycache__/ |
Upload File : |
�
��� � � � d Z ddlmZ ddlmZ ddlmZ ddlZddlmZ ddlmZ ddl m
Z
dd lmZ dd
l
mZ ddl
mZ dd
dd�Z e
j e
j j � � e
j G d� de
j � � � � � � Z e
j e
j j � � e
j G d� de
j � � � � � � Zee_ ee_ dS )zThe gcloud app deploy command.� )�absolute_import)�division)�unicode_literalsN)�appengine_api_client)�runtime_builders)�base)�deploy_util)�log)�
properties�EDeploy the local code and/or configuration of your app to App Engine.a� This command is used to deploy both code and configuration to the App
Engine server. As an input it takes one or more DEPLOYABLES that should be
uploaded. A DEPLOYABLE can be a service's .yaml file or a configuration's
.yaml file (for more information about configuration files specific to your
App Engine environment, refer to
https://cloud.google.com/appengine/docs/standard/configuration-files
or
https://cloud.google.com/appengine/docs/flexible/configuration-files).
Note, for Java 8 Standard apps or Java 11/17/21 Standard apps using bundled
services, you must add the path to the appengine-web.xml file inside the
WEB-INF directory. gcloud app deploy skips files specified in the
.gcloudignore file (see gcloud topic gcloudignore for more information).
For Java 11 Standard, you can either use the yaml file, a Maven pom.xml, or
a Gradle build.gradle. Alternatively, if the application is a single
self-contained jar, you can give the path to the jar and a simple service
configuration will be generated. You can deploy Java 11 Maven source
projects by specifying the location of your project's pom.xml file, and it
will be built and deployed using App Engine Buildpacks.
a To deploy a single service, run:
$ {command} ~/my_app/app.yaml
To deploy an App Engine Standard Java8 service or a Java11 service using bundled services, run:
$ {command} ~/my_app/WEB-INF/appengine-web.xml
To deploy an App Engine Standard Java11 single jar, run:
$ {command} ~/my_app/my_jar.jar
To deploy an App Engine Standard Java11 Maven source project, run:
$ {command} ~/my_app/pom.xml
To deploy an App Engine Standard Java11 Gradle source project, run:
$ {command} ~/my_app/build.gradle
By default, the service is deployed to the current project configured
via:
$ gcloud config set core/project PROJECT
To override this value for a single deployment, use the ``--project''
flag:
$ {command} ~/my_app/app.yaml --project=PROJECT
To deploy multiple services, run:
$ {command} ~/my_app/app.yaml ~/my_app/another_service.yaml
To change the default --promote behavior for your current
environment, run:
$ gcloud config set app/promote_by_default false
To deploy a service that will run as a service account, run:
$ {command} ~/my_app/app.yaml --service-account=SERVICE_ACCOUNT
)�brief�DESCRIPTION�EXAMPLESc �4 � e Zd ZdZed� � � Zd� Zd� ZdS )�DeployGAr c �. � t j | � � dS �zGet arguments for this command.N�r �
ArgsDeploy��parsers �lib/surface/app/deploy.py�Argsz
DeployGA.Argsk � � � ��6�"�"�"�"�"� c � � t j t j j � � }t j | � � � � � }|t j j k r&| �
� � rt j j }nt j j
}t j |||dt j |�� � �� � S )NF��default_strategy)�runtime_builder_strategy�parallel_build�flex_image_build_option)r �GetRuntimeBuilderStrategyr �ReleaseTrack�GAr �GetApiClientForTrackr �RuntimeBuilderStrategy�NEVER�_ServerSideExperimentEnabled�FlexImageBuildOptions� ON_SERVER� ON_CLIENT� RunDeploy�GetFlexImageBuildOption)�self�argsr �
api_client�flex_image_build_option_defaults r �RunzDeployGA.Runp s� � �*�D���� � ��%�:�4�;L�;L�;N�;N�O�O�J� ��/�5� 6� 6��)�)�+�+� 6� )4�(I�(S�%�%�(3�(I�(S�%�� ���!9�� +� C�<�!
� !
� !
�� � � r c �8 � t j j j � d�� � } t
j � |� � }|� t
j j d� � }t t j t j j
j � � � � d� � � � � � � d� � dz }||k S # t
j $ r$}t% j d|z d�� � Y d }~d
S d }~ww xY w)ay Evaluates whether the build on server-side experiment is enabled for the project.
The experiment is enabled for a project if the sha256 hash of the
projectID mod 100 is smaller than the current experiment rollout percent.
Returns:
false if the experiment is not enabled for this project or the
experiment config cannot be read due to an error
T)�requiredr zutf-8� �d zzExperiment config file could not be read. This error is informational, and does not cause a deployment to fail. Reason: %s)�exc_infoNF)r �VALUES�app�runtime_builders_root�Getr �Experiments�LoadFromURI�GetExperimentPercentWithDefault�TRIGGER_BUILD_SERVER_SIDE�int�hashlib�sha256�core�project�encode� hexdigest�ExperimentsErrorr
�debug)r. �runtimes_builder_root�experiment_config�experiment_percent�project_hash�es r r( z%DeployGA._ServerSideExperimentEnabled� s4 � � '�-�1�G�K�K�� L� � ���*�6�B�B�
�!� !��,�L�L�
�
&�
@�!�E� E���
�.���$�,�0�0�2�2�9�9�'�B�B�D� D�DM�I�K�K�
�� � ��l� �.�
.�.���,� � � � �i����%)�+� +� +� +� �U�U�U�U�U��������s �B9C&