migrations

package
v0.75.0-no-limit Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2016 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Migrations = []migration.Migrator{
	InitialSchema,
	MoveSourceAndMetadataToVersionedResources,
	AddTypeToVersionedResources,
	RemoveTransitionalCurrentVersions,
	NonNullableVersionInfo,
	AddOneOffNameSequence,
	AddHijackURLToBuilds,
	AddTimestampsToBuilds,
	CreateLocks,
	AddBuildEvents,
	ReplaceBuildsAbortHijackURLsWithGuidAndEndpoint,
	ReplaceBuildEventsIDWithEventID,
	AddLocks,
	DropOldLocks,
	AddConfig,
	AddNameToBuildInputs,
	AddEngineAndEngineMetadataToBuilds,
	AddVersionToBuildEvents,
	AddCompletedToBuilds,
	AddWorkers,
	AddEnabledToBuilds,
	CreateEventIDSequencesForInFlightBuilds,
	AddResourceTypesToWorkers,
	AddPlatformAndTagsToWorkers,
	AddIdToConfig,
	ConvertJobBuildConfigToJobPlans,
	AddCheckErrorToResources,
	AddPausedToResources,
	AddPausedToJobs,
	CreateJobsSerialGroups,
	CreatePipes,
	RenameConfigToPipelines,
	RenamePipelineIDToVersionAddPrimaryKey,
	AddNameToPipelines,
	AddPipelineIDToResources,
	AddPipelineIDToJobs,
	AddPausedToPipelines,
	AddOrderingToPipelines,
	AddInputsDeterminedToBuilds,
	AddExplicitToBuildOutputs,
	AddLastCheckedToResources,
	AddLastTrackedToBuilds,
	AddLastScheduledToPipelines,
	AddCheckingToResources,
	AddUniqueConstraintToResources,
	RemoveSourceFromVersionedResources,
	AddIndexesToABunchOfStuff,
	DropLocks,
	AddBaggageclaimURLToWorkers,
	AddContainers,
	AddNameToWorkers,
	AddLastScheduledToBuilds,
	AddCheckTypeAndCheckSourceToContainers,
	AddStepLocationToContainers,
	AddVolumesAndCacheInvalidator,
	AddCompositeUniqueConstraintToVolumes,
	AddWorkingDirectoryToContainers,
	MakeContainerWorkingDirectoryNotNull,
	AddEnvVariablesToContainers,
	AddModifiedTimeToVersionedResourcesAndBuildOutputs,
	ReplaceStepLocationWithPlanID,
	AddTeamsColumnToPipelinesAndTeamsTable,
	CascadePipelineDeletes,
	AddTeamIDToPipelineNameUniqueness,
	MakeVolumesExpiresAtNullable,
	AddAuthFieldsToTeams,
	AddAdminToTeams,
	MakeContainersLinkToPipelineIds,
	MakeContainersLinkToResourceIds,
	MakeContainersBuildIdsNullable,
	MakeContainersLinkToWorkerIds,
	RemoveVolumesWithExpiredWorkers,
	AddWorkerIDToVolumes,
	RemoveWorkerIds,
	AddAttemptsToContainers,
	AddStageToContainers,
	AddImageResourceVersions,
	MakeContainerIdentifiersUnique,
	CleanUpMassiveUniqueConstraint,
	AddPipelineBuildEventsTables,
	AddBuildPreparation,
	DropCompletedFromBuildPreparation,
	AddInputsSatisfiedToBuildPreparation,
	AddOrderToVersionedResources,
	AddImageResourceTypeAndSourceToContainers,
	AddUserToContainer,
	ResetPendingBuilds,
	ResetCheckOrder,
	AddTTLToContainers,
}

Functions

func AddAdminToTeams

func AddAdminToTeams(tx migration.LimitedTx) error

func AddAttemptsToContainers

func AddAttemptsToContainers(tx migration.LimitedTx) error

func AddAuthFieldsToTeams

func AddAuthFieldsToTeams(tx migration.LimitedTx) error

func AddBaggageclaimURLToWorkers

func AddBaggageclaimURLToWorkers(tx migration.LimitedTx) error

func AddBuildEvents

func AddBuildEvents(tx migration.LimitedTx) error

func AddBuildPreparation

func AddBuildPreparation(tx migration.LimitedTx) error

func AddCheckErrorToResources

func AddCheckErrorToResources(tx migration.LimitedTx) error

func AddCheckTypeAndCheckSourceToContainers

func AddCheckTypeAndCheckSourceToContainers(tx migration.LimitedTx) error

func AddCheckingToResources

