Skip to content

JasonGiedymin/test-flight

Repository files navigation

Ansible Shipyard Test-Flight

Test + Build your Ansible Playbooks with Docker.

Index

Usage

Commands

Some commands have aliases to make the app easier to use.

  • flight launch|up - starts a container and runs tests, if no image exists then one will be built prior to launching.
  • flight build - builds an image ready to be launched.
  • flight ground|down|halt - stops the container running the tests.
  • flight destroy - destroys all images and containers.

Development

Production Build

Once built, test-flight can be used like so:

# To run test-flight in the current directory
flight launch

# Or
flight launch .

# To run test-flight in the another directory named 'test'
flight launch -d ./test

Development Build

During development these commands can be used:

# Run Check
clear && go run flight.go check

# Or In another directory
clear && go run flight.go check -d ./test

# Run Launch
clear && go run flight.go launch

# Or In another directory
clear && go run flight.go launch -d ./test

Building

Note that the binary which is created is a complete executable which includes not only the application but a built in GC, scheduler, etc... This is why the file size is large. Once running, the go app will NOT take up much memory.

One can build the application like so

go build

For production only build, without debug

go build -ldflags "-s"

Further optimizations can be done using UPX, for go one needs goupx. This can be obtained by obtaining it like so:

go get github.com/pwaller/goupx/

Testing

Run the following:

go test ./...

Notes

  • deps managed by godev. Installed via go get github.com/tools/godep
  • uses:
  • go get:
    • go get github.com/golang/lint/golint
    • go get github.com/fsouza/go-dockerclient
    • go get github.com/SpaceMonkeyGo/errors
    • go get github.com/jessevdk/go-flags
    • go get github.com/kdar/factorlog
    • go get bitbucket.org/kardianos/osext
  • update libs:
    • go get -u all

Building

  • gofmt settings: -w -s -tabs=false -tabwidth=2

About

Test-Flight - The Docker builder, Ansible Playbook Tester

Resources

License

Stars

Watchers

Forks

Packages

No packages published