envfile

package
v2.40.3 Latest Latest
Warning

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

Go to latest
Published: May 22, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultEnvfilePathEnv = "BITRISEIO_ENVFILE_PATH"

DefaultEnvfilePathEnv is the env var that points to the (platform-dependent) envfile location.

Variables

This section is empty.

Functions

func GetEnv

func GetEnv(key string, runtimeEnvs envmanModels.EnvsJSONListModel, envfilePath string) (string, error)

GetEnv returns the true value of an env var, even if its value was erased because of its size. Typical large env vars are git-related build trigger env vars, like BITRISE_GIT_COMMIT_MESSAGES or BITRISE_GIT_CHANGED_FILES. If these were exposed as env vars to the CLI process, the execve() syscall would fail because it has a limit on the size of all env vars and arguments. Instead, the agent launching the Bitrise CLI process clears these env vars and stores their original values in a file on disk. Why is this whole thing not implemented with envman? Because a step subprocess is started with all env vars (prepared by envman), so that subprocess exec would also fail with the same error when passing large env vars. Note: envfilePath must point to an existing file, you should not call this unconditionally.

func LogEnvVarLimitIfExceeded

func LogEnvVarLimitIfExceeded()

Types

type EnvFile

type EnvFile struct {
	Envs       map[string]string `yaml:"envs"`
	ErasedEnvs []string          `yaml:"erased_envs"`
}

Jump to

Keyboard shortcuts

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