func AddCheckingToResources(tx migration.LimitedTx) error

func AddCompletedToBuilds

func AddCompletedToBuilds(tx migration.LimitedTx) error

func AddCompositeUniqueConstraintToVolumes

func AddCompositeUniqueConstraintToVolumes(tx migration.LimitedTx) error

func AddConfig

func AddConfig(tx migration.LimitedTx) error

func AddContainers

func AddContainers(tx migration.LimitedTx) error

func AddEnabledToBuilds

func AddEnabledToBuilds(tx migration.LimitedTx) error

func AddEngineAndEngineMetadataToBuilds

func AddEngineAndEngineMetadataToBuilds(tx migration.LimitedTx) error

func AddEnvVariablesToContainers

func AddEnvVariablesToContainers(tx migration.LimitedTx) error

func AddExplicitToBuildOutputs

func AddExplicitToBuildOutputs(tx migration.LimitedTx) error

func AddHijackURLToBuilds

func AddHijackURLToBuilds(tx migration.LimitedTx) error

func AddIdToConfig

func AddIdToConfig(tx migration.LimitedTx) error

func AddImageResourceTypeAndSourceToContainers

func AddImageResourceTypeAndSourceToContainers(tx migration.LimitedTx) error

func AddImageResourceVersions

func AddImageResourceVersions(tx migration.LimitedTx) error

func AddIndexesToABunchOfStuff

func AddIndexesToABunchOfStuff(tx migration.LimitedTx) error

func AddInputsDeterminedToBuilds

func AddInputsDeterminedToBuilds(tx migration.LimitedTx) error

func AddInputsSatisfiedToBuildPreparation

func AddInputsSatisfiedToBuildPreparation(tx migration.LimitedTx) error

func AddLastCheckedToResources

func AddLastCheckedToResources(tx migration.LimitedTx) error

func AddLastScheduledToBuilds

func AddLastScheduledToBuilds(tx migration.LimitedTx) error

func AddLastScheduledToPipelines

func AddLastScheduledToPipelines(tx migration.LimitedTx) error

func AddLastTrackedToBuilds

func AddLastTrackedToBuilds(tx migration.LimitedTx) error

func AddLocks

func AddLocks(tx migration.LimitedTx) error

func AddModifiedTimeToVersionedResourcesAndBuildOutputs

func AddModifiedTimeToVersionedResourcesAndBuildOutputs(tx migration.LimitedTx) error

func AddNameToBuildInputs

func AddNameToBuildInputs(tx migration.LimitedTx) error

func AddNameToPipelines

func AddNameToPipelines(tx migration.LimitedTx) error

func AddNameToWorkers

func AddNameToWorkers(tx migration.LimitedTx) error

func AddOneOffNameSequence

func AddOneOffNameSequence(tx migration.LimitedTx) error

func AddOrderToVersionedResources

func AddOrderToVersionedResources(tx migration.LimitedTx) error

func AddOrderingToPipelines

func AddOrderingToPipelines(tx migration.LimitedTx) error

func AddPausedToJobs

func AddPausedToJobs(tx migration.LimitedTx) error

func AddPausedToPipelines

func AddPausedToPipelines(tx migration.LimitedTx) error

func AddPausedToResources

func AddPausedToResources(tx migration.LimitedTx) error

func AddPipelineBuildEventsTables

func AddPipelineBuildEventsTables(tx migration.LimitedTx) error

func AddPipelineIDToJobs

func AddPipelineIDToJobs(tx migration.LimitedTx) error

func AddPipelineIDToResources

func AddPipelineIDToResources(tx migration.LimitedTx) error

func AddPlatformAndTagsToWorkers

func AddPlatformAndTagsToWorkers(tx migration.LimitedTx) error

func AddResourceTypesToWorkers

func AddResourceTypesToWorkers(tx migration.LimitedTx) error

func AddStageToContainers

func AddStageToContainers(tx migration.LimitedTx) error

func AddStepLocationToContainers

func AddStepLocationToContainers(tx migration.LimitedTx) error

func AddTTLToContainers

func AddTTLToContainers(tx migration.LimitedTx) error

func AddTeamIDToPipelineNameUniqueness

func AddTeamIDToPipelineNameUniqueness(tx migration.LimitedTx) error

func AddTeamsColumnToPipelinesAndTeamsTable

func AddTeamsColumnToPipelinesAndTeamsTable(tx migration.LimitedTx) error

func AddTimestampsToBuilds

func AddTimestampsToBuilds(tx migration.LimitedTx) error

func AddTypeToVersionedResources

