common

package
v0.9.5 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2020 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// AuthFromEnvClient is an env variable supported by the Azure SDK
	AuthFromEnvClient = "AZURE_CLIENT_ID"

	// AuthFromEnvTenant is an env variable supported by the Azure SDK
	AuthFromEnvTenant = "AZURE_TENANT_ID"

	// AuthFromFile is an env variable supported by the Azure SDK
	AuthFromFile = "AZURE_AUTH_LOCATION"
)

Variables

This section is empty.

Functions

func CreateIssue

func CreateIssue(title string)

func GetPostPayload

func GetPostPayload(buildDefID uint, parameters map[string]string, branch string) (string, error)

GetPostPayload constructs a POST payload body for a request to the Azure DevOps API, with details of which build ID to queue, from which branch, and any additional parameters.

func GetStackPath

func GetStackPath(prefix, remote string) (string, error)

GetStackPath will split the current working directory on 'prefix' and then check if it is part of a git repository with 'remote' set as a remote.

func InitStack

func InitStack()

func SendBuildRequest

func SendBuildRequest(apiurl, token, reqBody string) (*url.URL, error)

SendBuildRequest will POST a HTTP request with the given payload body to the given Azure DevOps API URL, using the given token for authentication. A successfully queued build will return its URL.

func StackQueue

func StackQueue(branch, targets string, defID uint)

func ValidateAzureDevOpsPAT

func ValidateAzureDevOpsPAT(token string) (string, error)

ValidateAzureDevOpsPAT makes sure that the given token matches the format of an Azure DevOps Personal Access Token.

Types

This section is empty.

Jump to

Keyboard shortcuts

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