prow

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2020 License: Apache-2.0 Imports: 14 Imported by: 1

Documentation

Overview

Copyright 2020 Qiniu Cloud (qiniu.com)

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IProwAction

type IProwAction interface {
	Fetch(BuildID, name string) []byte
	RunPresubmit() error
	RunPostsubmit() error
	RunPeriodic() error
}

IProwAction defines the normal action in prow system

type Job

type Job struct {
	JobName                string
	Org                    string
	RepoName               string
	PRNumStr               string
	BuildId                string //prow job build number
	PostSubmitJob          string
	PostSubmitCoverProfile string
	CovThreshold           int
	LocalProfilePath       string
	QiniuClient            *qiniu.Client
	LocalArtifacts         *qiniu.Artifacts
	GithubComment          *github.PrComment
	FullDiff               bool
}

Job is a prowjob in prow

func (*Job) CreateChangedCovHtml

func (j *Job) CreateChangedCovHtml() error

CreateChangedCovHtml create changed file related coverage html base on the local artifact

func (*Job) Fetch

func (j *Job) Fetch(BuildID, name string) []byte

Fetch the file from cloud

func (*Job) HtmlProfile

func (j *Job) HtmlProfile() string

func (*Job) JobPrefixOnQiniu

func (j *Job) JobPrefixOnQiniu() string

func (*Job) RunPeriodic

func (j *Job) RunPeriodic() error

RunPeriodic run a periodic job

func (*Job) RunPostsubmit

func (j *Job) RunPostsubmit() error

RunPostsubmit run a postsubmit job

func (*Job) RunPresubmit

func (j *Job) RunPresubmit() error

RunPresubmit run a presubmit job

func (j *Job) SetDeltaCovLinks(c cover.DeltaCovList)

func (*Job) WriteChangedCov

func (j *Job) WriteChangedCov(changedFiles []string) error

filter local profile with changed files and save to j.LocalArtifacts.ChangedProfileName

Jump to

Keyboard shortcuts

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