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

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

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 PayloadSignature Uses

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

PayloadSignature returns the signature that matches the payload.

func ValidateGitHubPayload Uses

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

ValidateGitHubPayload ensures that the request payload signature matches the key.

func ValidateGitHubWebhook Uses

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

ValidateGitHubWebhook 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

func ValidateGitlabWebhook Uses

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

ValidateGitlabWebhook ensures that the provided request conforms to the format of a Gitlab webhook and the payload can be validated. 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
    FailIfNoGitProvider bool
    JobURLBase          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 ReportParams Uses

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

ReportParams contains the parameters for target URL templates

Directories

PathSynopsis
pipeline

Package controller imports 66 packages (graph). Updated 2020-10-25. Refresh now. Tools for package owners.