job

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2023 License: GPL-3.0 Imports: 16 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateJobDetail

func CreateJobDetail(name string, id int) (*model.JobDetail, error)

CreateJobDetail exec pipeline job

func DeleteJob

func DeleteJob(name string) error

DeleteJob delete job yaml file

func DeleteJobDetail

func DeleteJobDetail(name string, pipelineDetailId int) error

DeleteJobDetail delete job detail

func GetFileData

func GetFileData(path string) ([]byte, error)

func GetJob

func GetJob(name string) (string, error)

GetJob get job

func GetJobArtifactoryDir

func GetJobArtifactoryDir(jobName string, jobID string) string

GetJobArtifactoryDir 获取 job 的 artifactory 目录路径

func GetJobArtifactoryFiles

func GetJobArtifactoryFiles(jobName string, jobID string) ([]string, error)

func GetJobArtifactoryFilesData

func GetJobArtifactoryFilesData(jobName string, jobID string) ([]*api.File, error)

func GetJobCheckDir

func GetJobCheckDir(jobName string, jobID string) string

func GetJobCheckFiles

func GetJobCheckFiles(jobName string, jobID string) ([]string, error)

func GetJobCheckFilesData

func GetJobCheckFilesData(jobName string, jobID string) ([]*api.File, error)

func GetJobDetail

func GetJobDetail(name string, id int) (*model.JobDetail, error)

GetJobDetail get job detail

func GetJobDetailFilePath

func GetJobDetailFilePath(name string, id int) string

func GetJobLog

func GetJobLog(name string, pipelineDetailId int) (*model.JobLog, error)

GetJobLog 获取 job 日志

func GetJobLogString

func GetJobLogString(name string, pipelineDetailId int) (string, error)

GetJobLogString 获取 job 日志字符串

func GetJobObject

func GetJobObject(name string) (*model.Job, error)

GetJobObject 获取 job 对象

func GetJobStageLog

func GetJobStageLog(name string, execId int, stageName string, start int) (*model.JobStageLog, error)

GetJobStageLog 获取 job 的 stage 日志

func GetJobStepLog

func GetJobStepLog(name string, id int, stageName, stepName string) (*output.Step, error)

GetJobStepLog 获取 job 的 step 日志

func GetJobsDir

func GetJobsDir() string

func JobDetailList

func JobDetailList(name string, page, pageSize int) (*model.JobDetailPage, error)

JobDetailList job detail list

func JobList

func JobList(keyword string, page, pageSize int) (*model.JobPage, error)

JobList job list

func ListFilesAbs

func ListFilesAbs(dir string) ([]string, error)

func ListFilesRel

func ListFilesRel(dir string) ([]string, error)

ListFilesRel 递归列出目录下所有文件,返回相对路径

func MakeJobStop

func MakeJobStop(jobName string, jobDetailId int, errorString string) error

MakeJobStop 使 job 停止

func OpenArtifactoryDir

func OpenArtifactoryDir(name string, detailId string) error

OpenArtifactoryDir open artifactory folder

func ReadStringJobDetail

func ReadStringJobDetail(name string, id int) (string, error)

func SaveFile

func SaveFile(path string, data []byte) error

func SaveJob

func SaveJob(name string, yaml string) error

SaveJob 保存 Job yaml 文件

func SaveJobDetail

func SaveJobDetail(name string, job *model.JobDetail) error

SaveJobDetail save job detail

func SaveJobLogString

func SaveJobLogString(name string, pipelineDetailId int, content string) error

SaveJobLogString 保存 job 日志字符串

func SaveJobParams

func SaveJobParams(name string, params map[string]string) error

func SaveJobUserId

func SaveJobUserId(name string, userId string) error

func SaveStringJobDetail

func SaveStringJobDetail(name string, id int, content string) error

func UpdateJob

func UpdateJob(oldName string, newName string, yaml string) error

UpdateJob update job yaml file

func UpdateJobDetail

func UpdateJobDetail(name string, job *model.JobDetail) error

UpdateJobDetail update job detail yaml file

func WriteFileToJobsDir

func WriteFileToJobsDir(fileName string, content []byte) error

WriteFileToJobsDir 把文件写入到 jobs 文件夹下

Types

This section is empty.

Jump to

Keyboard shortcuts

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