common

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ClientNameXcode             = "xcode"
	ClientNameGradleConfigCache = "gradle-config"
	ClientNameGradle            = "gradle"
)
View Source
const (
	CacheKeyTypeDefault  = "default"
	CacheKeyTypeFallback = "fallback"
	CacheKeyTypeProvided = "provided"
)

Variables

View Source
var ActivateCmd = &cobra.Command{
	Use:   "activate",
	Short: "Activate various bitrise plugins",
	Long: `Activate Gradle, Bazel, etc. plugins
Call the subcommands with the name of the tool you want to activate plugins for.`,
}

ActivateCmd represents the activate command

View Source
var EnableForCmd = &cobra.Command{
	Use:   "enable-for",
	Short: "Enable build cache for Gradle, Bazel, etc.",
	Long: `Enable build cache for Gradle, Bazel, etc.
Call the subcommands with the name of the tool you want to enable build cache for.`,
}

enableForCmd represents the enableFor command

View Source
var IsDebugLogMode bool //nolint:gochecknoglobals
View Source
var RootCmd = &cobra.Command{
	Use:   "bitrise-build-cache-cli",
	Short: "Bitrise Build Cache CLI - to enable/configure Gradle or Bazel build cache on the machine where you run this CLI.",
	Long: `Bitrise Build Cache CLI - to enable/configure Gradle or Bazel build cache on the machine where you run this CLI.

What does the CLI do on a high level?

It creates the necessary config to enable Build Cache and Command Exec/Invocation Analytics. It does this via adding the config in the $HOME directory.

In case of Gradle it's done via creating or modifying the following two files: $HOME/.gradle/init.d/bitrise-build-cache.init.gradle and $HOME/.gradle/gradle.properties (adding org.gradle.caching=true to gradle.properties).

In case of Bazel it's done via creating or modifying $HOME/.bazelrc.`,
}

rootCmd represents the base command when called without any subcommands

Functions

func CreateKVClient

func CreateKVClient(ctx context.Context, params CreateKVClientParams) (*kv.Client, error)

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

func LogCurrentUserInfo

func LogCurrentUserInfo(logger log.Logger)

Types

type CacheKeyType

type CacheKeyType string

type CreateKVClientParams

type CreateKVClientParams struct {
	CacheOperationID   string
	ClientName         string
	InvocationID       string
	AuthConfig         common.CacheAuthConfig
	Envs               map[string]string
	CommandFunc        common.CommandFunc
	Logger             log.Logger
	EndpointURL        string
	BitriseKVClient    kv_storage.KVStorageClient         // nullable, if not provided, a new client will be created
	CapabilitiesClient remoteexecution.CapabilitiesClient // nullable, if not provided, a new client will be created
	SkipCapabilities   bool                               // if true, GetCapabilities will not be called
}

Jump to

Keyboard shortcuts

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