prow/cmd/build/controller.go
func injectedSteps(encodedJobSpec string, dc prowjobv1.DecorationConfig, injectedSource bool, toolsMount coreapi.VolumeMount, entries []wrapper.Options) ([]coreapi.Container, *coreapi.Container, *coreapi.Volume, error) {
	gcsVol, gcsMount, gcsOptions := decorate.GCSOptions(dc)

	sidecar, err := decorate.Sidecar(dc.UtilityImages.Sidecar, gcsOptions, gcsMount, logMount, encodedJobSpec, decorate.RequirePassingEntries, entries...)
	if err != nil {
		return nil, nil, nil, fmt.Errorf("inject sidecar: %v", err)
	}

	var cloneLogMount *coreapi.VolumeMount
	if injectedSource {
		cloneLogMount = &logMount
	}
	initUpload, err := decorate.InitUpload(dc.UtilityImages.InitUpload, gcsOptions, gcsMount, cloneLogMount, encodedJobSpec)
	if err != nil {
		return nil, nil, nil, fmt.Errorf("inject initupload: %v", err)
	}

	placer := decorate.PlaceEntrypoint(dc.UtilityImages.Entrypoint, toolsMount)

	return []coreapi.Container{placer, *initUpload}, sidecar, &gcsVol, nil
}
func injectedSteps(encodedJobSpec string, dc prowjobv1.DecorationConfig, injectedSource bool, toolsMount coreapi.VolumeMount, entries []wrapper.Options) ([]coreapi.Container, *coreapi.Container, *coreapi.Volume, error) {
	gcsVol, gcsMount, gcsOptions := decorate.GCSOptions(dc)

	sidecar, err := decorate.Sidecar(dc.UtilityImages.Sidecar, gcsOptions, gcsMount, logMount, encodedJobSpec, decorate.RequirePassingEntries, entries...)
	if err != nil {
		return nil, nil, nil, fmt.Errorf("inject sidecar: %v", err)
	}

	var cloneLogMount *coreapi.VolumeMount
	if injectedSource {
		cloneLogMount = &logMount
	}
	initUpload, err := decorate.InitUpload(dc.UtilityImages.InitUpload, gcsOptions, gcsMount, cloneLogMount, encodedJobSpec)
	if err != nil {
		return nil, nil, nil, fmt.Errorf("inject initupload: %v", err)
	}

	placer := decorate.PlaceEntrypoint(dc.UtilityImages.Entrypoint, toolsMount)

	return []coreapi.Container{placer, *initUpload}, sidecar, &gcsVol, nil
}
func injectedSteps ( encodedJobSpec string , dc prowjobv1 . DecorationConfig , injectedSource bool , toolsMount coreapi . VolumeMount , entries [ ] wrapper . Options ) ( [ ] coreapi . Container , * coreapi . Container , * coreapi . Volume , error ) { gcsVol , gcsMount , gcsOptions := decorate . GCSOptions ( dc ) sidecar , err := decorate . Sidecar ( dc . UtilityImages . Sidecar , gcsOptions , gcsMount , logMount , encodedJobSpec , decorate . RequirePassingEntries , entries ... ) if err != nil { return nil , nil , nil , fmt . Errorf ( " " , err ) } var cloneLogMount * coreapi . VolumeMount if injectedSource { cloneLogMount = & logMount } initUpload , err := decorate . InitUpload ( dc . UtilityImages . InitUpload , gcsOptions , gcsMount , cloneLogMount , encodedJobSpec ) if err != nil { return nil , nil , nil , fmt . Errorf ( " " , err ) } placer := decorate . PlaceEntrypoint ( dc . UtilityImages . Entrypoint , toolsMount ) return [ ] coreapi . Container { placer , * initUpload } , sidecar , & gcsVol , nil }
// injectedSteps returns initial containers, a final container and an additional volume.
injectedSteps returns initial containers a final container and an additional volume .