pipelines

package
v1.0.0-b5 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2020 License: MIT Imports: 9 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ConfigurationTypeValues = configurationTypeValuesType{
	Unknown:            "unknown",
	Yaml:               "yaml",
	DesignerJson:       "designerJson",
	JustInTime:         "justInTime",
	DesignerHyphenJson: "designerHyphenJson",
}
View Source
var GetLogExpandOptionsValues = getLogExpandOptionsValuesType{
	None:          "none",
	SignedContent: "signedContent",
}
View Source
var RepositoryTypeValues = repositoryTypeValuesType{
	Unknown:                 "unknown",
	GitHub:                  "gitHub",
	AzureReposGit:           "azureReposGit",
	AzureReposGitHyphenated: "azureReposGitHyphenated",
}
View Source
var RunResultValues = runResultValuesType{
	Unknown:   "unknown",
	Succeeded: "succeeded",
	Failed:    "failed",
	Canceled:  "canceled",
}
View Source
var RunStateValues = runStateValuesType{
	Unknown:    "unknown",
	InProgress: "inProgress",
	Canceling:  "canceling",
	Completed:  "completed",
}

Functions

This section is empty.

Types

type Client

type Client interface {
	// [Preview API]
	CreatePipeline(context.Context, CreatePipelineArgs) (*Pipeline, error)
	// [Preview API]
	GetLog(context.Context, GetLogArgs) (*Log, error)
	// [Preview API] Gets a pipeline, optionally at the specified version
	GetPipeline(context.Context, GetPipelineArgs) (*Pipeline, error)
	// [Preview API] Gets a run for a particular pipeline.
	GetRun(context.Context, GetRunArgs) (*Run, error)
	// [Preview API]
	ListLogs(context.Context, ListLogsArgs) (*LogCollection, error)
	// [Preview API] Gets a list of pipelines.
	ListPipelines(context.Context, ListPipelinesArgs) (*ListPipelinesResponseValue, error)
	// [Preview API] Gets top 10000 runs for a particular pipeline.
	ListRuns(context.Context, ListRunsArgs) (*[]Run, error)
	// [Preview API] Runs a pipeline.
	RunPipeline(context.Context, RunPipelineArgs) (*Run, error)
}

func NewClient

func NewClient(ctx context.Context, connection *azuredevops.Connection) Client

type ClientImpl

type ClientImpl struct {
	Client azuredevops.Client
}

func (*ClientImpl) CreatePipeline

func (client *ClientImpl) CreatePipeline(ctx context.Context, args CreatePipelineArgs) (*Pipeline, error)

[Preview API]

func (*ClientImpl) GetLog

func (client *ClientImpl) GetLog(ctx context.Context, args GetLogArgs) (*Log, error)

[Preview API]

func (*ClientImpl) GetPipeline

func (client *ClientImpl) GetPipeline(ctx context.Context, args GetPipelineArgs) (*Pipeline, error)

[Preview API] Gets a pipeline, optionally at the specified version

func (*ClientImpl) GetRun

func (client *ClientImpl) GetRun(ctx context.Context, args GetRunArgs) (*Run, error)

[Preview API] Gets a run for a particular pipeline.

func (*ClientImpl) ListLogs

func (client *ClientImpl) ListLogs(ctx context.Context, args ListLogsArgs) (*LogCollection, error)

[Preview API]

func (*ClientImpl) ListPipelines

func (client *ClientImpl) ListPipelines(ctx context.Context, args ListPipelinesArgs) (*ListPipelinesResponseValue, error)

[Preview API] Gets a list of pipelines.

func (*ClientImpl) ListRuns

func (client *ClientImpl) ListRuns(ctx context.Context, args ListRunsArgs) (*[]Run, error)

[Preview API] Gets top 10000 runs for a particular pipeline.

func (*ClientImpl) RunPipeline

func (client *ClientImpl) RunPipeline(ctx context.Context, args RunPipelineArgs) (*Run, error)

[Preview API] Runs a pipeline.

type ConfigurationType

type ConfigurationType string

type CreatePipelineArgs

type CreatePipelineArgs struct {
	// (required)
	InputParameters *CreatePipelineParameters
	// (required) Project ID or project name
	Project *string
}

Arguments for the CreatePipeline function

type CreatePipelineConfigurationParameters

type CreatePipelineConfigurationParameters struct {
	Type *ConfigurationType `json:"type,omitempty"`
}

type CreatePipelineParameters

type CreatePipelineParameters struct {
	Configuration *CreatePipelineConfigurationParameters `json:"configuration,omitempty"`
	Folder        *string                                `json:"folder,omitempty"`
	Name          *string                                `json:"name,omitempty"`
}

type GetLogArgs

type GetLogArgs struct {
	// (required) Project ID or project name
	Project *string
	// (required)
	PipelineId *int
	// (required)
	RunId *int
	// (required)
	LogId *int
	// (optional)
	Expand *GetLogExpandOptions
}

Arguments for the GetLog function

type GetLogExpandOptions

type GetLogExpandOptions string

[Flags] $expand options for GetLog and ListLogs.

type GetPipelineArgs

type GetPipelineArgs struct {
	// (required) Project ID or project name
	Project *string
	// (required) The pipeline id
	PipelineId *int
	// (optional) The pipeline version
	PipelineVersion *int
}

Arguments for the GetPipeline function

type GetRunArgs

type GetRunArgs struct {
	// (required) Project ID or project name
	Project *string
	// (required) The pipeline id
	PipelineId *int
	// (required) The run id
	RunId *int
}

Arguments for the GetRun function

type ListLogsArgs

type ListLogsArgs struct {
	// (required) Project ID or project name
	Project *string
	// (required)
	PipelineId *int
	// (required)
	RunId *int
	// (optional)
	Expand *GetLogExpandOptions
}

Arguments for the ListLogs function

type ListPipelinesArgs

type ListPipelinesArgs struct {
	// (required) Project ID or project name
	Project *string
	// (optional) A sort expression. Defaults to "name asc"
	OrderBy *string
	// (optional) The maximum number of pipelines to return
	Top *int
	// (optional) A continuation token from a previous request, to retrieve the next page of results
	ContinuationToken *string
}

Arguments for the ListPipelines function

type ListPipelinesResponseValue

type ListPipelinesResponseValue struct {
	Value []Pipeline
	// The continuation token to be used to get the next page of results.
	ContinuationToken string
}

Return type for the ListPipelines function

type ListRunsArgs

type ListRunsArgs struct {
	// (required) Project ID or project name
	Project *string
	// (required) The pipeline id
	PipelineId *int
}

Arguments for the ListRuns function

type Log

type Log struct {
	// The date and time the log was created.
	CreatedOn *azuredevops.Time `json:"createdOn,omitempty"`
	// The ID of the log.
	Id *int `json:"id,omitempty"`
	// The date and time the log was last changed.
	LastChangedOn *azuredevops.Time `json:"lastChangedOn,omitempty"`
	// The number of lines in the log.
	LineCount     *uint64           `json:"lineCount,omitempty"`
	SignedContent *webapi.SignedUrl `json:"signedContent,omitempty"`
	Url           *string           `json:"url,omitempty"`
}

type LogCollection

type LogCollection struct {
	Logs          *[]Log            `json:"logs,omitempty"`
	SignedContent *webapi.SignedUrl `json:"signedContent,omitempty"`
	Url           *string           `json:"url,omitempty"`
}

type Pipeline

type Pipeline struct {
	Folder        *string                `json:"folder,omitempty"`
	Id            *int                   `json:"id,omitempty"`
	Name          *string                `json:"name,omitempty"`
	Revision      *int                   `json:"revision,omitempty"`
	Links         interface{}            `json:"_links,omitempty"`
	Configuration *PipelineConfiguration `json:"configuration,omitempty"`
	Url           *string                `json:"url,omitempty"`
}

