diff --git a/_blueprints/Dockerfile.blueprint b/.blueprints/Dockerfile.blueprint similarity index 91% rename from _blueprints/Dockerfile.blueprint rename to .blueprints/Dockerfile.blueprint index 214c91de..ef261745 100644 --- a/_blueprints/Dockerfile.blueprint +++ b/.blueprints/Dockerfile.blueprint @@ -38,14 +38,14 @@ COPY . . # Installs project dependencies. RUN go get -d -v ./... -ENTRYPOINT ["_ci/docker-entrypoint.sh"] +ENTRYPOINT [".ci/docker-entrypoint.sh"] {{- else }} -COPY _build/gotenberg /usr/bin/gotenberg +COPY .build/gotenberg /usr/bin/gotenberg RUN ln -s /usr/bin/gotenberg /usr/local/bin/gotenberg WORKDIR /gotenberg -COPY gotenberg.yml /gotenberg/gotenberg.yml +COPY .build/gotenberg.yml /gotenberg/gotenberg.yml EXPOSE 3000 CMD ["gotenberg"] diff --git a/_blueprints/README.blueprint.md b/.blueprints/README.blueprint.md similarity index 100% rename from _blueprints/README.blueprint.md rename to .blueprints/README.blueprint.md diff --git a/_build/gotenberg b/.build/gotenberg similarity index 100% rename from _build/gotenberg rename to .build/gotenberg diff --git a/gotenberg.yml b/.build/gotenberg.yml similarity index 100% rename from gotenberg.yml rename to .build/gotenberg.yml diff --git a/_ci/docker-entrypoint.sh b/.ci/docker-entrypoint.sh similarity index 84% rename from _ci/docker-entrypoint.sh rename to .ci/docker-entrypoint.sh index 869827b4..12a5b00b 100755 --- a/_ci/docker-entrypoint.sh +++ b/.ci/docker-entrypoint.sh @@ -11,18 +11,18 @@ if [[ "$VERSION" == "snapshot" ]]; then go test -race -cover $d; done else - echo "" > ./_ci/coverage.txt; + echo "" > ./.ci/coverage.txt; for d in $(go list ./... | grep -v vendor); do go test -race -coverprofile=profile.out -covermode=atomic $d; if [ -f profile.out ]; then - cat profile.out >> ./_ci/coverage.txt; + cat profile.out >> ./.ci/coverage.txt; rm profile.out; fi done fi # Builds the Linux binary. -env GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -ldflags "-X main.version=${VERSION}" && mv gotenberg _build/; +env GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -ldflags "-X main.version=${VERSION}" && mv gotenberg .build/; # Bye! exit 0; \ No newline at end of file diff --git a/.gitignore b/.gitignore index 2aaba77a..0bc0cc98 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ .DS_Store -_ci/coverage.txt \ No newline at end of file +.ci/coverage.txt \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 4f7ee30f..cfa4f3da 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,11 +24,11 @@ RUN echo "deb http://httpredir.debian.org/debian/ stretch main contrib non-free" # | All Gotenberg related stuff. # | -COPY _build/gotenberg /usr/bin/gotenberg +COPY .build/gotenberg /usr/bin/gotenberg RUN ln -s /usr/bin/gotenberg /usr/local/bin/gotenberg WORKDIR /gotenberg -COPY gotenberg.yml /gotenberg/gotenberg.yml +COPY .build/gotenberg.yml /gotenberg/gotenberg.yml EXPOSE 3000 CMD ["gotenberg"] \ No newline at end of file diff --git a/Dockerfile.ci b/Dockerfile.ci index a74b20b2..38107c73 100644 --- a/Dockerfile.ci +++ b/Dockerfile.ci @@ -36,4 +36,4 @@ COPY . . # Installs project dependencies. RUN go get -d -v ./... -ENTRYPOINT ["_ci/docker-entrypoint.sh"] \ No newline at end of file +ENTRYPOINT [".ci/docker-entrypoint.sh"] \ No newline at end of file diff --git a/orbit.yml b/orbit.yml index 92b2c937..6acf85b1 100644 --- a/orbit.yml +++ b/orbit.yml @@ -8,15 +8,15 @@ tasks: - 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.ci -p "Image,CI" - - orbit generate -f _blueprints/Dockerfile.blueprint -o Dockerfile -p "Image,MAIN" + - 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.ci -p "Image,CI" + - orbit generate -f .blueprints/Dockerfile.blueprint -o Dockerfile -p "Image,MAIN" - use: ci short: Runs CI process inside a container run: - 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" -v "$(pwd)/_build:/go/src/github.com/thecodingmachine/gotenberg/_build" gotenberg:ci + - 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 short: Builds the main Docker image