provider

package
v0.0.0-...-9311b92 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2022 License: MIT Imports: 17 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseAnnotations

func ParseAnnotations(message string) (res map[string]string)

ParseAnnotations parses one annotation per line in the form of "/werft <key>(=<value>)?". Any line not matching this format is silently ignored.

Types

type Config

type Config struct {
	ContainerImage string
}

Config configures the GithubRepoServer

type GitCredentialHelper

type GitCredentialHelper func(ctx context.Context) (user string, pass string, err error)

GitCredentialHelper can authenticate provide authentication credentials for a repository

type GithubRepoServer

type GithubRepoServer struct {
	Client *github.Client
	Auth   GitCredentialHelper

	Config Config
}

GithubRepoServer provides access to Github repos

func (*GithubRepoServer) ContentInitContainer

ContentInitContainer produces the init container YAML required to initialize the build context from this repository in /workspace.

func (*GithubRepoServer) Download

Download downloads a file from the repository.

func (*GithubRepoServer) GetRemoteAnnotations

GetRemoteAnnotations extracts werft annotations form information associated with a particular commit, e.g. the commit message, PRs or merge requests.

func (*GithubRepoServer) ListFiles

ListFiles lists all files in a directory.

func (*GithubRepoServer) RepoHost

RepoHost returns the host which this plugins integrates with

func (*GithubRepoServer) Resolve

Resolve resolves the repo's revision based on its ref(erence)

Jump to

Keyboard shortcuts

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