cisetup

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2021 License: Apache-2.0 Imports: 15 Imported by: 1

Documentation

Index

Constants

View Source
const (
	Github           = "GitHub"
	GithubEnterprise = "GitHub Enterprise"
	Bitbucket        = "Bitbucket"
	BitbucketServer  = "Bitbucket Server"
	Gitlab           = "GitLab"
)
View Source
const (
	Maven  = "maven"
	Gradle = "gradle"
	Npm    = "npm"
)
View Source
const ConfigServerId = "ci-setup-cmd"
View Source
const (
	PipelinesYamlPath = "pipelines.yml"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildOn

type BuildOn struct {
	PullRequestCreate bool `yaml:"pullRequestCreate,omitempty"`
	Commit            bool `yaml:"commit,omitempty"`
}

type CiSetupData

type CiSetupData struct {
	RepositoryName          string
	ProjectDomain           string
	VcsBaseUrl              string
	LocalDirPath            string
	GitBranch               string
	BuildCommand            string
	BuildName               string
	ArtifactoryVirtualRepos map[Technology]string
	// A collection of technologies that was found with a list of theirs indications
	DetectedTechnologies map[Technology]bool
	VcsCredentials       VcsServerDetails
	GitProvider          GitProvider
}

func (*CiSetupData) GetRepoFullName

func (sd *CiSetupData) GetRepoFullName() string

type CustomImage

type CustomImage struct {
	Name             string `yaml:"name,omitempty"`
	Tag              string `yaml:"tag,omitempty"`
	Options          string `yaml:"options,omitempty"`
	Registry         string `yaml:"registry,omitempty"`
	SourceRepository string `yaml:"sourceRepository,omitempty"`
	Region           string `yaml:"region,omitempty"`
}

type GitProvider

type GitProvider string

type GradleIndicator

type GradleIndicator struct {
}

func (GradleIndicator) GetTechnology

func (gi GradleIndicator) GetTechnology() Technology

func (GradleIndicator) Indicates

func (gi GradleIndicator) Indicates(file string) bool

type IncludeExclude

type IncludeExclude struct {
	Include string `yaml:"include,omitempty"`
	Exclude string `yaml:"exclude,omitempty"`
}

type JFrogPipelinesConfigurator

type JFrogPipelinesConfigurator struct {
	SetupData      *CiSetupData
	PipelinesToken string
}

func (*JFrogPipelinesConfigurator) Config

func (pc *JFrogPipelinesConfigurator) Config() (vcsIntName, rtIntName string, err error)

type JFrogPipelinesYamlGenerator

type JFrogPipelinesYamlGenerator struct {
	VcsIntName string
	RtIntName  string
	SetupData  *CiSetupData
}

func (*JFrogPipelinesYamlGenerator) Generate

func (yg *JFrogPipelinesYamlGenerator) Generate() (pipelineBytes []byte, pipelineName string, err error)

type MavenIndicator

type MavenIndicator struct {
}

func (MavenIndicator) GetTechnology

func (mi MavenIndicator) GetTechnology() Technology

func (MavenIndicator) Indicates

func (mi MavenIndicator) Indicates(file string) bool

type NpmIndicator

type NpmIndicator struct {
}

func (NpmIndicator) GetTechnology

func (ni NpmIndicator) GetTechnology() Technology

func (NpmIndicator) Indicates

func (ni NpmIndicator) Indicates(file string) bool

type Pipeline

type Pipeline struct {
	Name          string                `yaml:"name,omitempty"`
	Configuration PipelineConfiguration `yaml:"configuration,omitempty"`
	Steps         []PipelineStep        `yaml:"steps,omitempty"`
}

type PipelineConfiguration

type PipelineConfiguration struct {
	Runtime `yaml:"runtime,omitempty"`
}

type PipelineStep

type PipelineStep struct {
	Name          string            `yaml:"name,omitempty"`
	StepType      string            `yaml:"type,omitempty"`
	Configuration StepConfiguration `yaml:"configuration,omitempty"`
	Execution     StepExecution     `yaml:"execution,omitempty"`
}

type PipelineYml

type PipelineYml struct {
	Resources []Resource `yaml:"resources,omitempty"`
	Pipelines []Pipeline `yaml:"pipelines,omitempty"`
}

type Resource

type Resource struct {
	Name                  string `yaml:"name,omitempty"`
	ResourceType          `yaml:"type,omitempty"`
	ResourceConfiguration `yaml:"configuration,omitempty"`
}

type ResourceConfiguration

type ResourceConfiguration struct {
	Path        string `yaml:"path,omitempty"`
	GitProvider string `yaml:"gitProvider,omitempty"`
	BuildOn     `yaml:"buildOn,omitempty"`
	Branches    IncludeExclude `yaml:"branches,omitempty"`
}

type ResourceType

type ResourceType string
const (
	GitRepo ResourceType = "GitRepo"
)

type Runtime

type Runtime struct {
	RuntimeType `yaml:"type,omitempty"`
	Image       RuntimeImage `yaml:"image,omitempty"`
}

type RuntimeImage

type RuntimeImage struct {
	Custom CustomImage `yaml:"custom,omitempty"`
}

type RuntimeType

type RuntimeType string
const (
	Image RuntimeType = "image"
)

type StepConfiguration

type StepConfiguration struct {
	InputResources []StepResource    `yaml:"inputResources,omitempty"`
	Integrations   []StepIntegration `yaml:"integrations,omitempty"`
}

type StepExecution

type StepExecution struct {
	OnStart    []string `yaml:"onStart,omitempty"`
	OnExecute  []string `yaml:"onExecute,omitempty"`
	OnComplete []string `yaml:"onComplete,omitempty"`
	OnSuccess  []string `yaml:"onSuccess,omitempty"`
	OnFailure  []string `yaml:"onFailure,omitempty"`
}

type StepIntegration

type StepIntegration struct {
	Name string `yaml:"name,omitempty"`
}

type StepResource

type StepResource struct {
	Name string `yaml:"name,omitempty"`
}

type Technology

type Technology string

type TechnologyIndicator

type TechnologyIndicator interface {
	GetTechnology() Technology
	Indicates(file string) bool
}

func GetTechIndicators

func GetTechIndicators() []TechnologyIndicator

type VcsServerDetails

type VcsServerDetails struct {
	Url         string `json:"url,omitempty"`
	User        string `json:"user,omitempty"`
	Password    string `json:"-"`
	AccessToken string `json:"-"`
}

Jump to

Keyboard shortcuts

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