-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 555e253
Showing
11 changed files
with
105 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
bin/ | ||
vendor/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
NAME := walter | ||
VERSION := $(shell git describe --tags --abbrev=0) | ||
REVISION := $(shell git rev-parse --short HEAD) | ||
LDFLAGS := -X 'main.version=$(VERSION)' -X 'main.revision=$(REVISION)' | ||
|
||
setup: | ||
go get github.com/Masterminds/glide | ||
go get github.com/golang/lint/golint | ||
go get golang.org/x/tools/cmd/goimports | ||
|
||
deps: setup | ||
glide install | ||
|
||
test: deps | ||
go test $$(glide novendor) | ||
|
||
lint: setup | ||
go vet $$(glide novendor) | ||
for pkg in $$(glide novendor -x); do \ | ||
golint -set_exit_status $$pkg || exit $$?; \ | ||
done | ||
|
||
fmt: setup | ||
goimports -w $$(glide nv -x) | ||
|
||
build: test | ||
go build -ldflags "$(LDFLAGS)" -o bin/$(NAME) | ||
|
||
clean: | ||
rm bin/$(NAME) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Walter v2 | ||
|
||
## pipeline.yml | ||
|
||
TBD | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
package: github.com/walter-cd/walter | ||
import: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package pipeline | ||
|
||
import ( | ||
"github.com/go-yaml/yaml" | ||
"github.com/walter-cd/walter-v2/lib/stage" | ||
) | ||
|
||
type Pipeline struct { | ||
Pipeline []stage.Stage | ||
} | ||
|
||
func Load(y string) (Pipeline, error) { | ||
p := Pipeline{} | ||
err := yaml.Unmarshal([]byte(y), &p) | ||
return p, err | ||
} | ||
|
||
/* | ||
func LoadFromFile(file string) (Pipeline error) { | ||
} | ||
*/ | ||
|
||
func (p Pipeline) Run() { | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package pipeline | ||
|
||
import "testing" | ||
|
||
func TestLoad(t *testing.T) { | ||
yaml := ` | ||
pipeline: | ||
- name: command_stage_1 | ||
command: echo "hello, world" | ||
- name: command_stage_2 | ||
command: echo "hello, world, command_stage_2" | ||
- name: command_stage_3 | ||
command: echo "hello, world, command_stage_3" | ||
` | ||
_, err := Load(yaml) | ||
|
||
if err != nil { | ||
t.Fatal(err) | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package stage | ||
|
||
type Stage struct { | ||
Name string | ||
Command string | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
package stage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package main | ||
|
||
func main() { | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
package main |