controller

package
v2.1.155 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2020 License: Apache-2.0 Imports: 66 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateReportTargetURL

func CreateReportTargetURL(templateText string, params ReportParams) string

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

func DigitSuffix

func DigitSuffix(text string) string

DigitSuffix outputs digital suffix

func NewCmdController

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

NewCmdController creates the edit command

func NewCmdControllerBackup

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

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

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

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

func NewCmdControllerCommitStatus

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

NewCmdControllerCommitStatus creates a command object for the "create" command

func NewCmdControllerEnvironment

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

NewCmdControllerEnvironment creates the command

func NewCmdControllerRole

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

func NewCmdControllerTeam

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

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

PayloadSignature returns the signature that matches the payload.

func ValidateGitHubPayload added in v2.1.148

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

ValidateGitHubPayload ensures that the request payload signature matches the key.

func ValidateGitHubWebhook added in v2.1.148

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 added in v2.1.148

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

Types

type ControllerBackupOptions

type ControllerBackupOptions struct {
	ControllerOptions

	GitRepositoryOptions gits.GitRepositoryOptions

	Namespace    string
	Organisation string
}

ControllerBackupOptions are the flags for the commands

func (*ControllerBackupOptions) Run

func (o *ControllerBackupOptions) Run() error

Run implements this command

type ControllerBuildNumbersOptions

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

ControllerBuildNumbersOptions holds the options for the build number service.

func (*ControllerBuildNumbersOptions) Run

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

type ControllerBuildOptions

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

func (o *ControllerBuildOptions) Run() error

Run implements this command

type ControllerCommitStatusOptions

type ControllerCommitStatusOptions struct {
	ControllerOptions
}

ControllerCommitStatusOptions the options for the controller

func (*ControllerCommitStatusOptions) Run

Run implements this command

func (*ControllerCommitStatusOptions) UpsertCommitStatusCheck

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

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

Run will implement this command

type ControllerOptions

type ControllerOptions struct {
	*opts.CommonOptions
}

ControllerOptions contains the CLI options

func (*ControllerOptions) LoadProwOAuthConfig

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

LoadProwOAuthConfig returns the OAuth Token for Prow

func (*ControllerOptions) Run

func (o *ControllerOptions) Run() error

Run implements this command

type ControllerRoleFlags

type ControllerRoleFlags struct {
	Version string
}

type ControllerRoleOptions

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

func (o *ControllerRoleOptions) Run() error

func (*ControllerRoleOptions) UpsertEnvironmentRoleBinding

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

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

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

func (*ControllerRoleOptions) WatchEnvironments

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

func (*ControllerRoleOptions) WatchRoles

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

type ControllerTeamOptions

type ControllerTeamOptions struct {
	ControllerOptions
	create.InstallOptions

	GitRepositoryOptions gits.GitRepositoryOptions
}

ControllerTeamOptions are the flags for the commands

func (*ControllerTeamOptions) Run

func (o *ControllerTeamOptions) Run() error

Run implements this command

type ReportParams

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

ReportParams contains the parameters for target URL templates

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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