update

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2021 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// LighthouseHMACToken names of the hmac token secret for Lighthouse
	LighthouseHMACToken = "lighthouse-hmac-token"

	// WebHookAnnotation annotation to indicate if the webhook has been created or failed
	WebHookAnnotation = "webhook.jenkins-x.io"

	// WebHookErrorAnnotation indicates an error to create a webhook
	WebHookErrorAnnotation = "webhook.jenkins-x.io/error"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	options.BaseOptions

	ScmClientFactory scmhelpers.Factory
	Org              string
	User             string
	Repo             string
	ExactHookMatch   bool
	PreviousHookUrl  string
	HMAC             string
	Endpoint         string
	DryRun           bool
	WarnOnFail       bool
	Namespace        string
	KubeClient       kubernetes.Interface
	JXClient         jxc.Interface
}

Options the flags for updating webhooks

func NewCmdWebHookVerify

func NewCmdWebHookVerify() (*cobra.Command, *Options)

func (*Options) GetHMACTokenFromSecret

func (o *Options) GetHMACTokenFromSecret() (string, error)

GetHMACTokenFromSecret gets the appropriate HMAC secret, for either Prow or Lighthouse

func (*Options) GetWebHookEndpointFromHook

func (o *Options) GetWebHookEndpointFromHook() (string, error)

GetWebHookEndpointFromHook returns the webhook endpoint

func (*Options) Run

func (o *Options) Run() error

Run runs the command

func (*Options) UpdateWebhookForSourceRepository

func (o *Options) UpdateWebhookForSourceRepository(sr *v1.SourceRepository, envMap map[string]*v1.Environment, err error, webhookURL string, hmacToken string) (bool, error)

UpdateWebhookForSourceRepository updates the webhook for the given source repository

func (*Options) Validate

func (o *Options) Validate() error

Validate verifies things are setup correctly

Jump to

Keyboard shortcuts

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