codeamp

package
v0.0.0-...-0637115 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2020 License: Apache-2.0 Imports: 34 Imported by: 1

Documentation

Index

Constants

View Source
const ContinuousDeployUUID = "59ee0229-9814-4d9b-be83-7921fe6069c1"

This UUID is utilized by the release process and the slack notifier plugin this will handle the case when a deployment is automated and there is no explicit user assigned to the release. Anywhere there is a check involving the user, we check to see if it's this one first. If it is, we proceed as if it was an automated deployment

View Source
const (
	SCHEDULED_RELEASE_HANDLER_PLUGIN_NAME = "scheduledbranchreleaser"
)

This has to be here because we need a way of referencing the extension in order to get the extension ID and then grab all the project extensions that have that extension id as their parent extension

View Source
const ScheduledDeployUUID = "d7183422-768a-11e9-8f9e-2a86e4085a59"

This one is for scheduled deploys

Variables

This section is empty.

Functions

func NewLoggingResponseWriter

func NewLoggingResponseWriter(w http.ResponseWriter) *loggingResponseWriter

Types

type CodeAmp

type CodeAmp struct {
	ServiceAddress string `mapstructure:"service_address"`
	Events         chan transistor.Event
	Schema         *graphql.Schema
	SocketIO       *socketio.Server
	DB             *gorm.DB
	Redis          *redis.Client
	Resolver       *graphql_resolver.Resolver
}

func (*CodeAmp) ComplainIfNotInStaging

func (x *CodeAmp) ComplainIfNotInStaging(r *model.Release, p *model.Project) (bool, error)

ComplainIfNotInStaging will send out a notification event if the input release has been deployed to constants.ProductionEnvironment without a corresponding release in constants.StagingEnvironment returns true/false on whether the function "complained" or not

func (*CodeAmp) GitSync

func (x *CodeAmp) GitSync(project *model.Project) error

func (*CodeAmp) GitSyncEventHandler

func (x *CodeAmp) GitSyncEventHandler(e transistor.Event) error

func (*CodeAmp) GraphQLListen

func (x *CodeAmp) GraphQLListen()

func (*CodeAmp) HeartBeatEventHandler

func (x *CodeAmp) HeartBeatEventHandler(e transistor.Event)

func (*CodeAmp) InitGraphQL

func (x *CodeAmp) InitGraphQL(resolver interface{}) (*graphql.Schema, error)

func (*CodeAmp) Migrate

func (x *CodeAmp) Migrate()

func (*CodeAmp) Process

func (x *CodeAmp) Process(e transistor.Event) error

func (*CodeAmp) ProjectExtensionEventHandler

func (x *CodeAmp) ProjectExtensionEventHandler(e transistor.Event) error

func (*CodeAmp) ReleaseCompleted

func (x *CodeAmp) ReleaseCompleted(release *model.Release)

func (*CodeAmp) ReleaseEventHandler

func (x *CodeAmp) ReleaseEventHandler(e transistor.Event) error

func (*CodeAmp) ReleaseExtensionCompleted

func (x *CodeAmp) ReleaseExtensionCompleted(re *model.ReleaseExtension)

func (*CodeAmp) ReleaseExtensionEventHandler

func (x *CodeAmp) ReleaseExtensionEventHandler(e transistor.Event) error

func (*CodeAmp) ReleaseFailed

func (x *CodeAmp) ReleaseFailed(release *model.Release, stateMessage string)

func (*CodeAmp) RunQueuedReleases

func (x *CodeAmp) RunQueuedReleases(release *model.Release) error

func (*CodeAmp) ScheduledBranchReleaserEventHandler

func (x *CodeAmp) ScheduledBranchReleaserEventHandler(e transistor.Event)

This is the handler that is automagically called when CodeAmp receives a message with a 'ScheduledBranchReleaser' type payload

It's job is to handle the message that is being received from the plugin itself. If this function is executing, then the plugin has determined that the current time matches the scheduled time for this project.

The job of this function is to build a release with the desired branch and to call the graphql function that is responsible for building a release

func (*CodeAmp) SendNotifications

func (x *CodeAmp) SendNotifications(releaseState string, release *model.Release, project *model.Project) error

SendNotifications dispatches notification events to registered project extension of type notification

func (*CodeAmp) Start

func (x *CodeAmp) Start(events chan transistor.Event) error

func (*CodeAmp) Stop

func (x *CodeAmp) Stop()

func (*CodeAmp) Subscribe

func (x *CodeAmp) Subscribe() []string

func (*CodeAmp) WebsocketMsgEventHandler

func (x *CodeAmp) WebsocketMsgEventHandler(e transistor.Event) error

func (*CodeAmp) WorkflowReleaseExtensionsCompleted

func (x *CodeAmp) WorkflowReleaseExtensionsCompleted(release *model.Release)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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