Push demo artifact to docker hub

This commit is contained in:
Alex Peters
2020-01-22 17:19:49 +01:00
parent 076711ac2b
commit e99bf56cb5

View File

@@ -195,21 +195,19 @@ jobs:
at: /tmp/workspace
- checkout
- setup_remote_docker:
docker_layer_caching: true
- run: |
GAIAD_VERSION=''
if [ "${CIRCLE_BRANCH}" = "master" ]; then
GAIAD_VERSION="stable"
elif [ "${CIRCLE_BRANCH}" = "develop" ]; then
GAIAD_VERSION="develop"
fi
if [ -z "${GAIAD_VERSION}" ]; then
docker build .
else
docker build -t cosmwasm/wasmd:$GAIAD_VERSION .
docker login --password-stdin -u $DOCKER_USER \<<<$DOCKER_PASS
docker push cosmwasm/wasmd:$GAIAD_VERSION
fi
docker_layer_caching: yes
- run:
name: Build Docker artifact - demo
command: docker build --pull -t "cosmwasm/wasmd-demo:${CIRCLE_SHA1}" .
- run:
name: Push application Docker image to docker hub
command: |
if [ "${CIRCLE_BRANCH}" = "master" ]; then
docker tag "cosmwasm/wasmd-demo:${CIRCLE_SHA1}" cosmwasm/wasmd-demo:latest
docker login --password-stdin -u "$DOCKER_USER" \<<<"$DOCKER_PASS"
docker push cosmwasm/wasmd-demo:latest
docker logout
fi
docker-tagged:
executor: golang
@@ -218,11 +216,16 @@ jobs:
at: /tmp/workspace
- checkout
- setup_remote_docker:
docker_layer_caching: true
- run: |
docker build -t tendermint/gaia:$CIRCLE_TAG .
docker login --password-stdin -u $DOCKER_USER \<<$DOCKER_PASS
docker push tendermint/gaia:$CIRCLE_TAG
docker_layer_caching: yes
- run:
name: Build Docker artifact - demo
command: docker build --pull -t "cosmwasm/wasmd-demo:${CIRCLE_TAG}" . .
- run:
name: Push application Docker image to docker hub
command: |
docker login --password-stdin -u "$DOCKER_USER" \<<<"$DOCKER_PASS"
docker push "cosmwasm/wasmd-demo:${CIRCLE_TAG}"
docker logout
reproducible-builds:
executor: golang
@@ -274,19 +277,19 @@ workflows:
version: 2
test-suite:
jobs:
# - docker-image:
# requires:
# - setup-dependencies
# - docker-tagged:
# filters:
# tags:
# only:
# - /^v.*/
# branches:
# ignore:
# - /.*/
# requires:
# - setup-dependencies
- docker-image:
requires:
- setup-dependencies
- docker-tagged:
filters:
tags:
only:
- /^v.*/
branches:
ignore:
- /.*/
requires:
- setup-dependencies
- setup-dependencies:
# filters here are needed to enable this job also for tags
filters: