message: Feat: Docker image build & push
diff: @@ -105,6 +105,32 @@ jobs:
  name: Publish peer
  command: npx bazel run //comms/peer:package.publish
  + publish-docker:
  + <<: *base_env
  + docker:
  + - image: circleci/node:10-browsers
  + environment: &ENVIRONMENT
  + DOCKER_IMAGE_NAME: decentraland/katalyst
  + steps:
  + - <<: *attach_root
  + - setup_remote_docker: { docker_layer_caching: true }
  + - run:
  + name: Build Docker image
  + command: docker build -t ${DOCKER_IMAGE_NAME}:${CIRCLE_SHA1} .
  + - run:
  + name: Log into DockerHub
  + command: docker login -u "${DOCKER_USER}" -p "${DOCKER_PASS}"
  + - run:
  + name: Push image
  + command: |
  + docker push "${DOCKER_IMAGE_NAME}:${CIRCLE_SHA1}"
  + if echo "${CIRCLE_TAG}" | grep "^[0-9]\+\.[0-9]\+\.[0-9]\+$"; then
  + docker tag "${DOCKER_IMAGE_NAME}:${CIRCLE_SHA1}" "${DOCKER_IMAGE_NAME}:${CIRCLE_TAG}"
  + docker push "${DOCKER_IMAGE_NAME}:${CIRCLE_TAG}"
  + docker tag "${DOCKER_IMAGE_NAME}:${CIRCLE_SHA1}" "${DOCKER_IMAGE_NAME}:latest"
  + docker push "${DOCKER_IMAGE_NAME}:latest"
  + fi
  +
  workflows:
  version: 2
  @@ -142,3 +168,13 @@ workflows:
  <<: *master_and_tags
  requires:
  - accept-publish-peer
  +
  + # publish docker image
  + - publish-docker:
  + <<: *master_and_tags
  + requires:
  + - checkout
  + - build-peer
  + - build-lighthouse
  + - build-content
  + - build-lambdas
  