type PipelineBase

type PipelineBase struct {
	Folder   *string `json:"folder,omitempty"`
	Id       *int    `json:"id,omitempty"`
	Name     *string `json:"name,omitempty"`
	Revision *int    `json:"revision,omitempty"`
}

type PipelineConfiguration

type PipelineConfiguration struct {
	Type *ConfigurationType `json:"type,omitempty"`
}

type PipelineReference

type PipelineReference struct {
	Folder   *string `json:"folder,omitempty"`
	Id       *int    `json:"id,omitempty"`
	Name     *string `json:"name,omitempty"`
	Revision *int    `json:"revision,omitempty"`
	Url      *string `json:"url,omitempty"`
}

A reference to a Pipeline.

type Repository

type Repository struct {
	Type *RepositoryType `json:"type,omitempty"`
}

type RepositoryResource

type RepositoryResource struct {
	RefName    *string     `json:"refName,omitempty"`
	Repository *Repository `json:"repository,omitempty"`
	Version    *string     `json:"version,omitempty"`
}

type RepositoryResourceParameters

type RepositoryResourceParameters struct {
	RefName *string `json:"refName,omitempty"`
	// This is the security token to use when connecting to the repository.
	Token *string `json:"token,omitempty"`
	// Optional. This is the type of the token given. If not provided, a type of "Bearer" is assumed. Note: Use "Basic" for a PAT token.
	TokenType *string `json:"tokenType,omitempty"`
	Version   *string `json:"version,omitempty"`
}

type RepositoryType

type RepositoryType string

type Run

type Run struct {
	Id           *int                 `json:"id,omitempty"`
	Name         *string              `json:"name,omitempty"`
	Links        interface{}          `json:"_links,omitempty"`
	CreatedDate  *azuredevops.Time    `json:"createdDate,omitempty"`
	FinishedDate *azuredevops.Time    `json:"finishedDate,omitempty"`
	Pipeline     *PipelineReference   `json:"pipeline,omitempty"`
	Resources    *RunResources        `json:"resources,omitempty"`
	Result       *RunResult           `json:"result,omitempty"`
	State        *RunState            `json:"state,omitempty"`
	Url          *string              `json:"url,omitempty"`
	Variables    *map[string]Variable `json:"variables,omitempty"`
}

type RunPipelineArgs

type RunPipelineArgs struct {
	// (required) Optional.
	RunParameters *RunPipelineParameters
	// (required) Project ID or project name
	Project *string
	// (required) The pipeline id
	PipelineId *int
	// (optional) The pipeline version
	PipelineVersion *int
}

Arguments for the RunPipeline function

type RunPipelineParameters

type RunPipelineParameters struct {
	// Deprecated: Use Context instead
	Resources *RunResourcesParameters `json:"resources,omitempty"`
	Secrets   *map[string]string      `json:"secrets,omitempty"`
	Variables *map[string]Variable    `json:"variables,omitempty"`
}

type RunReference

type RunReference struct {
	Id   *int    `json:"id,omitempty"`
	Name *string `json:"name,omitempty"`
}

type RunResources

type RunResources struct {
	Repositories *map[string]RepositoryResource `json:"repositories,omitempty"`
}

type RunResourcesParameters

type RunResourcesParameters struct {
	Repositories *map[string]RepositoryResourceParameters `json:"repositories,omitempty"`
}

type RunResult

type RunResult string

This is not a Flags enum because we don't want to set multiple results on a build. However, when adding values, please stick to powers of 2 as if it were a Flags enum. This will make it easier to query multiple results.

type RunState

type RunState string

This is not a Flags enum because we don't want to set multiple states on a build. However, when adding values, please stick to powers of 2 as if it were a Flags enum. This will make it easier to query multiple states.

type Variable

type Variable struct {
	IsSecret *bool   `json:"isSecret,omitempty"`
	Value    *string `json:"value,omitempty"`
}

Jump to

Keyboard shortcuts

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