phoenix_go_common

package module
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2020 License: MIT Imports: 6 Imported by: 0

README

phoenix_go_common

Testing of GO private repositories

This package requires gojenkins package:

go get github.com/bndr/gojenkins

Documentation

Index

Constants

This section is empty.

Variables

View Source
var JobResultEnum_name = map[JobResultEnum]string{
	0: "UNKNOWN",
	1: "SUCCESS",
	2: "FAILURE",
	3: "IN PROGRESS",
}
View Source
var JobResultEnum_value = map[string]JobResultEnum{
	"UNKNOWN":     0,
	"SUCCESS":     1,
	"FAILURE":     2,
	"IN PROGRESS": 3,
}

Functions

func CollectParameters

func CollectParameters(val1, val2 url.Values) url.Values

func GetJenkinsParams

func GetJenkinsParams(params string) map[string]string

func GetServerIp

func GetServerIp(address string) string

replace existent URL to its IP, because gojenkins works with IPs Input - string, URL of a server or the entire path to a job containing IP as host address Output - string, IP path to the desired server

func GetValues

func GetValues(param string) url.Values

func ProcessJenkinsConfig

func ProcessJenkinsConfig(in JTarget, params string)

/ Generates

Types

type JConfig

type JConfig struct {
	MapId        string `csv:"id"`
	Address      string
	Env          string
	Token        string
	Parameters   string
	PauseSeconds int64
	SuffixNum    int64
	Action       string
	Target       string
}

type JTarget

type JTarget map[string]*JConfig

type JobResultEnum

type JobResultEnum int32
const (
	JobResultEnum_UNKNOWN    JobResultEnum = 0
	JobResultEnum_SUCCESS    JobResultEnum = 1
	JobResultEnum_FAILURE    JobResultEnum = 2
	JobResultEnum_INPROGRESS JobResultEnum = 3
)

func RunJenkinsJob

func RunJenkinsJob(jobname string, jConfig JConfig) (JobResultEnum, error)

Jump to

Keyboard shortcuts

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