| 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/builds/__pycache__/ |
Upload File : |
�
��b � � � d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddl m
Z
ddlmZ dd lm
Z
dd
lmZ ddlZ G d� d
ej � � ZdS )zCancel build command.� )�absolute_import)�division)�unicode_literals)�cloudbuild_util)�base)�flags)�log)�
properties)� resourcesNc �8 � e Zd ZdZddd�Zed� � � Zd� ZdS )�CancelzCancel an ongoing build.z�
To cancel a build `123-456-789`:
$ {command} '123-456-789'
You may also cancel multiple builds at the same time:
$ {command} '123-456-789', '987-654-321'
)�DESCRIPTION�EXAMPLESc � � t j | � � | � dt j dd�� � | j � d � � d S )N�builds�+zIDs of builds to cancel)� completer�nargs�help)r �
AddRegionFlag�add_argument�BuildsCompleter�display_info� AddFormat)�parsers �lib/surface/builds/cancel.py�ArgszCancel.Args/ s^ � � ������
�����'��
&� � (� (� (�
��!�!�$�'�'�'�'�'� c �Z � |j pt j }t j � � }t j � � }g }|j D ]�}t j � |t j
j j j
||d�d�� � }|j � |� |� � � |j |j �� � � � }t( j � d� t1 j |� � �� � � � |� |� � ��|S )z�This is what gets called when the user runs this command.
Args:
args: an argparse namespace. All the arguments that were provided to this
command invocation.
Returns:
Some value that we want to have printed later.
)�
projectsId�locationsId�buildsIdz$cloudbuild.projects.locations.builds)�params�
collection)�name� projectId�idzCancelled [{r}].
)�r)�regionr �DEFAULT_REGION�GetClientInstance�GetMessagesModuler r �REGISTRY�Parser
�VALUES�core�project� GetOrFail�projects_locations_buildsr
�CancelBuildRequest�RelativeNamer r"