Documentation ¶
Index ¶
- Constants
- func Excludes(c *v3.Constraint, v string) bool
- func GenerateExecution(executions v3.PipelineExecutionInterface, pipeline *v3.Pipeline, ...) (*v3.PipelineExecution, error)
- func GetEnvVarMap(execution *v3.PipelineExecution) map[string]string
- func GetNextExecutionName(p *v3.Pipeline) string
- func GetPipelineCommonName(obj *v3.PipelineExecution) string
- func Includes(c *v3.Constraint, v string) bool
- func IsFinishState(state string) bool
- func IsStageSuccess(stage v3.StageStatus) bool
- func Match(c *v3.Constraint, v string) bool
- func MatchAll(cs *v3.Constraints, execution *v3.PipelineExecution) bool
- func PipelineByProjectName(obj interface{}) ([]string, error)
- func PipelineConfigFromYaml(content []byte) (*v3.PipelineConfig, error)
- func PipelineConfigToYaml(pipelineConfig *v3.PipelineConfig) ([]byte, error)
- func PipelineExecutionByClusterName(obj interface{}) ([]string, error)
- func PipelineExecutionByProjectName(obj interface{}) ([]string, error)
- func ProjectNameAndSourceCodeTypeKey(projectName, souceCodeType string) string
- func SourceCodeCredentialByProjectNameAndType(obj interface{}) ([]string, error)
- func SourceCodeRepositoryByCredentialName(obj interface{}) ([]string, error)
- func SourceCodeRepositoryByProjectNameAndType(obj interface{}) ([]string, error)
- func SplitImageTag(image string) (string, string, string)
- func ValidPipelineConfig(config v3.PipelineConfig) error
Constants ¶
View Source
const ( PipelineNamespaceSuffix = "-pipeline" JenkinsName = "jenkins" PipelineName = "pipeline" PipelineSecretName = "pipeline-secret" PipelineSecretUserKey = "admin-user" PipelineSecretTokenKey = "admin-token" PipelineSecretDefaultUser = "admin" PipelineSecretDefaultToken = "admin123" RegistryName = "docker-registry" MinioName = "minio" MinioBucketLocation = "local" MinioLogBucket = "pipeline-logs" NetWorkPolicyName = "pipeline-np" LabelKeyApp = "app" LabelKeyJenkins = "jenkins" JenkinsMaster = "master" LabelKeyExecution = "execution" DefaultRegistry = "index.docker.io" LocalRegistry = "docker-registry:5000" DefaultTag = "latest" JenkinsPort = 8080 JenkinsJNLPPort = 50000 RegistryPort = 5000 MinioPort = 9000 WebhookEventPush = "push" WebhookEventPullRequest = "pull_request" WebhookEventTag = "tag" TriggerTypeUser = "user" TriggerTypeWebhook = "webhook" StateWaiting = "Waiting" StateBuilding = "Building" StateSuccess = "Success" StateFailed = "Failed" StateSkipped = "Skipped" StateAborted = "Aborted" StateQueueing = "Queueing" StatePending = "Pending" StateDenied = "Denied" PipelineFinishLabel = "pipeline.management.cattle.io/finish" PipelineFileYml = ".rancher-pipeline.yml" PipelineFileYaml = ".rancher-pipeline.yaml" EnvGitRepoName = "CICD_GIT_REPO_NAME" EnvGitURL = "CICD_GIT_URL" EnvGitCommit = "CICD_GIT_COMMIT" EnvGitRef = "CICD_GIT_REF" EnvGitBranch = "CICD_GIT_BRANCH" EnvGitTag = "CICD_GIT_TAG" EnvTriggerType = "CICD_TRIGGER_TYPE" EnvEvent = "CICD_EVENT" EnvExecutionID = "CICD_EXECUTION_ID" EnvExecutionSequence = "CICD_EXECUTION_SEQUENCE" EnvPipelineID = "CICD_PIPELINE_ID" EnvProjectID = "CICD_PROJECT_ID" EnvClusterID = "CICD_CLUSTER_ID" EnvRegistry = "CICD_REGISTRY" EnvImageRepo = "CICD_IMAGE_REPO" EnvLocalRegistry = "CICD_LOCAL_REGISTRY" SettingExecutorQuota = "executor-quota" SettingExecutorQuotaDefault = "2" DefaultTimeout = 60 )
View Source
const ( PipelineByProjectIndex = "pipeline.project.cattle.io/pipeline-by-project" PipelineExecutionByClusterIndex = "pipeline.project.cattle.io/execution-by-cluster" PipelineExecutionByProjectIndex = "pipeline.project.cattle.io/execution-by-project" SourceCodeCredentialByProjectAndTypeIndex = "pipeline.project.cattle.io/credential-by-project-and-type" SourceCodeRepositoryByCredentialIndex = "pipeline.project.cattle.io/repository-by-credential" SourceCodeRepositoryByProjectAndTypeIndex = "pipeline.project.cattle.io/repository-by-project-and-type" )
Variables ¶
This section is empty.
Functions ¶
func Excludes ¶
func Excludes(c *v3.Constraint, v string) bool
Excludes returns true if the string matches the exclude patterns.
func GenerateExecution ¶
func GenerateExecution(executions v3.PipelineExecutionInterface, pipeline *v3.Pipeline, pipelineConfig *v3.PipelineConfig, info *model.BuildInfo) (*v3.PipelineExecution, error)
func GetEnvVarMap ¶
func GetEnvVarMap(execution *v3.PipelineExecution) map[string]string
func GetNextExecutionName ¶
func GetPipelineCommonName ¶
func GetPipelineCommonName(obj *v3.PipelineExecution) string
func Includes ¶
func Includes(c *v3.Constraint, v string) bool
Includes returns true if the string matches the include patterns.
func IsFinishState ¶
func IsStageSuccess ¶
func IsStageSuccess(stage v3.StageStatus) bool
func MatchAll ¶
func MatchAll(cs *v3.Constraints, execution *v3.PipelineExecution) bool
func PipelineByProjectName ¶
func PipelineConfigFromYaml ¶
func PipelineConfigFromYaml(content []byte) (*v3.PipelineConfig, error)
func PipelineConfigToYaml ¶
func PipelineConfigToYaml(pipelineConfig *v3.PipelineConfig) ([]byte, error)
func ValidPipelineConfig ¶
func ValidPipelineConfig(config v3.PipelineConfig) error
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.