buildkite

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EnvKey      = "BUILDKITE"
	Integration = "buildkite"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Ci

type Ci struct{}

func (Ci) Identify

func (_ Ci) Identify() bool

func (Ci) Map

func (ci Ci) Map() (env.Env, error)

func (Ci) MapRepository

func (_ Ci) MapRepository(buildkiteRepo string) string

MapRepository returns the repository according to the following rules:

  1. If BUILDKITE_REPO starts with "http(s)://" and ends with ".git", use capture group to find repository.
  2. If BUILDKITE_REPO starts with "git@" and ends with ".git", use capture group to find repository.
  3. return BUILDKITE_REPO.

func (Ci) MapRepositoryUrl

func (_ Ci) MapRepositoryUrl(buildkiteRepo string) string

MapRepositoryUrl returns the repository url according to the following rules:

  1. If buildkiteRepo starts with "http(s)://" and ends with ".git", use capture group to find repository.
  2. If buildkiteRepo is of the form "git@github.com:organisation/reponame.git", rewrite and use "https://github.com/organisation/reponame".
  3. return buildkiteRepo.

Jump to

Keyboard shortcuts

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