Documentation ¶
Index ¶
- func CancelAbandonedJobs(ctx context.Context) error
- func Cleanup(ctx context.Context) error
- func CleanupArtifacts(taskCtx context.Context) error
- func CleanupLogs(ctx context.Context) error
- func CreateAuthorizationToken(taskID, runID, jobID int64) (string, error)
- func CreateCommitStatus(ctx context.Context, jobs ...*actions_model.ActionRunJob)
- func CreateScheduleTask(ctx context.Context, cron *actions_model.ActionSchedule) error
- func CreateVariable(ctx context.Context, ownerID, repoID int64, name, data string) (*actions_model.ActionVariable, error)
- func DeleteVariableByID(ctx context.Context, variableID int64) error
- func DeleteVariableByName(ctx context.Context, ownerID, repoID int64, name string) error
- func DetectAndHandleSchedules(ctx context.Context, repo *repo_model.Repository) error
- func EmitJobsIfReady(runID int64) error
- func GetAllRerunJobs(job *actions_model.ActionRunJob, allJobs []*actions_model.ActionRunJob) []*actions_model.ActionRunJob
- func GetVariable(ctx context.Context, opts actions_model.FindVariablesOpts) (*actions_model.ActionVariable, error)
- func Init()
- func NewNotifier() notify_service.Notifier
- func ParseAuthorizationToken(req *http.Request) (int64, error)
- func StartScheduleTasks(ctx context.Context) error
- func StopEndlessTasks(ctx context.Context) error
- func StopZombieTasks(ctx context.Context) error
- func TokenToTaskID(token string) (int64, error)
- func UpdateVariable(ctx context.Context, variableID int64, name, data string) (bool, error)
- type API
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CancelAbandonedJobs ¶
CancelAbandonedJobs cancels the jobs which have waiting status, but haven't been picked by a runner for a long time
func CleanupArtifacts ¶
CleanupArtifacts removes expired add need-deleted artifacts and set records expired status
func CleanupLogs ¶
CleanupLogs removes logs which are older than the configured retention time
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 ¶
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 CreateVariable ¶
func CreateVariable(ctx context.Context, ownerID, repoID int64, name, data string) (*actions_model.ActionVariable, error)
func DeleteVariableByName ¶
func DetectAndHandleSchedules ¶
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 GetAllRerunJobs ¶
func GetAllRerunJobs(job *actions_model.ActionRunJob, allJobs []*actions_model.ActionRunJob) []*actions_model.ActionRunJob
GetAllRerunJobs get all jobs that need to be rerun when job should be rerun
func GetVariable ¶
func GetVariable(ctx context.Context, opts actions_model.FindVariablesOpts) (*actions_model.ActionVariable, error)
func NewNotifier ¶
func NewNotifier() notify_service.Notifier
NewNotifier create a new actionsNotifier notifier
func StartScheduleTasks ¶
StartScheduleTasks start the task
func StopEndlessTasks ¶
StopEndlessTasks stops the tasks which have running status and continuous updates, but don't end for a long time
func StopZombieTasks ¶
StopZombieTasks stops the task which have running status, but haven't been updated for a long time
func TokenToTaskID ¶
TokenToTaskID returns the TaskID associated with the provided JWT token
Types ¶
type API ¶
type API interface { // ListActionsSecrets list secrets ListActionsSecrets(*context.APIContext) // CreateOrUpdateSecret create or update a secret CreateOrUpdateSecret(*context.APIContext) // DeleteSecret delete a secret DeleteSecret(*context.APIContext) // ListVariables list variables ListVariables(*context.APIContext) // GetVariable get a variable GetVariable(*context.APIContext) // DeleteVariable delete a variable DeleteVariable(*context.APIContext) // CreateVariable create a variable CreateVariable(*context.APIContext) // UpdateVariable update a variable UpdateVariable(*context.APIContext) // GetRegistrationToken get registration token GetRegistrationToken(*context.APIContext) }
API for actions of a repository or organization