autodiscovery

package
v0.79.0 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// DefaultGenericsSpecs defines the default builder that we want to run
	DefaultCrawlerSpecs = Config{
		Crawlers: CrawlersConfig{
			"argocd":        argocd.Spec{},
			"cargo":         cargo.Spec{},
			"dockercompose": dockercompose.Spec{},
			"dockerfile":    dockerfile.Spec{},
			"flux":          flux.Spec{},
			"golang/gomod":  golang.Spec{},
			"helm":          helm.Spec{},
			"helmfile":      helmfile.Spec{},
			"ko":            ko.Spec{},
			"kubernetes":    kubernetes.Spec{},
			"maven":         maven.Spec{},
			"npm":           npm.Spec{},
			"rancher/fleet": fleet.Spec{},
			"terraform":     &terraform.Spec{},
			"updatecli":     updatecli.Spec{},
		},
	}
	// AutodiscoverySpecs is a map of all Autodiscovery specification
	AutodiscoverySpecsMapping = map[string]interface{}{
		"argocd":        argocd.Spec{},
		"cargo":         &cargo.Spec{},
		"dockercompose": &dockercompose.Spec{},
		"dockerfile":    &dockerfile.Spec{},
		"flux":          &flux.Spec{},
		"golang/gomod":  &golang.Spec{},
		"helm":          &helm.Spec{},
		"helmfile":      &helmfile.Spec{},
		"ko":            &ko.Spec{},
		"kubernetes":    &kubernetes.Spec{},
		"maven":         &maven.Spec{},
		"npm":           &npm.Spec{},
		"rancher/fleet": &fleet.Spec{},
		"terraform":     &terraform.Spec{},
		"updatecli":     &updatecli.Spec{},
	}
)

Functions

This section is empty.

Types

type AutoDiscovery

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

func New

func New(spec Config, workDir string) (*AutoDiscovery, error)

New returns an initiated autodiscovery object

func (*AutoDiscovery) Run

func (g *AutoDiscovery) Run() ([][]byte, error)

Run execute each Autodiscovery crawlers to generate Updatecli manifests

type Config added in v0.41.0

type Config struct {
	/*
		Crawlers defines a map of crawler configuration where the key represent the crawler type
	*/
	Crawlers CrawlersConfig `yaml:",omitempty"`
	/*
		scmid is a unique identifier used to retrieve the scm configuration from the configuration file.
	*/
	ScmId string `yaml:",omitempty"`
	/*
		actionid is a unique identifier used to retrieve the action configuration from the configuration file.
	*/
	ActionId string `yaml:",omitempty"`
	/*
		groupby specifies how to group pipeline. The Accepted is one of "all", "individual". Default is "all"

		default:
			all
	*/
	GroupBy GroupBy
	// !Deprecated in favor of `actionid`
	PullrequestId string `yaml:",omitempty"`
}

Config defines autodiscovery parameters

type Crawler

type Crawler interface {
	DiscoverManifests() ([][]byte, error)
}

type CrawlersConfig added in v0.44.0

type CrawlersConfig map[string]interface{}

CrawlersConfig is a custom type used to generated the jsonschema.

func (CrawlersConfig) JSONSchema added in v0.44.0

func (CrawlersConfig) JSONSchema() *jschema.Schema

JSONSchema implements the json schema interface to generate the "condition" jsonschema.

type GroupBy added in v0.41.0

type GroupBy string
const (
	GROUPBYALL        GroupBy = "all"
	GROUPBYINDIVIDUAL GroupBy = "individual"
)

func (GroupBy) Validate added in v0.41.0

func (g GroupBy) Validate() error

Jump to

Keyboard shortcuts

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