jx: github.com/jenkins-x/jx/pkg/cmd/controller Index | Files

package controller

import "github.com/jenkins-x/jx/pkg/cmd/controller"

Index

Package Files

controller.go controller_backup.go controller_build.go controller_buildnumbers.go controller_commitstatus.go controller_enviornmentcontroller.go controller_role.go controller_team.go controller_workflow.go

func CreateReportTargetURL Uses

func CreateReportTargetURL(templateText string, params ReportParams) string

CreateReportTargetURL creates the target URL for pipeline results/logs from a template

func DigitSuffix Uses

func DigitSuffix(text string) string

DigitSuffix outputs digital suffix

func NewCmdController Uses

func NewCmdController(commonOpts *opts.CommonOptions) *cobra.Command

NewCmdController creates the edit command

func NewCmdControllerBackup Uses

func NewCmdControllerBackup(commonOpts *opts.CommonOptions) *cobra.Command

NewCmdControllerBackup creates a command object for the generic "get" action, which retrieves one or more resources from a server.

func NewCmdControllerBuild Uses

func NewCmdControllerBuild(commonOpts *opts.CommonOptions) *cobra.Command

NewCmdControllerBuild creates a command object for the generic "get" action, which retrieves one or more resources from a server.

func NewCmdControllerBuildNumbers Uses

func NewCmdControllerBuildNumbers(commonOpts *opts.CommonOptions) *cobra.Command

NewCmdControllerBuildNumbers builds a new command to serving build numbers over an HTTP interface.

func NewCmdControllerCommitStatus Uses

func NewCmdControllerCommitStatus(commonOpts *opts.CommonOptions) *cobra.Command

NewCmdControllerCommitStatus creates a command object for the "create" command

func NewCmdControllerEnvironment Uses

func NewCmdControllerEnvironment(commonOpts *opts.CommonOptions) *cobra.Command

NewCmdControllerEnvironment creates the command

func NewCmdControllerRole Uses

func NewCmdControllerRole(commonOpts *opts.CommonOptions) *cobra.Command

func NewCmdControllerTeam Uses

func NewCmdControllerTeam(commonOpts *opts.CommonOptions) *cobra.Command

NewCmdControllerTeam creates a command object for the generic "get" action, which retrieves one or more resources from a server.

func NewCmdControllerWorkflow Uses

func NewCmdControllerWorkflow(commonOpts *opts.CommonOptions) *cobra.Command

NewCmdControllerWorkflow creates a command object for the generic "get" action, which retrieves one or more resources from a server.

func PayloadSignature Uses

func PayloadSignature(payload []byte, key []byte) string

PayloadSignature returns the signature that matches the payload.

func PullRequestURLToNumber Uses

func PullRequestURLToNumber(text string) (int, error)

PullRequestURLToNumber turns Pull Request URL to number

func ValidatePayload Uses

func ValidatePayload(payload []byte, sig string, key []byte) bool

ValidatePayload ensures that the request payload signature matches the key.

func ValidateWebhook Uses

func ValidateWebhook(w http.ResponseWriter, r *http.Request, hmacSecret []byte, requireGitHubHeaders bool) (string, string, []byte, bool, int)

ValidateWebhook ensures that the provided request conforms to the format of a Github webhook and the payload can be validated with the provided hmac secret. It returns the event type, the event guid, the payload of the request, whether the webhook is valid or not, and finally the resultant HTTP status code

type ControllerBackupOptions Uses

type ControllerBackupOptions struct {
    ControllerOptions

    GitRepositoryOptions gits.GitRepositoryOptions

    Namespace    string
    Organisation string
}

ControllerBackupOptions are the flags for the commands

func (*ControllerBackupOptions) Run Uses

func (o *ControllerBackupOptions) Run() error

Run implements this command

type ControllerBuildNumbersOptions Uses

type ControllerBuildNumbersOptions struct {
    *opts.CommonOptions
    BindAddress string
    Port        int
}

ControllerBuildNumbersOptions holds the options for the build number service.

func (*ControllerBuildNumbersOptions) Run Uses

func (o *ControllerBuildNumbersOptions) Run() error

Run will execute this command, starting the HTTP build number generation service with the specified options.

type ControllerBuildOptions Uses

type ControllerBuildOptions struct {
    ControllerOptions

    Namespace          string
    InitGitCredentials bool
    GitReporting       bool
    TargetURLTemplate  string

    EnvironmentCache *kube.EnvironmentNamespaceCache

    DryRun bool
    // contains filtered or unexported fields
}

ControllerBuildOptions are the flags for the commands

func (*ControllerBuildOptions) Run Uses

func (o *ControllerBuildOptions) Run() error

Run implements this command

type ControllerCommitStatusOptions Uses

type ControllerCommitStatusOptions struct {
    ControllerOptions
}

ControllerCommitStatusOptions the options for the controller

func (*ControllerCommitStatusOptions) Run Uses

func (o *ControllerCommitStatusOptions) Run() error

Run implements this command

func (*ControllerCommitStatusOptions) UpsertCommitStatusCheck Uses

func (o *ControllerCommitStatusOptions) UpsertCommitStatusCheck(name string, pipelineActName string, url string, sha string, pullRequest string, context string, phase corev1.PodPhase, jxClient jenkinsv1client.Interface, ns string) error

type ControllerEnvironmentOptions Uses

