pkg

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	GroupID   int               `yaml:"groupID" json:"groupID"`
	Projects  []GitLabProject   `yaml:"projects" json:"projects"`
	Variables map[string]string `yaml:"variables" json:"variables"`
}

func NewConfig

func NewConfig(file string, tokenFile string, accessToken string, jobToken string) (Config, error)

type GitLabBranch

type GitLabBranch struct {
	Name string
	Ref  string
}

type GitLabProject

type GitLabProject struct {
	Name          string   `json:"name" yaml:"name"`
	ID            int      `json:"id" yaml:"id"`
	GroupID       int      `json:"groupID" yaml:"groupID"`
	ServiceName   string   `json:"serviceName" yaml:"serviceName"`
	ExtraServices []string `json:"extraServices" yaml:"extraServices"`
	Token         string   `json:"token", yaml:"token"`
	// contains filtered or unexported fields
}

func (*GitLabProject) GetBranch

func (g *GitLabProject) GetBranch() (string, string)

func (*GitLabProject) GetID

func (g *GitLabProject) GetID() (int, error)

func (*GitLabProject) GetPipeLineStatus

func (g *GitLabProject) GetPipeLineStatus() (string, error)

func (*GitLabProject) GetPipeline

func (g *GitLabProject) GetPipeline() *gitlab.Pipeline

func (*GitLabProject) SetBranch

func (g *GitLabProject) SetBranch(name string) error

func (*GitLabProject) SetClient

func (g *GitLabProject) SetClient(client *gitlab.Client)

func (*GitLabProject) SetPipeline

func (g *GitLabProject) SetPipeline(pipeline *gitlab.Pipeline)

func (*GitLabProject) SetToken

func (g *GitLabProject) SetToken(deployToken string) error

func (*GitLabProject) TriggerPipeline

func (g *GitLabProject) TriggerPipeline(variables map[string]string) error

Jump to

Keyboard shortcuts

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