receive

package
v0.9.2-alpha Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2017 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(conf *Config, oldRev, newRev, refName string) error

Run executes the git-receive hook

Types

type Config

type Config struct {
	// k8s service discovery env vars
	Host                       string `envconfig:"KUBERNETES_SERVICE_HOST" required:"true"`
	DeployName                 string `envconfig:"DEPLOY_NAME" required:"true"`
	Namespace                  string `envconfig:"NAMESPACE" required:"true"`
	UserJwtToken               string `envconfig:"USER_JWT_TOKEN" required:"true"`
	GitHome                    string `envconfig:"GIT_HOME" default:"/home/git"`
	GitAPIHostname             string `envconfig:"GIT_API_HOSTNAME" default:"http://git-server.koli-system"`
	Debug                      bool   `envconfig:"DEBUG" default:"false"`
	BuilderPodTickDurationMSec int    `envconfig:"BUILDER_POD_TICK_DURATION" default:"100"`
	BuilderPodWaitDurationMSec int    `envconfig:"BUILDER_POD_WAIT_DURATION" default:"900000"` // 15 minutes
	SessionIdleIntervalMsec    int    `envconfig:"SESSION_IDLE_INTERVAL" default:"10000"`      // 10 seconds
}

Config is the envconfig (http://github.com/kelseyhightower/envconfig) compatible struct for the builder's git-receive hook.

func (Config) BuilderPodTickDuration

func (c Config) BuilderPodTickDuration() time.Duration

BuilderPodTickDuration returns the size of the interval used to check for the end of the execution of a Pod building an application.

func (Config) BuilderPodWaitDuration

func (c Config) BuilderPodWaitDuration() time.Duration

BuilderPodWaitDuration returns the maximum time to wait for the end of the execution of a Pod building an application.

func (*Config) CheckDurations

func (c *Config) CheckDurations()

CheckDurations checks if ticks for builder and object storage are not bigger than the maximum duration. In case of this it will set the tick to the default.

func (Config) SessionIdleInterval

func (c Config) SessionIdleInterval() time.Duration

SessionIdleInterval returns the ticker interval to wait for status

Jump to

Keyboard shortcuts

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