cisetup

package
v2.41.6 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

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 ConfigServerId = "jfrog-instance"
View Source
const GithubActionsFileName = "build.yml"
View Source
const (
	JenkinsDslFileName = "Jenkinsfile"
)
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

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

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

func (BuildInfoResourceConfiguration) ResourceConfigurationMarkerFunction

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[coreutils.Technology]bool
	// The chosen build technology stored with all the necessary information.
	BuiltTechnology *TechnologyInfo
	VcsCredentials  VcsServerDetails
	GitProvider     GitProvider
}

func (*CiSetupData) GetBuildCmdForNativeStep added in v2.4.0

func (sd *CiSetupData) GetBuildCmdForNativeStep() string

Trim technology name from command prefix. (example: mvn clean install >> clean install)

func (*CiSetupData) GetRepoFullName

func (sd *CiSetupData) GetRepoFullName() string

type CiType

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

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

func (g GitRepoResourceConfiguration) ResourceConfigurationMarkerFunction()

type GithubActionsGenerator

type GithubActionsGenerator struct {
	SetupData *CiSetupData
}

func (*GithubActionsGenerator) Generate

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

type GradleStepConfiguration

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

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

type JenkinsfileDslGenerator struct {
	SetupData *CiSetupData
}

func (*JenkinsfileDslGenerator) GenerateDsl added in v2.4.0

func (jg *JenkinsfileDslGenerator) GenerateDsl() (jenkinsfileBytes []byte, jenkinsfileName string, err error)

type JenkinsfileGenerator

type JenkinsfileGenerator struct {
	SetupData *CiSetupData
}

func (*JenkinsfileGenerator) Generate

func (jg *JenkinsfileGenerator) Generate() (jenkinsfileBytes []byte, jenkinsfileName string, err error)

type MavenStepConfiguration

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

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

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

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

type StepType string
const (
	MvnBuild         StepType = "MvnBuild"
	GradleBuild      StepType = "GradleBuild"
	NpmBuild         StepType = "NpmBuild"
	Bash             StepType = "Bash"
	PublishBuildInfo StepType = "PublishBuildInfo"
)

type TechnologyInfo

type TechnologyInfo struct {
	Type               coreutils.Technology
	VirtualRepo        string
	LocalSnapshotsRepo string
	LocalReleasesRepo  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