stages

package
v0.1.0-pre Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2014 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

walter: a deployment pipeline template * Copyright (C) 2014 Recruit Technologies Co., Ltd. and contributors * (see CONTRIBUTORS.md) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.

walter: a deployment pipeline template * Copyright (C) 2014 Recruit Technologies Co., Ltd. and contributors * (see CONTRIBUTORS.md) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.

walter: a deployment pipeline template * Copyright (C) 2014 Recruit Technologies Co., Ltd. and contributors * (see CONTRIBUTORS.md) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.

walter: a deployment pipeline template * Copyright (C) 2014 Recruit Technologies Co., Ltd. and contributors * (see CONTRIBUTORS.md) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.

walter: a deployment pipeline template * Copyright (C) 2014 Recruit Technologies Co., Ltd. and contributors * (see CONTRIBUTORS.md) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrepareCh

func PrepareCh(stage Stage)

Types

type BaseStage

type BaseStage struct {
	Runner
	InputCh     *chan Mediator
	OutputCh    *chan Mediator
	ChildStages list.List
	StageName   string `config:"stage_name"`
}

func (*BaseStage) AddChildStage

func (b *BaseStage) AddChildStage(stage Stage)

func (*BaseStage) GetChildStages

func (b *BaseStage) GetChildStages() list.List

func (*BaseStage) GetInputCh

func (b *BaseStage) GetInputCh() *chan Mediator

func (*BaseStage) GetOutputCh

func (b *BaseStage) GetOutputCh() *chan Mediator

func (*BaseStage) GetStageName

func (b *BaseStage) GetStageName() string

func (*BaseStage) Run

func (b *BaseStage) Run() bool

func (*BaseStage) SetInputCh

func (b *BaseStage) SetInputCh(inputCh *chan Mediator)

func (*BaseStage) SetOutputCh

func (b *BaseStage) SetOutputCh(outputCh *chan Mediator)

func (*BaseStage) SetStageName

func (b *BaseStage) SetStageName(stageName string)

type CommandStage

type CommandStage struct {
	BaseStage
	Command   string `config:"command"`
	Directory string `config:"directory"`
	OutResult string
	ErrResult string
}

func NewCommandStage

func NewCommandStage() *CommandStage

func (*CommandStage) AddCommand

func (self *CommandStage) AddCommand(command string)

func (*CommandStage) GetStdoutResult

func (self *CommandStage) GetStdoutResult() string

func (*CommandStage) Run

func (self *CommandStage) Run() bool

func (*CommandStage) SetDirectory

func (self *CommandStage) SetDirectory(directory string)

type Mediator

type Mediator struct {
	States map[string]string
	Type   string
}

type ResourceValidator

type ResourceValidator struct {
	// contains filtered or unexported fields
}

ResourceValidator class check if the resources to run the target staget are satisfied.

func NewResourceValidator

func NewResourceValidator() *ResourceValidator

func (*ResourceValidator) AddCommandName

func (self *ResourceValidator) AddCommandName(c string)

func (*ResourceValidator) AddFile

func (self *ResourceValidator) AddFile(f string)

TODO add permission

func (*ResourceValidator) Validate

func (self *ResourceValidator) Validate() bool

type Runner

type Runner interface {
	Run() bool
}

type ShellScriptStage

type ShellScriptStage struct {
	ResourceValidator
	CommandStage
	File string `config:"file"`
}

func NewShellScriptStage

func NewShellScriptStage() *ShellScriptStage

func (*ShellScriptStage) Run

func (self *ShellScriptStage) Run() bool

type Stage

type Stage interface {
	AddChildStage(Stage)
	GetChildStages() list.List
	GetStageName() string
	SetStageName(string)
	GetInputCh() *chan Mediator
	SetInputCh(*chan Mediator)
	GetOutputCh() *chan Mediator
	SetOutputCh(*chan Mediator)
}

func InitStage

func InitStage(stageType string) Stage

Jump to

Keyboard shortcuts

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