func AddTypeToVersionedResources(tx migration.LimitedTx) error

func AddUniqueConstraintToResources

func AddUniqueConstraintToResources(tx migration.LimitedTx) error

func AddUserToContainer

func AddUserToContainer(tx migration.LimitedTx) error

func AddVersionToBuildEvents

func AddVersionToBuildEvents(tx migration.LimitedTx) error

func AddVolumesAndCacheInvalidator

func AddVolumesAndCacheInvalidator(tx migration.LimitedTx) error

func AddWorkerIDToVolumes

func AddWorkerIDToVolumes(tx migration.LimitedTx) error

func AddWorkers

func AddWorkers(tx migration.LimitedTx) error

func AddWorkingDirectoryToContainers

func AddWorkingDirectoryToContainers(tx migration.LimitedTx) error

func CascadePipelineDeletes

func CascadePipelineDeletes(tx migration.LimitedTx) error

func CleanUpMassiveUniqueConstraint

func CleanUpMassiveUniqueConstraint(tx migration.LimitedTx) error

func ConvertJobBuildConfigToJobPlans

func ConvertJobBuildConfigToJobPlans(tx migration.LimitedTx) error

func CreateEventIDSequencesForInFlightBuilds

func CreateEventIDSequencesForInFlightBuilds(tx migration.LimitedTx) error

func CreateJobsSerialGroups

func CreateJobsSerialGroups(tx migration.LimitedTx) error

func CreateLocks

func CreateLocks(tx migration.LimitedTx) error

func CreatePipes

func CreatePipes(tx migration.LimitedTx) error

func DropCompletedFromBuildPreparation

func DropCompletedFromBuildPreparation(tx migration.LimitedTx) error

func DropLocks

func DropLocks(tx migration.LimitedTx) error

func DropOldLocks

func DropOldLocks(tx migration.LimitedTx) error

func InitialSchema

func InitialSchema(tx migration.LimitedTx) error

func LockDBAndMigrate

func LockDBAndMigrate(logger lager.Logger, sqlDriver string, sqlDataSource string) (db.Conn, error)

func MakeContainerIdentifiersUnique

func MakeContainerIdentifiersUnique(tx migration.LimitedTx) error

func MakeContainerWorkingDirectoryNotNull

func MakeContainerWorkingDirectoryNotNull(tx migration.LimitedTx) error

func MakeContainersBuildIdsNullable

func MakeContainersBuildIdsNullable(tx migration.LimitedTx) error

func MakeContainersLinkToPipelineIds

func MakeContainersLinkToPipelineIds(tx migration.LimitedTx) error

func MakeContainersLinkToResourceIds

func MakeContainersLinkToResourceIds(tx migration.LimitedTx) error

func MakeContainersLinkToWorkerIds

func MakeContainersLinkToWorkerIds(tx migration.LimitedTx) error

func MakeVolumesExpiresAtNullable

func MakeVolumesExpiresAtNullable(tx migration.LimitedTx) error

func MoveSourceAndMetadataToVersionedResources

func MoveSourceAndMetadataToVersionedResources(tx migration.LimitedTx) error

func NonNullableVersionInfo

func NonNullableVersionInfo(tx migration.LimitedTx) error

func RemoveSourceFromVersionedResources

func RemoveSourceFromVersionedResources(tx migration.LimitedTx) error

func RemoveTransitionalCurrentVersions

func RemoveTransitionalCurrentVersions(tx migration.LimitedTx) error

func RemoveVolumesWithExpiredWorkers

func RemoveVolumesWithExpiredWorkers(tx migration.LimitedTx) error

func RemoveWorkerIds

func RemoveWorkerIds(tx migration.LimitedTx) error

func RenameConfigToPipelines

func RenameConfigToPipelines(tx migration.LimitedTx) error

func RenamePipelineIDToVersionAddPrimaryKey

func RenamePipelineIDToVersionAddPrimaryKey(tx migration.LimitedTx) error

func ReplaceBuildEventsIDWithEventID

func ReplaceBuildEventsIDWithEventID(tx migration.LimitedTx) error

func ReplaceBuildsAbortHijackURLsWithGuidAndEndpoint

func ReplaceBuildsAbortHijackURLsWithGuidAndEndpoint(tx migration.LimitedTx) error

func ReplaceStepLocationWithPlanID

func ReplaceStepLocationWithPlanID(tx migration.LimitedTx) error

func ResetCheckOrder

func ResetCheckOrder(tx migration.LimitedTx) error

func ResetPendingBuilds

func ResetPendingBuilds(tx migration.LimitedTx) error

