Documentation
¶
Index ¶
- Constants
- func ApplyRetentionPolicyOnWorkflow(ctx context.Context, store cache.Store, db *gorp.DbMap, wf sdk.Workflow, ...) error
- func ApplyRunRetentionOnProject(ctx context.Context, db *gorp.DbMap, store cache.Store, pkey string, ...) error
- func ApplyRunRetentionOnWorkflow(ctx context.Context, db *gorp.DbMap, store cache.Store, ...) sdk.WorkflowPurgeReport
- func ApplyRunRetentionOnWorkflowRef(ctx context.Context, db *gorp.DbMap, store cache.Store, ...) (sdk.WorkflowRefPurgeReport, error)
- func DeleteArtifactsFromRepositoryManager(ctx context.Context, db gorp.SqlExecutor, wr *sdk.WorkflowRun) error
- func DeleteArtifactsFromRepositoryManagerV2(ctx context.Context, db gorp.SqlExecutor, run *sdk.V2WorkflowRun, ...) error
- func GetRetentionPolicyVariables() []string
- func MarkRunsAsDelete(ctx context.Context, store cache.Store, DBFunc func() *gorp.DbMap, ...)
- func MarkWorkflowRuns(ctx context.Context, db *gorp.DbMap, ...) error
- func PurgeWorkflowRunsV2(ctx context.Context, DBFunc func() *gorp.DbMap, store cache.Store, ...)
- func RemoveWorkflowRunV2(ctx context.Context, db *gorp.DbMap, id string, routines *sdk.GoRoutines) error
- func SetPurgeConfiguration(rule string, disableDeletionConf bool) error
- func Workflow(ctx context.Context, store cache.Store, DBFunc func() *gorp.DbMap, ...)
- func WorkflowRuns(ctx context.Context, DBFunc func() *gorp.DbMap, ...)
- type MarkAsDeleteOptions
- type PurgeOption
Constants ¶
View Source
const ( RunStatus = "run_status" RunDaysBefore = "run_days_before" RunHasGitBranch = "has_git_branch" RunGitBranchExist = "git_branch_exist" RunChangeExist = "gerrit_change_exist" RunChangeMerged = "gerrit_change_merged" RunChangeAbandoned = "gerrit_change_abandoned" RunChangeDayBefore = "gerrit_change_days_before" )
Variables ¶
This section is empty.
Functions ¶
func ApplyRunRetentionOnProject ¶ added in v0.56.0
func ApplyRunRetentionOnWorkflow ¶ added in v0.56.0
func ApplyRunRetentionOnWorkflow(ctx context.Context, db *gorp.DbMap, store cache.Store, pkey, workflowFullName string, projectRunRetention *sdk.ProjectRunRetention, routines *sdk.GoRoutines, opts PurgeOption) sdk.WorkflowPurgeReport
func ApplyRunRetentionOnWorkflowRef ¶ added in v0.56.0
func ApplyRunRetentionOnWorkflowRef(ctx context.Context, db *gorp.DbMap, store cache.Store, pkey, vcs, repo, workflowName, ref string, ruleRetention *sdk.RetentionRule, routines *sdk.GoRoutines, opts PurgeOption) (sdk.WorkflowRefPurgeReport, error)
func DeleteArtifactsFromRepositoryManager ¶
func DeleteArtifactsFromRepositoryManager(ctx context.Context, db gorp.SqlExecutor, wr *sdk.WorkflowRun) error
func DeleteArtifactsFromRepositoryManagerV2 ¶ added in v0.55.0
func DeleteArtifactsFromRepositoryManagerV2(ctx context.Context, db gorp.SqlExecutor, run *sdk.V2WorkflowRun, routines *sdk.GoRoutines) error
func GetRetentionPolicyVariables ¶
func GetRetentionPolicyVariables() []string
func MarkRunsAsDelete ¶
func MarkRunsAsDelete(ctx context.Context, store cache.Store, DBFunc func() *gorp.DbMap, workflowRunsMarkToDelete *stats.Int64Measure)
MarkRunsAsDelete mark workflow run as delete
func MarkWorkflowRuns ¶
func MarkWorkflowRuns(ctx context.Context, db *gorp.DbMap, workflowRunsMarkToDelete *stats.Int64Measure) error
MarkWorkflowRuns Deprecated: old method to mark runs to delete
func PurgeWorkflowRunsV2 ¶ added in v0.56.0
func PurgeWorkflowRunsV2(ctx context.Context, DBFunc func() *gorp.DbMap, store cache.Store, purgeRoutineTicker int64, routines *sdk.GoRoutines)
WorkflowRunsV2 deletes workflow run v2
func RemoveWorkflowRunV2 ¶ added in v0.56.0
func SetPurgeConfiguration ¶
func Workflow ¶
func Workflow(ctx context.Context, store cache.Store, DBFunc func() *gorp.DbMap, workflowRunsMarkToDelete *stats.Int64Measure)
Workflow deletes workflows marked as to delete
func WorkflowRuns ¶
func WorkflowRuns(ctx context.Context, DBFunc func() *gorp.DbMap, workflowRunsMarkToDelete, workflowRunsDeleted *stats.Int64Measure)
PurgeWorkflow deletes workflow runs marked as to delete
Types ¶
type MarkAsDeleteOptions ¶
type MarkAsDeleteOptions struct {
DryRun bool
}
type PurgeOption ¶ added in v0.56.0
type PurgeOption struct {
DisabledDryRun bool
DryRunRules *sdk.ProjectRunRetention
ReportID string
}
Click to show internal directories.
Click to hide internal directories.