releases

package
v2.48.0 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2024 License: Apache-2.0 Imports: 16 Imported by: 6

Documentation

Index

Constants

View Source
const (
	PhaseProgressPending  = PhaseProgress("Pending")
	PhaseProgressCurrent  = PhaseProgress("Current")
	PhaseProgressComplete = PhaseProgress("Complete")
)

Variables

This section is empty.

Functions

func IsNil

func IsNil(i interface{}) bool

Types

type CreateReleaseCommandV1 added in v2.4.0

type CreateReleaseCommandV1 struct {
	// Note: the server requires both SpaceID and SpaceIDOrName, and is capable of looking up names from the JSON
	// payload.
	// It'd be nice to allow SpaceIDOrName, but the current server implementation requires a SpaceID
	// (not a name) in the URL route, so we must force the caller to specify an ID only.
	SpaceID               string   `json:"spaceId"`
	ProjectIDOrName       string   `json:"projectName"`
	PackageVersion        string   `json:"packageVersion,omitempty"`
	GitCommit             string   `json:"gitCommit,omitempty"`
	GitRef                string   `json:"gitRef,omitempty"`
	ReleaseVersion        string   `json:"releaseVersion,omitempty"`
	ChannelIDOrName       string   `json:"channelName,omitempty"`
	Packages              []string `json:"packages,omitempty"`
	ReleaseNotes          string   `json:"releaseNotes,omitempty"`
	IgnoreIfAlreadyExists bool     `json:"ignoreIfAlreadyExists"`
	IgnoreChannelRules    bool     `json:"ignoreChannelRules"`
	PackagePrerelease     string   `json:"packagePrerelease,omitempty"`
}

func NewCreateReleaseCommandV1 added in v2.4.0

func NewCreateReleaseCommandV1(spaceID string, projectIDOrName string) *CreateReleaseCommandV1

func (*CreateReleaseCommandV1) MarshalJSON added in v2.4.0

func (c *CreateReleaseCommandV1) MarshalJSON() ([]byte, error)

MarshalJSON adds the redundant 'SpaceIDOrName' parameter which is required by the server

type CreateReleaseResponseV1

type CreateReleaseResponseV1 struct {
	ReleaseID      string `json:"ReleaseId"`
	ReleaseVersion string `json:"ReleaseVersion"`
}

func CreateReleaseV1

func CreateReleaseV1(client newclient.Client, command *CreateReleaseCommandV1) (*CreateReleaseResponseV1, error)

type LifecycleProgression added in v2.4.0

type LifecycleProgression struct {
	Phases                         []*LifecycleProgressionPhase `json:"Phases"`
	NextDeployments                []string                     `json:"NextDeployments"`
	NextDeploymentsMinimumRequired int                          `json:"NextDeploymentsMinimumRequired"`

	resources.Resource
}

LifecycleProgression represents the progression and deployment status for a single release

type LifecycleProgressionPhase added in v2.4.0

type LifecycleProgressionPhase struct {
	ID                                 *string            `json:"Id"` // this seems to always be null in the server response
	Name                               string             `json:"Name"`
	Blocked                            bool               `json:"Blocked"`
	Progress                           PhaseProgress      `json:"Progress"`
	Deployments                        []*PhaseDeployment `json:"Deployments"`
	AutomaticDeploymentTargets         []string           `json:"AutomaticDeploymentTargets"`
	OptionalDeploymentTargets          []string           `json:"OptionalDeploymentTargets"`
	MinimumEnvironmentsBeforePromotion int                `json:"MinimumEnvironmentsBeforePromotion"`
	IsOptionalPhase                    bool               `json:"IsOptionalPhase"`

	resources.Resource
}

type PhaseDeployment added in v2.4.0

type PhaseDeployment struct {
	Task *tasks.Task `json:"Task"`
}

PhaseDeployment represents a deployment as part of a progression phase

type PhaseProgress added in v2.4.0

type PhaseProgress string

type Release

type Release struct {
	Assembled                          time.Time                                `json:"Assembled,omitempty"`
	BuildInformation                   []*ReleasePackageVersionBuildInformation `json:"BuildInformation,omitempty"`
	ChannelID                          string                                   `json:"ChannelId,omitempty"`
	IgnoreChannelRules                 bool                                     `json:"IgnoreChannelRules"`
	LibraryVariableSetSnapshotIDs      []string                                 `json:"LibraryVariableSetSnapshotIds,omitempty"`
	ProjectDeploymentProcessSnapshotID string                                   `json:"ProjectDeploymentProcessSnapshotId,omitempty"`
	ProjectID                          string                                   `json:"ProjectId,omitempty"`
	ProjectVariableSetSnapshotID       string                                   `json:"ProjectVariableSetSnapshotId,omitempty"`
	ReleaseNotes                       string                                   `json:"ReleaseNotes,omitempty"`
	SelectedPackages                   []*packages.SelectedPackage              `json:"SelectedPackages,omitempty"`
	SpaceID                            string                                   `json:"SpaceId,omitempty"`
	Version                            string                                   `json:"Version"`

	resources.Resource
}