func Translogrifier

func Translogrifier(logger lager.Logger, migrations []migration.Migrator) []migration.Migrator

func WithLogger

func WithLogger(logger lager.Logger, mig migration.Migrator) migration.Migrator

Types

type Condition

type Condition string
const (
	ConditionSuccess Condition = "success"
	ConditionFailure Condition = "failure"
)

type Conditions

type Conditions []Condition

type Config

type Config struct {
	Groups    GroupConfigs    `json:"groups,omitempty"`
	Resources ResourceConfigs `json:"resources,omitempty"`
	Jobs      JobConfigs      `json:"jobs,omitempty"`
}

type Duration

type Duration time.Duration

type GroupConfig

type GroupConfig struct {
	Name      string   `json:"name"`
	Jobs      []string `json:"jobs,omitempty"`
	Resources []string `json:"resources,omitempty"`
}

type GroupConfigs

type GroupConfigs []GroupConfig

type JobConfig

type JobConfig struct {
	Name   string `json:"name"`
	Public bool   `json:"public,omitempty"`
	Serial bool   `json:"serial,omitempty"`

	Privileged     bool        `json:"privileged,omitempty"`
	TaskConfigPath string      `json:"build,omitempty"`
	TaskConfig     *TaskConfig `json:"config,omitempty"`

	InputConfigs  []JobInputConfig  `json:"inputs,omitempty"`
	OutputConfigs []JobOutputConfig `json:"outputs,omitempty"`

	Plan PlanSequence `json:"plan,omitempty"`
}

type JobConfigs

type JobConfigs []JobConfig

type JobInputConfig

type JobInputConfig struct {
	RawName    string   `json:"name,omitempty"`
	Resource   string   `json:"resource"`
	Params     Params   `json:"params,omitempty"`
	Passed     []string `json:"passed,omitempty"`
	RawTrigger *bool    `json:"trigger"`
}

type JobOutputConfig

type JobOutputConfig struct {
	Resource string `json:"resource"`
	Params   Params `json:"params,omitempty"`

	RawPerformOn []Condition `json:"perform_on,omitempty"`
}

type LimitedTx

type LimitedTx interface {
	Exec(query string, args ...interface{}) (sql.Result, error)
	Prepare(query string) (*sql.Stmt, error)
	Query(query string, args ...interface{}) (*sql.Rows, error)
	QueryRow(query string, args ...interface{}) *sql.Row
	Stmt(stmt *sql.Stmt) *sql.Stmt
}

type Params

type Params map[string]interface{}

type PlanConfig

type PlanConfig struct {
	Conditions *Conditions `json:"conditions,omitempty"`

	RawName string `json:"name,omitempty"`

	Do *PlanSequence `json:"do,omitempty"`

	Aggregate *PlanSequence `json:"aggregate,omitempty"`

	Get        string   `json:"get,omitempty"`
	Passed     []string `json:"passed,omitempty"`
	RawTrigger *bool    `json:"trigger,omitempty"`

	Put string `json:"put,omitempty"`

	Resource string `json:"resource,omitempty"`

	Task           string      `json:"task,omitempty"`
	Privileged     bool        `json:"privileged,omitempty"`
	TaskConfigPath string      `json:"file,omitempty"`
	TaskConfig     *TaskConfig `json:"config,omitempty"`

	Params Params `json:"params,omitempty"`
}

type PlanSequence

type PlanSequence []PlanConfig

type ResourceConfig

type ResourceConfig struct {
	Name string `json:"name"`

	Type   string `json:"type"`
	Source Source `json:"source"`
}

type ResourceConfigs

type ResourceConfigs []ResourceConfig

type Source

type Source map[string]interface{}

type TaskConfig

type TaskConfig struct {
	Platform string `json:"platform,omitempty"`

	Tags []string `json:"tags,omitempty"`

	Image string `json:"image,omitempty"`

	Params map[string]string `json:"params,omitempty"`

	Run *TaskRunConfig `json:"run,omitempty"`

	Inputs []TaskInputConfig `json:"inputs,omitempty"`
}

type TaskInputConfig

type TaskInputConfig struct {
	Name string `json:"name"`
	Path string `json:"path,omitempty"`
}

type TaskRunConfig

type TaskRunConfig struct {
	Path string   `json:"path,omitempty"`
	Args []string `json:"args,omitempty"`
}

type Version

type Version map[string]interface{}

Source Files

Directories

Path Synopsis
This file was generated by counterfeiter
This file was generated by counterfeiter

Jump to

Keyboard shortcuts

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