Action

Specifies a single action that runs a Docker container.

JSON representation
{
  "name": string,
  "imageUri": string,
  "commands": [
    string
  ],
  "entrypoint": string,
  "environment": {
    string: string,
    ...
  },
  "pidNamespace": string,
  "flags": [
    enum (Flag)
  ],
  "portMappings": {
    string: number,
    ...
  },
  "mounts": [
    {
      object (Mount)
    }
  ],
  "labels": {
    string: string,
    ...
  },
  "credentials": {
    object (Secret)
  },
  "timeout": string
}
Fields
name

string

An optional name for the container. The container hostname will be set to this name, making it useful for inter-container communication. The name must contain only upper and lowercase alphanumeric characters and hypens and cannot start with a hypen.

imageUri

string

The URI to pull the container image from. Note that all images referenced by actions in the pipeline are pulled before the first action runs. If multiple actions reference the same image, it is only pulled once, ensuring that the same image is used for all actions in a single pipeline.

commands[]

string

If specified, overrides the CMD specified in the container. If the container also has an ENTRYPOINT the values are used as entrypoint arguments. Otherwise, they are used as a command and arguments to run inside the container.

entrypoint

string

If specified, overrides the ENTRYPOINT specified in the container.

environment

map (key: string, value: string)

The environment to pass into the container. This environment is merged with any values specified in the Pipeline message. These values overwrite any in the Pipeline message.

In addition to the values passed here, a few other values are automatically injected into the environment. These cannot be hidden or overwritten.

GOOGLE_PIPELINE_FAILED will be set to "1" if the pipeline failed because an action has exited with a non-zero status (and did not have the IGNORE_EXIT_STATUS flag set). This can be used to determine if additional debug or logging actions should execute.

GOOGLE_LAST_EXIT_STATUS will be set to the exit status of the last non-background action that executed. This can be used by workflow engine authors to determine whether an individual action has succeeded or failed.

pidNamespace

string

An optional identifier for a PID namespace to run the action inside. Multiple actions should use the same string to share a namespace. If unspecified, a separate isolated namespace is used.

flags[]

enum (Flag)

The set of flags to apply to this action.

portMappings

map (key: number, value: number)

A map of containers to host port mappings for this container. If the container already specifies exposed ports, use the PUBLISH_EXPOSED_PORTS flag instead.

The host port number must be less than 65536. If it is zero, an unused random port is assigned. To determine the resulting port number, consult the ContainerStartedEvent in the operation metadata.

mounts[]

object (Mount)

A list of mounts to make available to the action.

In addition to the values specified here, every action has a special virtual disk mounted under /google that contains log files and other operational components.

  • /google/logs

    All logs written during the pipeline execution.

  • /google/logs/output

    The combined standard output and standard error of all actions run as part of the pipeline execution.

  • /google/logs/action/*/stdout

    The complete contents of each individual action's standard output.

  • /google/logs/action/*/stderr

    The complete contents of each individual action's standard error output.

labels

map (key: string, value: string)

Labels to associate with the action. This field is provided to assist workflow engine authors in identifying actions (for example, to indicate what sort of action they perform, such as localization or debugging). They are returned in the operation metadata, but are otherwise ignored.

credentials

object (Secret)

If the specified image is hosted on a private registry other than Google Container Registry, the credentials required to pull the image must be specified here as an encrypted secret.

The secret must decrypt to a JSON-encoded dictionary containing both username and password keys.

timeout

string (Duration format)

The maximum amount of time to give the action to complete. If the action fails to complete before the timeout, it will be terminated and the exit status will be non-zero. The pipeline will continue or terminate based on the rules defined by the ALWAYS_RUN and IGNORE_EXIT_STATUS flags.

A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s".

Mount

Carries information about a particular disk mount inside a container.

JSON representation
{
  "disk": string,
  "path": string,
  "readOnly": boolean
}
Fields
disk

string

The name of the disk to mount, as specified in the resources section.

path

string

The path to mount the disk inside the container.

readOnly

boolean

If true, the disk is mounted read-only inside the container.

Secret

Holds encrypted information that is only decrypted and stored in RAM by the worker VM when running the pipeline.

JSON representation
{
  "keyName": string,
  "cipherText": string
}
Fields
keyName

string

The name of the Cloud KMS key that will be used to decrypt the secret value. The VM service account must have the required permissions and authentication scopes to invoke the decrypt method on the specified key.

cipherText

string

The value of the cipherText response from the encrypt method. This field is intentionally unaudited.

¿Te ha resultado útil esta página? Enviar comentarios:

Enviar comentarios sobre...