func GetReleaseInProject added in v2.4.0

func GetReleaseInProject(client newclient.Client, spaceID string, projectID string, releaseVersion string) (*Release, error)

GetReleaseInProject looks up a single release in the given project

func GetReleasesInProjectChannel added in v2.4.0

func GetReleasesInProjectChannel(client newclient.Client, spaceID string, projectID string, channelID string) ([]*Release, error)

GetReleasesInProjectChannel is EXPERIMENTAL

func NewRelease

func NewRelease(channelID string, projectID string, version string) *Release

type ReleaseChanges

type ReleaseChanges struct {
	BuildInformation []*ReleasePackageVersionBuildInformation `json:"BuildInformation"`
	Commits          []*issuetrackers.CommitDetails           `json:"Commits"`
	ReleaseNotes     string                                   `json:"ReleaseNotes,omitempty"`
	Version          string                                   `json:"Version,omitempty"`
	WorkItems        []*core.WorkItemLink                     `json:"WorkItems"`
}

type ReleasePackageVersionBuildInformation

type ReleasePackageVersionBuildInformation struct {
	Branch           string                         `json:"Branch,omitempty"`
	BuildEnvironment string                         `json:"BuildEnvironment,omitempty"`
	BuildNumber      string                         `json:"BuildNumber,omitempty"`
	BuildURL         string                         `json:"BuildUrl,omitempty"`
	Commits          []*issuetrackers.CommitDetails `json:"Commits"`
	PackageID        string                         `json:"PackageId,omitempty"`
	VcsCommitNumber  string                         `json:"VcsCommitNumber,omitempty"`
	VcsCommitURL     string                         `json:"VcsCommitUrl,omitempty"`
	VcsRoot          string                         `json:"VcsRoot,omitempty"`
	VcsType          string                         `json:"VcsType,omitempty"`
	Version          string                         `json:"Version,omitempty"`
	WorkItems        []*core.WorkItemLink           `json:"WorkItems"`
}

type ReleaseQuery

type ReleaseQuery struct {
	SearchByVersion string `uri:"searchByVersion" url:"searchByVersion,omitempty"`
	Skip            int    `uri:"skip,omitempty" url:"skip,omitempty"`
	Take            int    `uri:"take,omitempty" url:"take,omitempty"`
}

type ReleaseService

type ReleaseService struct {
	services.CanDeleteService
}

func NewReleaseService

func NewReleaseService(sling *sling.Sling, uriTemplate string) *ReleaseService

func (*ReleaseService) Add

func (s *ReleaseService) Add(release *Release) (*Release, error)

Add creates a new release.

func (*ReleaseService) Get

func (s *ReleaseService) Get(releasesQuery ...ReleasesQuery) (*resources.Resources[*Release], error)

Get returns a collection of releases based on the criteria defined by its input query parameter. If an error occurs, an empty collection is returned along with the associated error.

func (*ReleaseService) GetByID

func (s *ReleaseService) GetByID(id string) (*Release, error)

GetByID returns the release that matches the input ID. If one cannot be found, it returns nil and an error.

func (*ReleaseService) GetReleases

func (s *ReleaseService) GetReleases(channel *channels.Channel, releaseQuery ...*ReleaseQuery) (*resources.Resources[*Release], error)

type ReleaseTemplatePackage

type ReleaseTemplatePackage struct {
	ActionName                 string `json:"ActionName,omitempty"`
	FeedID                     string `json:"FeedId,omitempty"`
	FeedName                   string `json:"FeedName,omitempty"`
	IsResolvable               bool   `json:"IsResolvable"`
	NuGetFeedID                string `json:"NuGetFeedId,omitempty"`
	NuGetFeedName              string `json:"NuGetFeedName,omitempty"`
	NuGetPackageID             string `json:"NuGetPackageId,omitempty"`
	PackageID                  string `json:"PackageId,omitempty"`
	PackageReferenceName       string `json:"PackageReferenceName,omitempty"`
	ProjectName                string `json:"ProjectName,omitempty"`
	StepName                   string `json:"StepName,omitempty"`
	VersionSelectedLastRelease string `json:"VersionSelectedLastRelease,omitempty"`
}

type ReleaseUsage

type ReleaseUsage struct {
	ProjectID   string               `json:"ProjectId,omitempty"`
	ProjectName string               `json:"ProjectName,omitempty"`
	Releases    []*ReleaseUsageEntry `json:"Releases"`
}

type ReleaseUsageEntry

type ReleaseUsageEntry struct {
	ReleaseID      string `json:"ReleaseId,omitempty"`
	ReleaseVersion string `json:"ReleaseVersion,omitempty"`
}

type ReleasesQuery

type ReleasesQuery struct {
	IDs                []string `uri:"ids,omitempty" url:"ids,omitempty"`
	IgnoreChannelRules bool     `uri:"ignoreChannelRules,omitempty" url:"ignoreChannelRules,omitempty"`
	Skip               int      `uri:"skip,omitempty" url:"skip,omitempty"`
	Take               int      `uri:"take,omitempty" url:"take,omitempty"`
}

Jump to

Keyboard shortcuts

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