Documentation
¶
Index ¶
- Constants
- Variables
- func CheckIsCLIUpdateCheckRequired() bool
- func CheckIsPluginUpdateCheckRequired(plugin string) bool
- func CheckIsSetupWasDoneForVersion(ver string) (bool, string)
- func DeleteBitriseConfigDir() error
- func EnsureBitriseConfigDirExists() error
- func GeneratePATHEnvString(currentPATHEnv, pathToInclude string) string
- func GetAgentConfigPath() string
- func GetBitriseHomeDirPath() string
- func GetBitriseToolsDirPath() string
- func HasAgentConfig() bool
- func InitPaths() error
- func IsDebugUseSystemTools() bool
- func SaveCLIUpdateCheck() error
- func SavePluginUpdateCheck(plugin string) error
- func SaveSetupSuccessForVersion(ver string) error
- type AgentConfig
- type AgentHooks
- type BitriseDirs
- type ConfigModel
Constants ¶
View Source
const ( // CIModeEnvKey ... CIModeEnvKey = "CI" // PRModeEnvKey ... PRModeEnvKey = "PR" // PullRequestIDEnvKey ... PullRequestIDEnvKey = "PULL_REQUEST_ID" // DebugModeEnvKey ... DebugModeEnvKey = "DEBUG" // IsSecretFilteringKey ... IsSecretFilteringKey = "BITRISE_SECRET_FILTERING" // IsSecretEnvsFilteringKey ... IsSecretEnvsFilteringKey = "BITRISE_SECRET_ENVS_FILTERING" // NoOutputTimeoutEnvKey ... NoOutputTimeoutEnvKey = "BITRISE_NO_OUTPUT_TIMEOUT" // IsSteplibOfflineModeEnvKey when set to true: // - StepLib update will be disabled when using non-exact step version (latest minor or major). // - When a step or step version is not found in the cache, will not be downloaded. Instead will log // a error message (including what other Step versions are available). // - Analytics will be disabled. IsSteplibOfflineModeEnvKey = "BITRISE_OFFLINE_MODE" // DebugUseSystemTools ... DebugUseSystemTools = "BITRISE_DEBUG_USE_SYSTEM_TOOLS" )
View Source
const ( EnvstorePathEnvKey = "ENVMAN_ENVSTORE_PATH" FormattedOutputPathEnvKey = "BITRISE_STEP_FORMATTED_OUTPUT_FILE_PATH" BitriseDataHomeDirEnvKey = "BITRISE_DATA_HOME_DIR" BitriseSourceDirEnvKey = "BITRISE_SOURCE_DIR" BitriseDeployDirEnvKey = "BITRISE_DEPLOY_DIR" BitriseTestDeployDirEnvKey = "BITRISE_TEST_DEPLOY_DIR" // BitrisePerStepTestResultDirEnvKey is a unique subdirectory in BITRISE_TEST_DEPLOY_DIR for each step run, steps should place test reports and attachments into this directory BitrisePerStepTestResultDirEnvKey = "BITRISE_TEST_RESULT_DIR" BitriseHtmlReportDirEnvKey = "BITRISE_HTML_REPORT_DIR" )
View Source
const (
PluginUpdateInterval = 24 * time.Hour
)
Variables ¶
View Source
var ( // IsCIMode ... IsCIMode = false // IsDebugMode ... IsDebugMode = false // IsPullRequestMode ... IsPullRequestMode = false // IsSecretFiltering ... IsSecretFiltering = false // IsSecretEnvsFiltering ... IsSecretEnvsFiltering = false // IsSteplibOfflineMode should not be used, only for access from setup command IsSteplibOfflineMode = false )
Functions ¶
func CheckIsCLIUpdateCheckRequired ¶
func CheckIsCLIUpdateCheckRequired() bool
func DeleteBitriseConfigDir ¶
func DeleteBitriseConfigDir() error
func EnsureBitriseConfigDirExists ¶
func EnsureBitriseConfigDirExists() error
func GeneratePATHEnvString ¶
func GetAgentConfigPath ¶
func GetAgentConfigPath() string
func GetBitriseHomeDirPath ¶
func GetBitriseHomeDirPath() string
func GetBitriseToolsDirPath ¶
func GetBitriseToolsDirPath() string
func HasAgentConfig ¶
func HasAgentConfig() bool
func SaveCLIUpdateCheck ¶
func SaveCLIUpdateCheck() error
func SavePluginUpdateCheck ¶
Types ¶
type AgentConfig ¶
type AgentConfig struct { BitriseDirs BitriseDirs `yaml:"bitrise_dirs"` Hooks AgentHooks `yaml:"hooks"` }
func ReadAgentConfig ¶
func ReadAgentConfig(configFile string) (AgentConfig, error)
type AgentHooks ¶
type AgentHooks struct { // CleanupOnBuildStart is the list of UNEXPANDED paths to clean up before executing the main workflow. // The actual string value should be expanded at execution time, so that // Bitrise dirs defined in this config file are correctly expanded. CleanupOnBuildStart []string `yaml:"cleanup_on_build_start"` // CleanupOnBuildEnd is the list of UNEXPANDED paths to clean up after executing the main workflow. // The actual string value should be expanded at execution time, so that // Bitrise dirs defined in this config file are correctly expanded. CleanupOnBuildEnd []string `yaml:"cleanup_on_build_end"` // DoOnBuildStart is an optional executable to run before executing the main workflow.. DoOnBuildStart string `yaml:"do_on_build_start"` // DoOnBuildEnd is an optional executable to run after executing the main workflow. DoOnBuildEnd string `yaml:"do_on_build_end"` }
AgentHooks are various hooks that are executed before and after the CLI runs a build. In this context, a build means a CI execution triggered automatically (unlike a local invocation by `bitrise run x`). These hooks are only executed once, even if the actual workflow triggers other workflows.
type BitriseDirs ¶
type BitriseDirs struct { // BitriseDataHomeDir is the root directory for all Bitrise data produced at runtime BitriseDataHomeDir string `yaml:"BITRISE_DATA_HOME_DIR"` // SourceDir is for source code checkouts. // It might be outside of BitriseDataHomeDir if the user has configured it so SourceDir string `yaml:"BITRISE_SOURCE_DIR"` // DeployDir is for deployable artifacts. // It might be outside of BitriseDataHomeDir if the user has configured it so DeployDir string `yaml:"BITRISE_DEPLOY_DIR"` // TestDeployDir is for deployable test result artifacts. // It might be outside of BitriseDataHomeDir if the user has configured it so TestDeployDir string `yaml:"BITRISE_TEST_DEPLOY_DIR"` // HTMLReportDir is for deployable html reports. // It might be outside of BitriseDataHomeDir if the user has configured it so HTMLReportDir string `yaml:"BITRISE_HTML_REPORT_DIR"` }
Click to show internal directories.
Click to hide internal directories.