cisetup

package
v1.12.1 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2022 License: Apache-2.0 Imports: 17 Imported by: 1

Documentation

Index

Constants

View Source
const (
	Github           = "GitHub"
	GithubEnterprise = "GitHub Enterprise"
	Bitbucket        = "Bitbucket"
	BitbucketServer  = "Bitbucket Server"
	Gitlab           = "GitLab"
)
View Source
const (
	Jenkins       = "Jenkins"
	GithubActions = "GitHub Actions"
	Pipelines     = "JFrog Pipelines"
)
View Source
const (
	MvnBuild         StepType = "MvnBuild"
	GradleBuild               = "GradleBuild"
	NpmBuild                  = "NpmBuild"
	Bash                      = "Bash"
	PublishBuildInfo          = "PublishBuildInfo"
)
View Source
const (
	Maven  = "Maven"
	Gradle = "Gradle"
	Npm    = "npm"
)
View Source
const ConfigServerId = "ci-setup-cmd"
View Source
const GithubActionsFileName = "build.yml"
View Source
const JenkinsfileName = "Jenkinsfile"
View Source
const (
	PipelinesYamlName = "pipelines.yml"
)

Variables

View Source
var GithubActionsDir = filepath.Join(".github", "workflows")

Functions

This section is empty.

Types

type BaseStepConfiguration added in v1.7.0

type BaseStepConfiguration struct {
	EnvironmentVariables map[string]string `yaml:"environmentVariables,omitempty"`
	Integrations         []StepIntegration `yaml:"integrations,omitempty"`
	InputResources       []StepResource    `yaml:"inputResources,omitempty"`
	OutputResources      []StepResource    `yaml:"outputResources,omitempty"`
	InputSteps           []InputStep       `yaml:"inputSteps,omitempty"`
}

type BuildInfoResourceConfiguration added in v1.7.0

type BuildInfoResourceConfiguration struct {
	SourceArtifactoryIntegration string      `yaml:"sourceArtifactory,omitempty"`
	BuildName                    string      `yaml:"buildName,omitempty"`
	BuildNumber                  json.Number `yaml:"buildNumber,omitempty"`
}

func (BuildInfoResourceConfiguration) ResourceConfigurationMarkerFunction added in v1.7.0

func (b BuildInfoResourceConfiguration) ResourceConfigurationMarkerFunction()

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
	BuildName      string
	CiType         CiType
	// A collection of the technologies that were detected in the project.
	DetectedTechnologies map[Technology]bool
	// The chosen build technology stored with all the necessary information.
	BuiltTechnology *TechnologyInfo
	VcsCredentials  VcsServerDetails
	GitProvider     GitProvider
}

func (*CiSetupData) GetRepoFullName

func (sd *CiSetupData) GetRepoFullName() string

type CiType added in v1.7.0

type CiType 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 GitRepoResourceConfiguration added in v1.7.0

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

func (GitRepoResourceConfiguration) ResourceConfigurationMarkerFunction added in v1.7.0

func (g GitRepoResourceConfiguration) ResourceConfigurationMarkerFunction()

type GithubActionsGenerator added in v1.7.0

type GithubActionsGenerator struct {
	SetupData *CiSetupData
}

func (*GithubActionsGenerator) Generate added in v1.7.0

func (gg *GithubActionsGenerator) Generate() (githubActionsBytes []byte, githubActionsName string, err error)

type GradleIndicator

type GradleIndicator struct {
}

func (GradleIndicator) GetTechnology

func (gi GradleIndicator) GetTechnology() Technology

func (GradleIndicator) Indicates

func (gi GradleIndicator) Indicates(file string) bool

type GradleStepConfiguration added in v1.7.0

type GradleStepConfiguration struct {
	NativeStepConfiguration `yaml:",inline"`
	GradleCommand           string `yaml:"gradleCommand,omitempty"`
	ResolverRepo            string `yaml:"resolverRepo,omitempty"`
	UsesPlugin              bool   `yaml:"usesPlugin,omitempty"`
	UseWrapper              bool   `yaml:"useWrapper,omitempty"`
}

type IncludeExclude

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

type InputStep added in v1.7.0

type InputStep struct {
	Name string `yaml:"name,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 JenkinsfileGenerator added in v1.7.0

type JenkinsfileGenerator struct {
	SetupData *CiSetupData
}

func (*JenkinsfileGenerator) Generate added in v1.7.0

func (jg *JenkinsfileGenerator) Generate() (jenkinsfileBytes []byte, jenkinsfileName 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 MavenStepConfiguration added in v1.7.0

type MavenStepConfiguration struct {
	NativeStepConfiguration `yaml:",inline"`
	MvnCommand              string `yaml:"mvnCommand,omitempty"`
	ResolverSnapshotRepo    string `yaml:"resolverSnapshotRepo,omitempty"`
	ResolverReleaseRepo     string `yaml:"resolverReleaseRepo,omitempty"`
	DeployerSnapshotRepo    string `yaml:"deployerSnapshotRepo,omitempty"`
	DeployerReleaseRepo     string `yaml:"deployerReleaseRepo,omitempty"`
}

type NativeStepConfiguration added in v1.7.0

type NativeStepConfiguration struct {
	BaseStepConfiguration `yaml:",inline"`
	ForceXrayScan         bool `yaml:"forceXrayScan,omitempty"`
	FailOnScan            bool `yaml:"failOnScan,omitempty"`
	AutoPublishBuildInfo  bool `yaml:"autoPublishBuildInfo,omitempty"`
}

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"`
	PipelineEnvVars `yaml:"environmentVariables,omitempty"`
}

type PipelineEnvVars added in v1.7.0

type PipelineEnvVars struct {
	ReadOnlyEnvVars map[string]string `yaml:"readOnly,omitempty"`
}

type PipelineStep

type PipelineStep struct {
	Name          string `yaml:"name,omitempty"`
	StepType      `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 interface {
	ResourceConfigurationMarkerFunction()
}

type ResourceType

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

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 interface {
	// contains filtered or unexported methods
}

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 StepType added in v1.7.0

type StepType string

type Technology

type Technology string

type TechnologyIndicator

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

func GetTechIndicators

func GetTechIndicators() []TechnologyIndicator

type TechnologyInfo added in v1.7.0

type TechnologyInfo struct {
	Type        Technology
	VirtualRepo string
	BuildCmd    string
}

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