mirror of
https://github.com/gotenberg/gotenberg.git
synced 2026-08-08 00:22:14 +01:00
renaming Orbit tests task to ci: it now runs all linter + tests + build the gotenberg binary
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -1,3 +1,2 @@
|
|||||||
.DS_Store
|
.DS_Store
|
||||||
_ci/coverage.txt
|
_ci/coverage.txt
|
||||||
gotenberg
|
|
||||||
@@ -24,7 +24,7 @@ RUN echo "deb http://httpredir.debian.org/debian/ stretch main contrib non-free"
|
|||||||
# | All Gotenberg related stuff.
|
# | All Gotenberg related stuff.
|
||||||
# |
|
# |
|
||||||
|
|
||||||
COPY gotenberg /usr/bin/gotenberg
|
COPY _build/gotenberg /usr/bin/gotenberg
|
||||||
RUN ln -s /usr/bin/gotenberg /usr/local/bin/gotenberg
|
RUN ln -s /usr/bin/gotenberg /usr/local/bin/gotenberg
|
||||||
|
|
||||||
WORKDIR /gotenberg
|
WORKDIR /gotenberg
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
FROM {{ if eq "TESTS" .Orbit.Image }}golang:1.10-stretch{{ else }}debian:stretch-slim{{ end }}
|
FROM {{ if eq "CI" .Orbit.Image }}golang:1.10-stretch{{ else }}debian:stretch-slim{{ end }}
|
||||||
|
|
||||||
LABEL authors="Julien Neuhart <j.neuhart@thecodingmachine.com>"
|
LABEL authors="Julien Neuhart <j.neuhart@thecodingmachine.com>"
|
||||||
|
|
||||||
@@ -24,7 +24,7 @@ RUN echo "deb http://httpredir.debian.org/debian/ stretch main contrib non-free"
|
|||||||
# | All Gotenberg related stuff.
|
# | All Gotenberg related stuff.
|
||||||
# |
|
# |
|
||||||
|
|
||||||
{{- if eq "TESTS" .Orbit.Image }}
|
{{- if eq "CI" .Orbit.Image }}
|
||||||
|
|
||||||
WORKDIR /go/src/github.com/thecodingmachine/gotenberg
|
WORKDIR /go/src/github.com/thecodingmachine/gotenberg
|
||||||
|
|
||||||
@@ -41,7 +41,7 @@ RUN go get -d -v ./...
|
|||||||
ENTRYPOINT ["_ci/docker-entrypoint.sh"]
|
ENTRYPOINT ["_ci/docker-entrypoint.sh"]
|
||||||
{{- else }}
|
{{- else }}
|
||||||
|
|
||||||
COPY gotenberg /usr/bin/gotenberg
|
COPY _build/gotenberg /usr/bin/gotenberg
|
||||||
RUN ln -s /usr/bin/gotenberg /usr/local/bin/gotenberg
|
RUN ln -s /usr/bin/gotenberg /usr/local/bin/gotenberg
|
||||||
|
|
||||||
WORKDIR /gotenberg
|
WORKDIR /gotenberg
|
||||||
|
|||||||
BIN
_build/gotenberg
Executable file
BIN
_build/gotenberg
Executable file
Binary file not shown.
@@ -21,5 +21,8 @@ else
|
|||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Builds the Linux binary.
|
||||||
|
env GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -ldflags "-X main.version=${VERSION}" && mv gotenberg _build/;
|
||||||
|
|
||||||
# Bye!
|
# Bye!
|
||||||
exit 0;
|
exit 0;
|
||||||
15
orbit.yml
15
orbit.yml
@@ -9,19 +9,18 @@ tasks:
|
|||||||
short: Generates all files from blueprints
|
short: Generates all files from blueprints
|
||||||
run:
|
run:
|
||||||
- BRANCH="$(git symbolic-ref --short HEAD)"; orbit generate -f _blueprints/README.blueprint.md -o README.md -p "Branch,${BRANCH}"
|
- 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.ci -p "Image,CI"
|
||||||
- orbit generate -f _blueprints/Dockerfile.blueprint -o Dockerfile -p "Image,BUILD"
|
- orbit generate -f _blueprints/Dockerfile.blueprint -o Dockerfile -p "Image,MAIN"
|
||||||
|
|
||||||
- use: tests
|
- use: ci
|
||||||
short: Runs tests inside a container
|
short: Runs CI process inside a container
|
||||||
run:
|
run:
|
||||||
- docker build -t gotenberg:tests -f Dockerfile.tests .
|
- docker build -t gotenberg:ci -f Dockerfile.ci .
|
||||||
- docker run --rm -e "VERSION={{ .Orbit.Version }}" -v "$(pwd)/_ci:/go/src/github.com/thecodingmachine/gotenberg/_ci" gotenberg:tests
|
- docker run --rm -e "VERSION={{ .Orbit.Version }}" -v "$(pwd)/_ci:/go/src/github.com/thecodingmachine/gotenberg/_ci" -v "$(pwd)/_build:/go/src/github.com/thecodingmachine/gotenberg/_build" gotenberg:ci
|
||||||
|
|
||||||
- use: build
|
- use: build
|
||||||
short: Builds a Linux binary and the Docker image
|
short: Builds the main Docker image
|
||||||
run:
|
run:
|
||||||
- env GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -ldflags "-X main.version={{ .Orbit.Version }}"
|
|
||||||
- docker build . -t gotenberg:{{ .Orbit.Version }}
|
- docker build . -t gotenberg:{{ .Orbit.Version }}
|
||||||
|
|
||||||
- use: up
|
- use: up
|
||||||
|
|||||||
Reference in New Issue
Block a user