pjutil

package
v0.0.0-...-71304e1 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2017 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package pjutil contains helpers for working with ProwJobs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BatchSpec

func BatchSpec(p config.Presubmit, refs kube.Refs) kube.ProwJobSpec

BatchSpec initializes a ProwJobSpec for a given batch job and ref spec.

func EnvForSpec

func EnvForSpec(spec kube.ProwJobSpec) map[string]string

EnvForSpec returns a mapping of environment variables to their values that should be available for a job spec

func GetLatestPeriodics

func GetLatestPeriodics(pjs []kube.ProwJob) map[string]kube.ProwJob

GetLatestPeriodics filters through the provided prowjobs and returns a map of periodic jobs to their latest prowjobs.

func NewProwJob

func NewProwJob(spec kube.ProwJobSpec) kube.ProwJob

NewProwJob initializes a ProwJob out of a ProwJobSpec.

func PartitionPending

func PartitionPending(pjs []kube.ProwJob) (pending, nonPending chan kube.ProwJob)

PartitionPending separates the provided prowjobs into pending and non-pending and returns them inside channels so that they can be consumed in parallel by different goroutines. Controller loops need to handle pending jobs first so they can conform to maximum concurrency requirements that different jobs may have.

func PeriodicSpec

func PeriodicSpec(p config.Periodic) kube.ProwJobSpec

PeriodicSpec initializes a ProwJobSpec for a given periodic job.

func PostsubmitSpec

func PostsubmitSpec(p config.Postsubmit, refs kube.Refs) kube.ProwJobSpec

PostsubmitSpec initializes a ProwJobSpec for a given postsubmit job.

func PresubmitSpec

func PresubmitSpec(p config.Presubmit, refs kube.Refs) kube.ProwJobSpec

PresubmitSpec initializes a ProwJobSpec for a given presubmit job.

func ProwJobToPod

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

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

Types

This section is empty.

Jump to

Keyboard shortcuts

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