job

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2022 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Job

type Job struct {
	Name     string   `yaml:"name"`
	Checkout string   `yaml:"checkout"`
	Exec     []string `yaml:"exec"`
	// contains filtered or unexported fields
}

func (*Job) Run

func (job *Job) Run(silent bool) error

func (*Job) TemplateRebase

func (job *Job) TemplateRebase(remote, defaultBranch string)

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

func NewManager

func NewManager(cfg *core.Config, repoStorage core.RepositoryStorage) (*Manager, error)

func (*Manager) Close

func (m *Manager) Close() error

func (*Manager) Get

func (m *Manager) Get(repo *core.Repository) (*Repository, error)

func (*Manager) JobPath

func (m *Manager) JobPath(repo *core.Repository) string

func (*Manager) List

func (m *Manager) List() ([]*Repository, error)

func (*Manager) Remove

func (m *Manager) Remove(repo *core.Repository) error

func (*Manager) RepoDir

func (m *Manager) RepoDir(repo *core.Repository) string

func (*Manager) Save

func (m *Manager) Save(repoJob *Repository) error

type Repository

type Repository struct {
	Every string `yaml:"every"`

	Jobs []*Job `yaml:"jobs"`

	NextRun int64 `yaml:"next_run"`
	// contains filtered or unexported fields
}

func New

func New(repo *core.Repository) *Repository

func (*Repository) GetJob

func (r *Repository) GetJob(name string) (*Job, error)

func (*Repository) NeedRun

func (r *Repository) NeedRun() bool

func (*Repository) NewJob

func (r *Repository) NewJob(name string) (*Job, error)

func (*Repository) Normalize

func (r *Repository) Normalize() error

func (*Repository) Repo

func (r *Repository) Repo() *core.Repository

func (*Repository) Run

func (r *Repository) Run(branch string, silent bool) error

Jump to

Keyboard shortcuts

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