gitpod.v1.EnvironmentAutomationService

CreateTask

Creates a new automation task.

Use this method to:

  • Define one-off or scheduled tasks
  • Set up build or test automation
  • Configure task dependencies
  • Specify execution environments

Examples

  • Create basic task:

    Creates a simple build task.

    environmentId: "07e03a28-65a5-4d98-b532-8ea67b188048"
    metadata:
      reference: "build"
      name: "Build Project"
      description: "Builds the project artifacts"
      triggeredBy:
        - postEnvironmentStart: true
    spec:
      command: "npm run build"
    
  • Create task with dependencies:

    Creates a task that depends on other services.

    environmentId: "07e03a28-65a5-4d98-b532-8ea67b188048"
    metadata:
      reference: "test"
      name: "Run Tests"
      description: "Runs the test suite"
    spec:
      command: "npm test"
    dependsOn: ["d2c94c27-3b76-4a42-b88c-95a85e392c68"]
    
post/gitpod.v1.EnvironmentAutomationService/CreateTask

Request body

dependsOnstring[]
environmentIdstring uuid
metadataGitpodV1TaskMetadata — unresolved $ref
specGitpodV1TaskSpec — unresolved $ref

Response

Success

Changes