version: 2
jobs:
  build:
    working_directory: ~/build
    docker:
      - image: docker:17.06.0-ce-git
    branches:
      only:
        - feature/circleci
    steps:
      - checkout
      - setup_remote_docker:
          reusable: true
          exclusive: true
      - run:
          rame: Build application Docker image
          command: |
            docker build -t stackstorm/stackstorm:2.3.1 images/stackstorm/2.3.1

version: 2
jobs:
  build:
    working_directory: ~/build
    docker:
      - image: docker:17.06.0-ce-git
    branches:
      only:
        - feature/circleci
    steps:
      - checkout
      - setup_remote_docker:
          reusable: true
          exclusive: true
      - run:
          name: Build image for 2.2.1
          command: docker build -t stackstorm/stackstorm:2.2.1 images/stackstorm/2.2.1
      - run:
          name: Build image for 2.3.0
          command: docker build -t stackstorm/stackstorm:2.3.0 images/stackstorm/2.3.0
      - run:
          name: Build image for 2.3.1
          command: docker build -t stackstorm/stackstorm:2.3.1 images/stackstorm/2.3.1
      - run:
          name: Build image for latest (2.3.1)
          command: docker build -t stackstorm/stackstorm:latest images/stackstorm/2.3.1

Build 2.2.1, 2.3.0, 2.3.1 and latest images
Build 2.2.1, 2.3.0, 2.3.1 and latest images
