Skip to content

Commit

Permalink
circleci integration (hasura#74)
Browse files Browse the repository at this point in the history
  • Loading branch information
shahidhk authored and ecthiender committed Jul 10, 2018
1 parent b0e3cbd commit 50165fc
Show file tree
Hide file tree
Showing 12 changed files with 411 additions and 177 deletions.
22 changes: 22 additions & 0 deletions .circleci/build-docker-image.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/usr/bin/env bash

set -e

DF_VERSION=$1

for FILE in *.dockerfile; do
f=$(basename -- "$FILE")
f="${f%.*}"
TAG=hasura/graphql-engine-$f:$DF_VERSION
echo
echo "=============================================================="
echo "Building and pushing $TAG"
echo "=============================================================="
echo
echo "=======>>>> docker build -t $TAG -f $FILE ."
echo
docker build -t $TAG -f $FILE .
echo "=======>>>> docker push $TAG"
echo
docker push $TAG
done
24 changes: 13 additions & 11 deletions .circleci/cli-builder.dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
FROM golang:1.10

ARG upx_version="3.94"

# install go dependencies
RUN go get github.com/golang/dep/cmd/dep
RUN go get github.com/mitchellh/gox
RUN go get github.com/hasura/go-bindata/go-bindata
RUN go get github.com/tcnksm/ghr
RUN go get github.com/golang/dep/cmd/dep \
&& go get github.com/mitchellh/gox \
&& go get github.com/hasura/go-bindata/go-bindata \
&& go get github.com/tcnksm/ghr

# install UPX
# install UPX and netcat
RUN apt-get update && apt-get install -y \
xz-utils \
xz-utils netcat libpq5 \
&& curl -Lo /tmp/upx-${upx_version}.tar.xz https://github.com/upx/upx/releases/download/v${upx_version}/upx-${upx_version}-amd64_linux.tar.xz \
&& xz -d -c /tmp/upx-${upx_version}.tar.xz \
| tar -xOf - upx-${upx_version}-amd64_linux/upx > /bin/upx \
&& chmod a+x /bin/upx \
&& apt-get -y auto-remove \
&& rm -rf /var/lib/apt/lists/*
ADD https://github.com/upx/upx/releases/download/v3.94/upx-3.94-amd64_linux.tar.xz /usr/local
RUN xz -d -c /usr/local/upx-3.94-amd64_linux.tar.xz | \
tar -xOf - upx-3.94-amd64_linux/upx > /bin/upx && \
chmod a+x /bin/upx
&& rm -rf /var/lib/apt/lists/*
Loading

0 comments on commit 50165fc

Please sign in to comment.