jx: github.com/jenkins-x/jx/pkg/pipelinescheduler Index | Files | Directories

package pipelinescheduler

import "github.com/jenkins-x/jx/pkg/pipelinescheduler"

Index

Package Files

builder.go config_builder.go generator.go leaf.go prow_config.go scheduler_builder.go

Constants

const (
    // DefaultAgent is the default agent vaule
    DefaultAgent = "tekton"
    // DefaultMergeType is the default merge type
    DefaultMergeType = "merge"
)

func ApplyDirectly Uses

func ApplyDirectly(kubeClient kubernetes.Interface, namespace string, cfg *config.Config,
    plugs *plugins.Configuration) error

ApplyDirectly directly applies the prow config to the cluster

func ApplySchedulersDirectly Uses

func ApplySchedulersDirectly(jxClient versioned.Interface, namespace string, sourceRepositoryGroups []*jenkinsv1.SourceRepositoryGroup, sourceRepositories []*jenkinsv1.SourceRepository, schedulers map[string]*jenkinsv1.Scheduler, devEnv *jenkinsv1.Environment) error

ApplySchedulersDirectly directly applies pipeline schedulers to the cluster

func Build Uses

func Build(schedulers []*jenkinsv1.SchedulerSpec) (*jenkinsv1.SchedulerSpec, error)

Build combines the slice of schedulers into one, with the most specific schedule config defined last

func BuildProwConfig Uses

func BuildProwConfig(schedulers []*SchedulerLeaf) (*config.Config, *plugins.Configuration,
    error)

BuildProwConfig takes a list of schedulers and creates a Prow Config from it

func BuildSchedulers Uses

func BuildSchedulers(prowConfig *config.Config, pluginConfig *plugins.Configuration) ([]*jenkinsv1.SourceRepositoryGroup, []*jenkinsv1.SourceRepository, map[string]*jenkinsv1.SourceRepository, map[string]*jenkinsv1.Scheduler, error)

BuildSchedulers turns prow config in to schedulers

func CreateSchedulersFromProwConfig Uses

func CreateSchedulersFromProwConfig(configFileLocation string, pluginsFileLocation string, skipVerification bool, dryRun bool, gitOps bool, jxClient versioned.Interface, kubeClient kubernetes.Interface, namespace string, teamSchedulerName string, devEnv *jenkinsv1.Environment) ([]*jenkinsv1.SourceRepositoryGroup, []*jenkinsv1.SourceRepository, map[string]*jenkinsv1.Scheduler, error)

CreateSchedulersFromProwConfig will generate Pipeline Schedulers from the prow configmaps in the specified namespace or the config and plugins files specified as an option

func GenerateProw Uses

func GenerateProw(gitOps bool, autoApplyConfigUpdater bool, jxClient versioned.Interface, namespace string, teamSchedulerName string, devEnv *jenkinsv1.Environment, loadSchedulerResourcesFunc func(versioned.Interface, string) (map[string]*jenkinsv1.Scheduler, *jenkinsv1.SourceRepositoryGroupList, *jenkinsv1.SourceRepositoryList, error)) (*config.Config,
    *plugins.Configuration, error)

GenerateProw will generate the prow config for the namespace

type DefaultOwnersDirBlacklist Uses

type DefaultOwnersDirBlacklist struct {
    // Blacklist configures a default blacklist for repos (or orgs) not
    // specifically configured
    Blacklist []string `json:"default"`
}

DefaultOwnersDirBlacklist is the default blacklist

type GarbageCollection Uses

type GarbageCollection struct {
    // Interval is how often a Garbage Collection will be performed. Defaults to one hour.
    Interval time.Duration `json:"-"`
    // PipelineAge is how old a Pipeline can be before it is garbage-collected.
    // Defaults to one week.
    PipelineAge time.Duration `json:"-"`
    // PodAge is how old a Pod can be before it is garbage-collected.
    // Defaults to one day.
    PodAge time.Duration `json:"-"`
}

GarbageCollection defines the configuration for cleaning up pipeline related resources

type GitOpsOptions Uses

type GitOpsOptions struct {
    Gitter          gits.Gitter
    Verbose         bool
    Helmer          helm.Helmer
    GitProvider     gits.GitProvider
    DevEnv          *jenkinsv1.Environment
    EnvironmentsDir string
}

GitOpsOptions are options for running AddToEnvironmentRepo

