actions

package
v1.21.11 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: MIT Imports: 36 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CancelAbandonedJobs

func CancelAbandonedJobs(ctx context.Context) error

CancelAbandonedJobs cancels the jobs which have waiting status, but haven't been picked by a runner for a long time

func Cleanup added in v1.21.0

func Cleanup(taskCtx context.Context, olderThan time.Duration) error

Cleanup removes expired actions logs, data and artifacts

func CleanupArtifacts added in v1.21.0

func CleanupArtifacts(taskCtx context.Context) error

CleanupArtifacts removes expired artifacts and set records expired status

func CreateCommitStatus

func CreateCommitStatus(ctx context.Context, jobs ...*actions_model.ActionRunJob)

CreateCommitStatus creates a commit status for the given job. It won't return an error failed, but will log it, because it's not critical.

func CreateScheduleTask added in v1.21.0

func CreateScheduleTask(ctx context.Context, cron *actions_model.ActionSchedule) error

CreateScheduleTask creates a scheduled task from a cron action schedule. It creates an action run based on the schedule, inserts it into the database, and creates commit statuses for each job.

func DetectAndHandleSchedules added in v1.21.5

func DetectAndHandleSchedules(ctx context.Context, repo *repo_model.Repository) error

DetectAndHandleSchedules detects the schedule workflows on the default branch and create schedule tasks

func EmitJobsIfReady

func EmitJobsIfReady(runID int64) error

func GetAllRerunJobs added in v1.21.9

GetAllRerunJobs get all jobs that need to be rerun when job should be rerun

func Init

func Init()

func NewNotifier

func NewNotifier() notify_service.Notifier

NewNotifier create a new actionsNotifier notifier

func StartScheduleTasks added in v1.21.0

func StartScheduleTasks(ctx context.Context) error

StartScheduleTasks start the task

func StopEndlessTasks

func StopEndlessTasks(ctx context.Context) error

StopEndlessTasks stops the tasks which have running status and continuous updates, but don't end for a long time

func StopZombieTasks

func StopZombieTasks(ctx context.Context) error

StopZombieTasks stops the task which have running status, but haven't been updated for a long time

Types

This section is empty.

Jump to

Keyboard shortcuts

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