common

package
v0.15.22 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// CIProviderBitrise ...
	CIProviderBitrise = "bitrise"
	// CIProviderCircleCI ...
	CIProviderCircleCI = "circle-ci"
	// CIProviderGitHubActions ...
	CIProviderGitHubActions = "github-actions"
)

Variables

This section is empty.

Functions

func SelectCacheEndpointURL added in v0.15.12

func SelectCacheEndpointURL(endpointURL string, envProvider func(string) string) string

SelectCacheEndpointURL - if endpointURL provided use that, otherwise select the best build cache endpoint automatically

func SelectRBEEndpointURL added in v0.15.12

func SelectRBEEndpointURL(endpointURL string, envProvider func(string) string) string

SelectRBEEndpointURL - if endpointURL provided use that, otherwise select the RBE endpoint from environment

Types

type CacheAuthConfig

type CacheAuthConfig struct {
	AuthToken   string
	WorkspaceID string
}

CacheAuthConfig holds the auth config for the cache.

func ReadAuthConfigFromEnvironments

func ReadAuthConfigFromEnvironments(envProvider func(string) string) (CacheAuthConfig, error)

ReadAuthConfigFromEnvironments reads auth information from the environment variables

func (CacheAuthConfig) TokenInGradleFormat

func (cac CacheAuthConfig) TokenInGradleFormat() string

TokenInGradleFormat returns the auth token in gradle format.

type CacheConfigMetadata added in v0.7.0

type CacheConfigMetadata struct {
	CIProvider string
	RepoURL    string
	// BitriseCI specific
	BitriseAppID        string
	BitriseWorkflowName string
	BitriseBuildID      string
}

func NewCacheConfigMetadata added in v0.7.0

func NewCacheConfigMetadata(envProvider EnvProviderFunc) CacheConfigMetadata

NewCacheConfigMetadata creates a new CacheConfigMetadata instance based on the environment variables.

type EnvProviderFunc added in v0.6.0

type EnvProviderFunc func(string) string

EnvProviderFunc is a function which returns the value of an environment variable. It's compatible with os.Getenv - os.Getenv can be passed as an EnvProviderFunc.

Jump to

Keyboard shortcuts

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