Перейти к содержимому

POST /v2/templates/{templateID}/builds/{buildID}

Start template build (v2)

Start the build

Параметры

  • templateID · string · путь · обязательно

  • buildID · string · путь · обязательно

Тело запроса

Обязательно: да

application/json

Схема: TemplateBuildStartV2

  • fromImage · string · необязательно

    Image to use as a base for the template build

  • fromTemplate · string · необязательно

    Template to use as a base for the template build

  • fromImageRegistry · FromImageRegistry · необязательно

  • Вариант AWSRegistry · дискриминатор type = aws

  • fromImageRegistry<AWSRegistry>.type · aws · обязательно

    Type of registry authentication

    Допустимые значения: aws

  • fromImageRegistry<AWSRegistry>.awsAccessKeyId · string · обязательно

    AWS Access Key ID for ECR authentication

  • fromImageRegistry<AWSRegistry>.awsSecretAccessKey · string · обязательно

    AWS Secret Access Key for ECR authentication

  • fromImageRegistry<AWSRegistry>.awsRegion · string · обязательно

    AWS Region where the ECR registry is located

  • Вариант GCPRegistry · дискриминатор type = gcp

  • fromImageRegistry<GCPRegistry>.type · gcp · обязательно

    Type of registry authentication

    Допустимые значения: gcp

  • fromImageRegistry<GCPRegistry>.serviceAccountJson · string · обязательно

    Service Account JSON for GCP authentication

  • Вариант GeneralRegistry · дискриминатор type = registry

  • fromImageRegistry<GeneralRegistry>.type · registry · обязательно

    Type of registry authentication

    Допустимые значения: registry

  • fromImageRegistry<GeneralRegistry>.username · string · обязательно

    Username to use for the registry

  • fromImageRegistry<GeneralRegistry>.password · string · обязательно

    Password to use for the registry

  • force · boolean · необязательно

    Whether the whole build should be forced to run regardless of the cache

    По умолчанию: false

  • steps · array<TemplateStep> · необязательно

    List of steps to execute in the template build

    По умолчанию: []

  • steps.type · string · обязательно

    Type of the step

  • steps.args · array<string> · необязательно

    Arguments for the step

    По умолчанию: []

  • steps.filesHash · string · необязательно

    Hash of the files used in the step

  • steps.force · boolean · необязательно

    Whether the step should be forced to run regardless of the cache

    По умолчанию: false

  • startCmd · string · необязательно

    Start command to execute in the template after the build

  • readyCmd · string · необязательно

    Ready check command to execute in the template after the build

Ответы

202

The build has started

401

Authentication error

Content-Type: application/json

Схема: Error

  • code · integer · обязательно

    Error code

    Формат: int32

  • message · string · обязательно

    Error

500

Server error

Content-Type: application/json

Схема: Error

  • code · integer · обязательно

    Error code

    Формат: int32

  • message · string · обязательно

    Error