common

package
v0.11.3 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2021 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 CreateBuildRequest added in v0.11.1

func CreateBuildRequest(apiurl, token, reqBody string) (*http.Request, error)

CreateBuildRequest constructs a HTTP request with the payload body to be sent to the Azure DevOps API URL, using the token for Basic authentication.

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(req *http.Request) (*url.URL, error)

SendBuildRequest will POST the given HTTP request. 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