basher

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2018 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

The basher package contains the interface for and implementation of the shell commands that will eventually be exucted for each build. Not technically bash, but basher sounds cool and is descriptive.

Index

Constants

View Source
const DefaultBitbucketURL = "https://x-token-auth:%s@bitbucket.org/%s.git"
View Source
const DefaultGithubURL = ""

Variables

This section is empty.

Functions

This section is empty.

Types

type Bashable

type Bashable func(string) []string

type Basher

type Basher struct {
	BbDownloadURL     string
	GithubDownloadURL string
	LoopbackIp        string
	// contains filtered or unexported fields
}

func NewBasher

func NewBasher(downloadUrl, GHubDownloadUrl, LoopbackIP, dotOcelotPrefix string) (*Basher, error)

func (*Basher) CDAndRunCmds

func (b *Basher) CDAndRunCmds(cmds []string, commitHash string) []string

CDAndRunCmds will cd into the root directory of the codebase and execute commands passed in

func (*Basher) CloneDir

func (b *Basher) CloneDir(hash string) string

func (*Basher) DownloadCodebase

func (b *Basher) DownloadCodebase(werk *pb.WerkerTask) []string

DownloadCodebase builds bash commands to be executed for downloading the codebase

func (*Basher) DownloadKubectl

func (b *Basher) DownloadKubectl(werkerPort string) []string

func (*Basher) DownloadSSHKey

func (b *Basher) DownloadSSHKey(vaultKey, vaultPath string) []string

DownloadSSHKey will using the vault token to try to download the ssh key located at the path + `/ssh`

func (*Basher) DownloadTemplateFiles

func (b *Basher) DownloadTemplateFiles(werkerPort string) []string

DownloadTemplateFiles will download template files necessary to build containers from werker

func (*Basher) GetBbDownloadURL

func (b *Basher) GetBbDownloadURL() string

func (*Basher) GetGithubDownloadURL

func (b *Basher) GetGithubDownloadURL() string

func (*Basher) InstallPackageDeps

func (b *Basher) InstallPackageDeps() []string

func (*Basher) OcelotDir

func (b *Basher) OcelotDir() string

func (*Basher) PrefixDir

func (b *Basher) PrefixDir() string

func (*Basher) SetBbDownloadURL

func (b *Basher) SetBbDownloadURL(downloadURL string)

func (*Basher) SetGithubDownloadURL

func (b *Basher) SetGithubDownloadURL(downloadURL string)

func (*Basher) SleeplessDownloadTemplateFiles

func (b *Basher) SleeplessDownloadTemplateFiles(werkerIp string, werkerPort string) string

SleeplessDownloadTemplateFiles will download the template files to

Jump to

Keyboard shortcuts

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