git

package
v1.86.1 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2025 License: MIT Imports: 7 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, useLfs, skipBlobs bool, cloneContainerName string, config CloneConfig) []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 string, config CloneConfig) []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 CloneConfig

type CloneConfig struct {
	NSlookupImage string
	GitImage      string
	BashImage     string
}

CloneConfig Git repository cloning configuration

Jump to

Keyboard shortcuts

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