Skip to content

Commit

Permalink
Fix build.
Browse files Browse the repository at this point in the history
  • Loading branch information
cscatolini committed Mar 6, 2019
1 parent c3a24ec commit 3fe8554
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 4 deletions.
4 changes: 1 addition & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,4 @@ cache:

after_success:
- $HOME/gopath/bin/goveralls -coverprofile _build/test-coverage-all.out -service=travis-ci
- make cross-linux
- ./scripts/push_to_docker.sh
- curl -H POST $TEST_FARM_URL
- make cross-linux && ./scripts/push_to_docker.sh && curl -H POST $TEST_FARM_URL
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ MAINTAINER TFG Co <backend@tfgco.com>

EXPOSE 80

RUN apk add bash
ADD bin/podium-linux-x86_64 /go/bin/podium
RUN chmod +x /go/bin/podium

Expand Down
2 changes: 1 addition & 1 deletion api/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
package api

// VERSION identifies podium's current version
var VERSION = "v7.4.6"
var VERSION = "7.4.6"
21 changes: 21 additions & 0 deletions scripts/push_to_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,40 @@ VERSION=$(cat ./api/version.go | grep "var VERSION" | awk ' { print $4 } ' | sed
cp ./config/default.yaml ./dev

docker build -t podium .
if [ $? -ne 0 ]; then
exit 1
fi
docker build -t podium-dev -f ./DevDockerfile .
if [ $? -ne 0 ]; then
exit 1
fi

docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"
if [ $? -ne 0 ]; then
exit 1
fi

docker tag podium:latest tfgco/podium:$VERSION.$TRAVIS_BUILD_NUMBER
docker push tfgco/podium:$VERSION.$TRAVIS_BUILD_NUMBER
if [ $? -ne 0 ]; then
exit 1
fi
docker tag podium:latest tfgco/podium:latest
docker push tfgco/podium
if [ $? -ne 0 ]; then
exit 1
fi

docker tag podium-dev:latest tfgco/podium-dev:$VERSION.$TRAVIS_BUILD_NUMBER
docker push tfgco/podium-dev:$VERSION.$TRAVIS_BUILD_NUMBER
if [ $? -ne 0 ]; then
exit 1
fi
docker tag podium-dev:latest tfgco/podium-dev:latest
docker push tfgco/podium-dev
if [ $? -ne 0 ]; then
exit 1
fi

DOCKERHUB_LATEST=$(python ./scripts/get_latest_tag.py)

Expand Down

0 comments on commit 3fe8554

Please sign in to comment.