func (*GitOpsOptions) AddSchedulersToEnvironmentRepo Uses

func (o *GitOpsOptions) AddSchedulersToEnvironmentRepo(sourceRepositoryGroups []*jenkinsv1.SourceRepositoryGroup, sourceRepositories []*jenkinsv1.SourceRepository, schedulers map[string]*jenkinsv1.Scheduler) error

AddSchedulersToEnvironmentRepo adds the prow config to the gitops environment repo

func (*GitOpsOptions) AddToEnvironmentRepo Uses

func (o *GitOpsOptions) AddToEnvironmentRepo(cfg *config.Config, plugs *plugins.Configuration, kubeClient kubernetes.Interface, namespace string) error

AddToEnvironmentRepo adds the prow config to the gitops environment repo

func (*GitOpsOptions) RegisterProwConfigUpdater Uses

func (o *GitOpsOptions) RegisterProwConfigUpdater(kubeClient kubernetes.Interface, namespace string) error

RegisterProwConfigUpdater Register the config updater in the plugin configmap

type Heart Uses

type Heart struct {
    // Adorees is a list of GitHub logins for members
    // for whom we will add emojis to comments
    Adorees []string `json:"adorees,omitempty"`
    // CommentRegexp is the regular expression for comments
    // made by adorees that the plugin adds emojis to.
    // If not specified, the plugin will not add emojis to
    // any comments.
    // Compiles into CommentRe during config load.
    CommentRegexp string `json:"commentregexp,omitempty"`
}

Heart contains the configuration for adding emojis

type Owners Uses

type Owners struct {
    // SkipCollaborators disables collaborator cross-checks and forces both
    // the approve and lgtm plugins to use solely OWNERS files for access
    // control in the provided repos.
    SkipCollaborators []string `json:"skip_collaborators,omitempty"`

    // LabelsBlackList holds a list of labels that should not be present in any
    // OWNERS file, preventing their automatic addition by the owners-label plugin.
    // This check is performed by the verify-owners plugin.
    LabelsBlackList []string `json:"labels_blacklist,omitempty"`
}

Owners contains configuration related to handling OWNERS files.

type ProwConfig Uses

type ProwConfig struct {
    Reviewers Reviewers `yaml:"blunderbuss,omitempty"`
    Owners    Owners    `json:"owners,omitempty"`
    // DefaultNamespace defines the namespace to run the jobs, by default the team namespace
    DefaultNamespace string `yaml:"jobNamespace,omitempty"`
    // TODO PushGateway
    DefaultOwnersDirBlacklist DefaultOwnersDirBlacklist `yaml:"defaultOwnersDirBlacklist,omitempty"`
    GarbageCollection         GarbageCollection         `yaml:"garbageCollection,omitempty"`
    Heart                     Heart                     `yaml:"heart,omitempty"`
}

ProwConfig is the SchedulerSpec config that relates explicitly to Prow

type Reviewers Uses

type Reviewers struct {
    // ReviewerCount is the minimum number of reviewers to request
    // reviews from. Defaults to requesting reviews from 2 reviewers
    // if FileWeightCount is not set.
    ReviewerCount *int `json:"request_count,omitempty"`
    // MaxReviewerCount is the maximum number of reviewers to request
    // reviews from. Defaults to 0 meaning no limit.
    MaxReviewerCount int `json:"max_request_count,omitempty"`
    // FileWeightCount is the maximum number of reviewers to request
    // reviews from. Selects reviewers based on file weighting.
    // This and request_count are mutually exclusive options.
    FileWeightCount *int `json:"file_weight_count,omitempty"`
    // ExcludeApprovers controls whether approvers are considered to be
    // reviewers. By default, approvers are considered as reviewers if
    // insufficient reviewers are available. If ExcludeApprovers is true,
    // approvers will never be considered as reviewers.
    ExcludeApprovers bool `json:"exclude_approvers,omitempty"`
}

Reviewers defines configuration for PR review

type SchedulerLeaf Uses

type SchedulerLeaf struct {
    *jenkinsv1.SchedulerSpec
    Org  string
    Repo string
}

SchedulerLeaf defines a pipeline scheduler leaf

Directories

PathSynopsis
testhelpers

Package pipelinescheduler imports 33 packages (graph) and is imported by 3 packages. Updated 2019-09-13. Refresh now. Tools for package owners.