type ControllerEnvironmentOptions struct {
    *opts.CommonOptions
    BindAddress           string
    Path                  string
    Port                  int
    NoGitCredeentialsInit bool
    NoRegisterWebHook     bool
    RequireHeaders        bool
    GitServerURL          string
    GitOwner              string
    GitRepo               string
    GitKind               string
    SourceURL             string
    WebHookURL            string
    Branch                string
    PushRef               string
    Labels                map[string]string

    StepCreateTaskOptions create.StepCreateTaskOptions
    // contains filtered or unexported fields
}

ControllerEnvironmentOptions holds the command line arguments

func (*ControllerEnvironmentOptions) Run Uses

func (o *ControllerEnvironmentOptions) Run() error

Run will implement this command

type ControllerOptions Uses

type ControllerOptions struct {
    *opts.CommonOptions
}

ControllerOptions contains the CLI options

func (*ControllerOptions) LoadProwOAuthConfig Uses

func (o *ControllerOptions) LoadProwOAuthConfig(ns string) (string, error)

LoadProwOAuthConfig returns the OAuth Token for Prow

func (*ControllerOptions) Run Uses

func (o *ControllerOptions) Run() error

Run implements this command

type ControllerRoleFlags Uses

type ControllerRoleFlags struct {
    Version string
}

type ControllerRoleOptions Uses

type ControllerRoleOptions struct {
    ControllerOptions

    NoWatch bool

    Roles           map[string]*rbacv1.Role
    EnvRoleBindings map[string]*v1.EnvironmentRoleBinding
    TeamNs          string
}

ControllerRoleOptions the command line options

func (*ControllerRoleOptions) Run Uses

func (o *ControllerRoleOptions) Run() error

func (*ControllerRoleOptions) UpsertEnvironmentRoleBinding Uses

func (o *ControllerRoleOptions) UpsertEnvironmentRoleBinding(newEnv *v1.EnvironmentRoleBinding) error

UpsertEnvironmentRoleBinding processes an insert/update of the EnvironmentRoleBinding resource its public so that we can make testing easier

func (*ControllerRoleOptions) UpsertRole Uses

func (o *ControllerRoleOptions) UpsertRole(newRole *rbacv1.Role) error

UpsertRole processes the insert/update of a Role this function is public for easier testing

func (*ControllerRoleOptions) WatchEnvironmentRoleBindings Uses

func (o *ControllerRoleOptions) WatchEnvironmentRoleBindings(jxClient versioned.Interface, ns string) error

func (*ControllerRoleOptions) WatchEnvironments Uses

func (o *ControllerRoleOptions) WatchEnvironments(kubeClient kubernetes.Interface, jxClient versioned.Interface, ns string) error

func (*ControllerRoleOptions) WatchRoles Uses

func (o *ControllerRoleOptions) WatchRoles(kubeClient kubernetes.Interface, ns string) error

type ControllerTeamOptions Uses

type ControllerTeamOptions struct {
    ControllerOptions
    create.InstallOptions

    GitRepositoryOptions gits.GitRepositoryOptions
}

ControllerTeamOptions are the flags for the commands

func (*ControllerTeamOptions) Run Uses

func (o *ControllerTeamOptions) Run() error

Run implements this command

type ControllerWorkflowOptions Uses

type ControllerWorkflowOptions struct {
    *opts.CommonOptions

    Namespace               string
    NoWatch                 bool
    NoMergePullRequest      bool
    Verbose                 bool
    LocalHelmRepoName       string
    PullRequestPollTime     string
    NoWaitForUpdatePipeline bool

    // calculated fields
    PullRequestPollDuration *time.Duration
    // contains filtered or unexported fields
}

ControllerWorkflowOptions are the flags for the commands

func (*ControllerWorkflowOptions) PipelineMap Uses

func (o *ControllerWorkflowOptions) PipelineMap() map[string]*v1.PipelineActivity

func (*ControllerWorkflowOptions) ReloadAndPollGitPipelineStatuses Uses

func (o *ControllerWorkflowOptions) ReloadAndPollGitPipelineStatuses(jxClient versioned.Interface, ns string)

ReloadAndPollGitPipelineStatuses reloads all the current pending PipelineActivity objects and polls their Git status to see if the workflows can progress.

Note this method is only really for testing and simulation

func (*ControllerWorkflowOptions) Run Uses

func (o *ControllerWorkflowOptions) Run() error

Run implements this command

type LongTermStorageLogWriter Uses

type LongTermStorageLogWriter struct {
    // contains filtered or unexported fields
}

LongTermStorageLogWriter is an implementation of logs.LogWriter that saves the obtained log lines and sends them to a Collector when the channel is closed

func (*LongTermStorageLogWriter) BytesLimit Uses

func (w *LongTermStorageLogWriter) BytesLimit() int

BytesLimit defines the limit of bytes to be used to fetch the logs from the kube API defaulted to 0 for this implementation

func (*LongTermStorageLogWriter) StreamLog Uses

func (w *LongTermStorageLogWriter) StreamLog(lch <-chan logs.LogLine, ech <-chan error) error

StreamLog will receive a logs channel and an errors channel which the logs producer will send it will mask the lines marked as ShouldMask then it will append the line's bytes to the already stored ones

func (*LongTermStorageLogWriter) WriteLog Uses

func (w *LongTermStorageLogWriter) WriteLog(logLine logs.LogLine, lch chan<- logs.LogLine) error

WriteLog will receive a logs.LogLine value and append its bytes to the LongTermStorageLogWriter stored bytes

type ReportParams Uses

type ReportParams struct {
    Owner, Repository, Branch, Build, Context string
}

ReportParams contains the parameters for target URL templates

Package controller imports 66 packages (graph) and is imported by 1 packages. Updated 2019-09-19. Refresh now. Tools for package owners.