deployservice

package
v0.0.0-...-df0bd0c Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2023 License: MIT Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// DryRun is a flag controlling whether to actually attempt to update the Kubernetes cluster.
	// If it is true, all actions will be performed up until the actual kubectl command would be
	// run, and then that will be skipped and assumed to have succeeded.
	DryRun bool

	// GitHubRepo is the full name of the GitHub repository to pull the build artifact from.
	GitHubRepo string

	// GitHubBranch is the branch whose builds should be considered for deploying.
	GitHubBranch string

	// WorkflowName is the filename of the GitHub Actions workflow whose artifact should be used.
	WorkflowName string

	// ArtifactName is the name of the artifact in the workflow that contains the JSON files for
	// the Nomad jobs to deploy.
	ArtifactName string

	PushoverRecipient *pushover.Recipient

	ReportBucket string
}

Config contains configuration parameters for how to fetch the build artifact to deploy.

type Server

type Server struct {
	// Config is the configuration for deployment.
	Config Config

	// GitHubClient is the client to use to make API requests to GitHub.
	GitHubClient *github.Client

	// NomadClient is the client to use to submit jobs to Nomad
	NomadClient *nomadapi.Client

	Pushover *pushover.Pushover

	S3 s3iface.S3API
	// contains filtered or unexported fields
}

func New

func New(gh *github.Client, nomad *nomadapi.Client, po *pushover.Pushover, s3Client s3iface.S3API, cfg Config) *Server

func (*Server) GetDeploy

func (*Server) PollForChanges

func (s *Server) PollForChanges(ctx context.Context, interval time.Duration)

func (*Server) Shutdown

func (s *Server) Shutdown()

Jump to

Keyboard shortcuts

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