cicd

package
v0.1.0-preview Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 2, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package cicd is the resource module for CI/CD pipelines and builds.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Build

type Build struct {
	ID          string    `json:"id"`
	PipelineID  string    `json:"pipeline_id"`
	Status      string    `json:"status"`
	Branch      string    `json:"branch"`
	CommitSHA   string    `json:"commit_sha,omitempty"`
	TriggeredBy string    `json:"triggered_by,omitempty"`
	LogsURL     string    `json:"logs_url,omitempty"`
	CreatedAt   time.Time `json:"created_at,omitempty"`
	StartedAt   time.Time `json:"build_started_at,omitempty"`
	CompletedAt time.Time `json:"build_completed_at,omitempty"`
	Error       string    `json:"error_message,omitempty"`
}

Build is one execution of a Pipeline.

type Builds

type Builds struct {
	// contains filtered or unexported fields
}

Builds is the sub-client for /api/v2/cicd/builds.

func (*Builds) Show

func (b *Builds) Show(ctx context.Context, buildID string) (*Build, error)

Show returns a single build by ID.

type Client

type Client struct {
	T       *transport.Transport
	NodeURL string
}

Client is the cicd facade.

func (*Client) Builds

func (c *Client) Builds() *Builds

Builds returns the builds sub-client.

func (*Client) Pipelines

func (c *Client) Pipelines() *Pipelines

Pipelines returns the pipelines sub-client.

type Pipeline

type Pipeline struct {
	ID            string    `json:"id"`
	Name          string    `json:"name"`
	Status        string    `json:"status"`
	Provider      string    `json:"provider"`
	RepositoryURL string    `json:"repository_url"`
	Branch        string    `json:"branch,omitempty"`
	Stack         string    `json:"stack,omitempty"`
	CreatedAt     time.Time `json:"created_at,omitempty"`
}

Pipeline is a CI/CD pipeline row.

Field tags match the wire format produced by /api/v2/cicd/pipelines.

type Pipelines

type Pipelines struct {
	// contains filtered or unexported fields
}

Pipelines is the sub-client for /api/v2/cicd/pipelines.

func (*Pipelines) List

func (p *Pipelines) List(ctx context.Context) ([]Pipeline, error)

List returns all pipelines visible to the authenticated workspace.

func (*Pipelines) Show

func (p *Pipelines) Show(ctx context.Context, pipelineID string) (*Pipeline, error)

Show returns one pipeline by ID.

func (*Pipelines) Trigger

func (p *Pipelines) Trigger(ctx context.Context, pipelineID, branch string) (*Build, error)

Trigger fires a build for a pipeline. Returns the queued Build.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL