Documentation ¶
Index ¶
- Constants
- func CreateBuildRequest(apiurl, token, reqBody string) (*http.Request, error)
- func CreateIssue(title string)
- func GetPostPayload(buildDefID uint, parameters map[string]string, branch string) (string, error)
- func GetStackPath(prefix, remote string) (string, error)
- func InitStack()
- func SendBuildRequest(req *http.Request) (*url.URL, error)
- func StackQueue(branch, targets string, defID uint)
- func ValidateAzureDevOpsPAT(token string) (string, error)
Constants ¶
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
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 ¶
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 ¶
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 SendBuildRequest ¶
SendBuildRequest will POST the given HTTP request. A successfully queued build will return its URL.
func StackQueue ¶
func ValidateAzureDevOpsPAT ¶
ValidateAzureDevOpsPAT makes sure that the given token matches the format of an Azure DevOps Personal Access Token.
Types ¶
This section is empty.