git

package
v1.132.0 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// InternalContainerPrefix To indicate that this is not for user interest
	InternalContainerPrefix = "internal-"

	// CloneConfigContainerName Name of container for clone in the outer pipeline
	CloneConfigContainerName = "clone-config"

	// CloneContainerName Name of container
	CloneContainerName = "clone"

	// GitSSHKeyVolumeName Deploy key + known_hosts
	GitSSHKeyVolumeName = "git-ssh-keys"

	// BuildContextVolumeName Name of volume to hold build context
	BuildContextVolumeName = "build-context"

	// CloneRepoHomeVolumeName Name of volume to hold clone repo home folder
	CloneRepoHomeVolumeName = "builder-home"

	// CloneRepoHomeVolumePath Name of home volume path
	CloneRepoHomeVolumePath = "/home/clone"

	// Workspace Folder to hold the code to build
	Workspace = "/workspace"
)

Variables

This section is empty.

Functions

func CloneInitContainersWithContainerName

func CloneInitContainersWithContainerName(sshURL, branch, commitID, directory string, cloneContainerName string, options ...Option) []corev1.Container

CloneInitContainersWithContainerName The sidecars for cloning a git repo. Lfs is to support large files in cloned source code, it is not needed for Radix config ot SubPipeline

func CloneInitContainersWithSourceCode

func CloneInitContainersWithSourceCode(sshURL, branch, commitID, directory, gitImage string) []corev1.Container

CloneInitContainersWithSourceCode The sidecars for cloning repo with source code Arguments:

  • sshURL: SSH URL to the remote git repository
  • branch: The branch to checkout
  • commitID (optional): The commit ID to checkout after clone finished. The clone step will fail if the commit ID is not an ancestor of HEAD for the branch
  • directory: The directory to clone the git repository to
  • config: defines the container images to be used by the init containers

func GetJobContainerVolumeMounts

func GetJobContainerVolumeMounts(workspace string) []corev1.VolumeMount

GetJobContainerVolumeMounts Get job container volume mounts

func GetJobVolumes

func GetJobVolumes() []corev1.Volume

GetJobVolumes Get Radix pipeline job volumes

Types

type Option added in v1.132.0

type Option func(*corev1.Container)

func WithCommand added in v1.132.0

func WithCommand(command []string) Option

func WithImage added in v1.132.0

func WithImage(image string) Option

func WithImagePullPolicy added in v1.132.0

func WithImagePullPolicy(policy corev1.PullPolicy) Option

func WithResourceRequirements added in v1.132.0

func WithResourceRequirements(req corev1.ResourceRequirements) Option

func WithSecurityContext added in v1.132.0

func WithSecurityContext(sc *corev1.SecurityContext) Option

Jump to

Keyboard shortcuts

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