Files
gotenberg/orbit.yml
2018-04-06 15:13:28 +02:00

30 lines
1.1 KiB
YAML

tasks:
- use: fmt
short: Runs go fmt ./...
run:
- go fmt ./...
- use: generate
short: Generates all files from blueprints
run:
- BRANCH="$(git symbolic-ref --short HEAD)"; orbit generate -f _blueprints/README.blueprint.md -o README.md -p "Branch,${BRANCH}"
- orbit generate -f _blueprints/Dockerfile.blueprint -o Dockerfile.tests -p "Image,TESTS"
- orbit generate -f _blueprints/Dockerfile.blueprint -o Dockerfile -p "Image,BUILD"
- use: tests
short: Runs tests inside a container
run:
- docker build -t gotenberg:tests -f Dockerfile.tests .
- docker run --rm -e "VERSION={{ .Orbit.Version }}" -v "$(pwd)/_ci:/go/src/github.com/thecodingmachine/gotenberg/_ci" gotenberg:tests
- use: build
short: Builds a Linux binary and the Docker image
run:
- env GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -ldflags "-X main.version={{ .Orbit.Version }}"
- docker build . -t gotenberg:{{ .Orbit.Version }}
- use: up
short: Starts the {{ .Orbit.Version }} version of the Gotenberg image
run:
- docker run --rm -p 3000:3000/tcp gotenberg:{{ .Orbit.Version }}