# PHP CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-php/ for more details
#
version: 2
jobs:
  build:
    docker:
      # specify the version you desire here
      - image: docker:latest
    steps:
      - checkout
      - setup_remote_docker
      - run:
          name: Setup build runner
          command: docker login -u $DOCKER_USER -p $DOCKER_PASS
      - run:
          name: Build and push Jessie image
          command: |
            # --squash not allowed as Docker daemon doesn't have experimental features.
            docker build -t eugenesia/phpfarm:jessie -t eugenesia/phpfarm:latest -f Dockerfile-Jessie .
            docker push eugenesia/phpfarm:jessie
            docker push eugenesia/phpfarm:latest
      - run:
          name: Build and push Wheezy image
          command: |
            # --squash not allowed as Docker daemon doesn't have experimental features.
            docker build -t eugenesia/phpfarm:wheezy -t eugenesia/phpfarm:latest -f Dockerfile-Wheezy .
            docker push eugenesia/phpfarm:wheezy


# PHP CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-php/ for more details
#
version: 2
jobs:
  build:
    docker:
      # specify the version you desire here
      - image: docker:latest
    steps:
      - checkout
      - setup_remote_docker
      - run:
          name: Setup build runner
          command: docker login -u $DOCKER_USER -p $DOCKER_PASS
      - run:
          name: Jessie image: Build, test, push
          command: |
            # --squash not allowed as Docker daemon doesn't have experimental features.
            docker build -t eugenesia/phpfarm:jessie -t eugenesia/phpfarm:latest -f Dockerfile-Jessie .
            ./test.sh jessie
            docker push eugenesia/phpfarm:jessie
            docker push eugenesia/phpfarm:latest
      - run:
          name: Wheezy image: Build, test, push
          command: |
            # --squash not allowed as Docker daemon doesn't have experimental features.
            docker build -t eugenesia/phpfarm:wheezy -t eugenesia/phpfarm:latest -f Dockerfile-Wheezy .
            ./test.sh wheezy
            docker push eugenesia/phpfarm:wheezy


Test built images in CircleCI
Test built images in CircleCI
