jenkins

package
v0.0.0-...-f29e798 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package jenkins contains code to connect to Jenkins and trigger builds

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildRequest

type BuildRequest struct {
	BuildID string
}

BuildRequest contains the details to trigger a build

func UnmarshalBuildRequest

func UnmarshalBuildRequest(data []byte) (BuildRequest, error)

UnmarshalBuildRequest turns a byte array into a proper BuildRequest struct

type BuildResponse

type BuildResponse struct {
	HTTPStatusCode    int
	HTTPStatusMessage string
	JenkinsResponse   string
}

BuildResponse contains the response from Jenkins

type Server

type Server struct {
	URL       string
	User      string
	AuthToken string
}

Server contains details to connect to the Jenkins server

func NewServer

func NewServer(URL string, User string, AuthToken string) *Server

NewServer instantiates a new server struct to connect to Jenkins

func (*Server) TriggerBuild

func (s *Server) TriggerBuild(r *BuildRequest) (*BuildResponse, error)

TriggerBuild sends a request to the Jenkins server to trigger a build and responds accordingly

Jump to

Keyboard shortcuts

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