decorate

package
v0.0.0-...-ce3d181 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2019 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Package decorate is a library for adding to a user-provided PodSpec in order to create a full Pod that will fulfill a test job

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloneLogPath

func CloneLogPath(logMount kube.VolumeMount) string

CloneLogPath returns the path to the clone log file in the volume mount.

func CloneRefs

func CloneRefs(pj kube.ProwJob, codeMount, logMount kube.VolumeMount) (*kube.Container, []kube.Refs, []kube.Volume, error)

CloneRefs constructs the container and volumes necessary to clone the refs requested by the ProwJob.

The container checks out repositories specified by the ProwJob Refs to `codeMount`. A log of what it checked out is written to `clone.json` in `logMount`.

The container may need to mount SSH keys and/or cookiefiles in order to access private refs. CloneRefs returns a list of volumes containing these secrets required by the container.

func Labels

func Labels() []string

Labels returns a string slice with label consts from kube.

func LabelsAndAnnotationsForJob

func LabelsAndAnnotationsForJob(pj kube.ProwJob) (map[string]string, map[string]string)

LabelsAndAnnotationsForJob returns a standard set of labels to add to pod/build/etc resources.

func LabelsAndAnnotationsForSpec

func LabelsAndAnnotationsForSpec(spec kube.ProwJobSpec, extraLabels, extraAnnotations map[string]string) (map[string]string, map[string]string)

LabelsAndAnnotationsForSpec returns a minimal set of labels to add to prowjobs or its owned resources.

User-provided extraLabels and extraAnnotations values will take precedence over auto-provided values.

func ProwJobToPod

func ProwJobToPod(pj kube.ProwJob, buildID string) (*v1.Pod, error)

ProwJobToPod converts a ProwJob to a Pod that will run the tests.

func VolumeMountPaths

func VolumeMountPaths() []string

VolumeMountPaths returns a string slice with *MountPath consts in it.

func VolumeMounts

func VolumeMounts() []string

VolumeMounts returns a string slice with *MountName consts in it.

Types

This section is empty.

Jump to

Keyboard shortcuts

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