jenkins

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2018 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultWritePermissions = 0760
)

Variables

This section is empty.

Functions

func CreateFolderXml

func CreateFolderXml(folderUrl string, name string) string

func CreateMultiBranchProjectXml

func CreateMultiBranchProjectXml(info *git.GitRepositoryInfo, credentials string) string

func GetJenkinsClient

func GetJenkinsClient(url string, batch bool, configService *JenkinsConfigService) (*gojenkins.Jenkins, error)

Types

type JenkinsAuth

type JenkinsAuth struct {
	Username    string
	ApiToken    string
	BearerToken string
}

func CreateJenkinsAuthFromEnvironment

func CreateJenkinsAuthFromEnvironment() JenkinsAuth

func EditJenkinsAuth

func EditJenkinsAuth(url string, configService *JenkinsConfigService, config *JenkinsConfig, auth *JenkinsAuth, tokenUrl string) (JenkinsAuth, error)

func (*JenkinsAuth) IsInvalid

func (a *JenkinsAuth) IsInvalid() bool

type JenkinsConfig

type JenkinsConfig struct {
	Servers []JenkinsServer

	DefaultUsername string
}

func (*JenkinsConfig) FindAuth

func (c *JenkinsConfig) FindAuth(serverURL string, username string) *JenkinsAuth

FindAuth finds the auth for the given user name if no username is specified and there is only one auth then return that else nil

func (*JenkinsConfig) FindAuths

func (c *JenkinsConfig) FindAuths(serverURL string) []JenkinsAuth

func (*JenkinsConfig) SetAuth

func (c *JenkinsConfig) SetAuth(url string, auth JenkinsAuth)

type JenkinsConfigService

type JenkinsConfigService struct {
	FileName string
}

func (*JenkinsConfigService) LoadConfig

func (s *JenkinsConfigService) LoadConfig() (JenkinsConfig, error)

LoadConfig loads the configuration from the users JX config directory

func (*JenkinsConfigService) SaveConfig

func (s *JenkinsConfigService) SaveConfig(config *JenkinsConfig) error

SaveConfig loads the configuration from the users JX config directory

type JenkinsServer

type JenkinsServer struct {
	URL   string
	Auths []JenkinsAuth
}

Jump to

Keyboard shortcuts

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