Skip to content

Commit

Permalink
Fix docker_image ci job (#4004)
Browse files Browse the repository at this point in the history
- Always build regardless of the branch;
  push only from develop and master.
- Add curl to packages dependencies in Dockerfile
  to allow golangci-lint to be downloaded.

Closes: #3977
  • Loading branch information
alessio committed Mar 29, 2019
1 parent 92f653b commit 273c525
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
20 changes: 10 additions & 10 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -367,14 +367,19 @@ jobs:
- setup_remote_docker:
docker_layer_caching: true
- run: |
if [ "${CIRCLE_BRANCH}" == "master" ]; then
GAIAD_VERSION=''
if [ "${CIRCLE_BRANCH}" = "master" ]; then
GAIAD_VERSION="stable"
elif [ "${CIRCLE_BRANCH}" == "develop" ]; then
elif [ "${CIRCLE_BRANCH}" = "develop" ]; then
GAIAD_VERSION="develop"
fi
docker build -t tendermint/gaia:$GAIAD_VERSION .
docker login -u $DOCKER_USER -p $DOCKER_PASS
docker push tendermint/gaia:$GAIAD_VERSION
if [ -z "${GAIAD_VERSION}" ]; then
docker build .
else
docker build -t tendermint/gaia:$GAIAD_VERSION .
docker login -u $DOCKER_USER -p $DOCKER_PASS
docker push tendermint/gaia:$GAIAD_VERSION
fi
docker_tagged:
<<: *linux_defaults
Expand All @@ -394,11 +399,6 @@ workflows:
test-suite:
jobs:
- docker_image:
filters:
branches:
only:
- master
- develop
requires:
- setup_dependencies
- docker_tagged:
Expand Down
1 change: 1 addition & 0 deletions .pending/bugfixes/sdk/3977-Fix-docker-imag
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#3977 Fix docker image build
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
FROM golang:alpine AS build-env

# Set up dependencies
ENV PACKAGES make git libc-dev bash gcc linux-headers eudev-dev
ENV PACKAGES curl make git libc-dev bash gcc linux-headers eudev-dev

# Set working directory for the build
WORKDIR /go/src/github.com/cosmos/cosmos-sdk
Expand Down

0 comments on commit 273c525

Please sign in to comment.