vcs

package
v0.0.1-alpha Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GithubActionsBuildIdVersion = "v1"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context struct {
	Github Github
	Runner Runner
}

type ContextEnvironment

type ContextEnvironment interface {
	BuilderId() string
	BuildInvocationId() string
	BuildType() string
	Context() string
	CurrentFilteredEnvironment() map[string]string
	NonReproducibleMetadata() *Metadata
	UserDefinedParameters() *Event
	RepoUri() string
	Sha() string
}

func BuildEnvironment

func BuildEnvironment(context *github.Context, runner *github.RunnerContext, current *github.CurrentBuildEnvironment) ContextEnvironment

func CreateGithubCIEnvironment

func CreateGithubCIEnvironment(githubContext []byte, runnerContext, envsContext *string) (ContextEnvironment, error)

func ResolveBuildContext

func ResolveBuildContext(context, runner, env *string) (ContextEnvironment, error)

type ContextType

type ContextType string
const (
	ContextTypeGithub ContextType = "GITHUB_ACTIONS"
)

func (ContextType) Hosted

func (in ContextType) Hosted() bool

func (ContextType) String

func (in ContextType) String() string

type Event

type Event struct {
	Inputs json.RawMessage `json:"inputs"`
}

type Github

type Github struct {
	RunId string
}

type GithubCIEnvironment

type GithubCIEnvironment struct {
	BuildContext     *github.Context
	Event            *Event
	RunnerContext    *github.RunnerContext
	BuildEnvironment *github.CurrentBuildEnvironment
	Actions          *github.Actions
}

func (*GithubCIEnvironment) BuildInvocationId

func (in *GithubCIEnvironment) BuildInvocationId() string

func (*GithubCIEnvironment) BuildType

func (in *GithubCIEnvironment) BuildType() string

func (*GithubCIEnvironment) BuilderId

func (in *GithubCIEnvironment) BuilderId() string

func (*GithubCIEnvironment) Context

func (in *GithubCIEnvironment) Context() string

func (*GithubCIEnvironment) CurrentFilteredEnvironment

func (in *GithubCIEnvironment) CurrentFilteredEnvironment() map[string]string

func (*GithubCIEnvironment) NonReproducibleMetadata

func (in *GithubCIEnvironment) NonReproducibleMetadata() *Metadata

func (*GithubCIEnvironment) RepoUri

func (in *GithubCIEnvironment) RepoUri() string

func (*GithubCIEnvironment) Sha

func (in *GithubCIEnvironment) Sha() string

func (*GithubCIEnvironment) UserDefinedParameters

func (in *GithubCIEnvironment) UserDefinedParameters() *Event

type Metadata

type Metadata struct {
	Arch    string            `json:"arch"`
	Env     map[string]string `json:"env"`
	Context Context           `json:"context"`
}

type Runner

type Runner struct {
	Os   string
	Temp string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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