Fix docker_image ci job (#4004)
- 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
This commit is contained in:
parent
92f653b35c
commit
273c5253fd
|
@ -367,14 +367,19 @@ jobs:
|
||||||
- setup_remote_docker:
|
- setup_remote_docker:
|
||||||
docker_layer_caching: true
|
docker_layer_caching: true
|
||||||
- run: |
|
- run: |
|
||||||
if [ "${CIRCLE_BRANCH}" == "master" ]; then
|
GAIAD_VERSION=''
|
||||||
|
if [ "${CIRCLE_BRANCH}" = "master" ]; then
|
||||||
GAIAD_VERSION="stable"
|
GAIAD_VERSION="stable"
|
||||||
elif [ "${CIRCLE_BRANCH}" == "develop" ]; then
|
elif [ "${CIRCLE_BRANCH}" = "develop" ]; then
|
||||||
GAIAD_VERSION="develop"
|
GAIAD_VERSION="develop"
|
||||||
fi
|
fi
|
||||||
docker build -t tendermint/gaia:$GAIAD_VERSION .
|
if [ -z "${GAIAD_VERSION}" ]; then
|
||||||
docker login -u $DOCKER_USER -p $DOCKER_PASS
|
docker build .
|
||||||
docker push tendermint/gaia:$GAIAD_VERSION
|
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:
|
docker_tagged:
|
||||||
<<: *linux_defaults
|
<<: *linux_defaults
|
||||||
|
@ -394,11 +399,6 @@ workflows:
|
||||||
test-suite:
|
test-suite:
|
||||||
jobs:
|
jobs:
|
||||||
- docker_image:
|
- docker_image:
|
||||||
filters:
|
|
||||||
branches:
|
|
||||||
only:
|
|
||||||
- master
|
|
||||||
- develop
|
|
||||||
requires:
|
requires:
|
||||||
- setup_dependencies
|
- setup_dependencies
|
||||||
- docker_tagged:
|
- docker_tagged:
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
#3977 Fix docker image build
|
|
@ -5,7 +5,7 @@
|
||||||
FROM golang:alpine AS build-env
|
FROM golang:alpine AS build-env
|
||||||
|
|
||||||
# Set up dependencies
|
# 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
|
# Set working directory for the build
|
||||||
WORKDIR /go/src/github.com/cosmos/cosmos-sdk
|
WORKDIR /go/src/github.com/cosmos/cosmos-sdk
|
||||||
|
|
Loading…
Reference in New Issue