# PHP CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-php/ for more details
#
version: 2
jobs:
  build:
    docker:
      # Image for build runner.
      - image: docker:17.06
    steps:
      - checkout
      - setup_remote_docker
      - run:
          name: Setup build runner
          command: |
            # Install PHP to run tests.
            apk --no-cache add php5
            # Needed to push built Docker images to registry.
            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


# PHP CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-php/ for more details
#
version: 2
jobs:
  build:
    docker:
      # Image for build runner.
      - image: docker:17.06
    steps:
      - checkout
      - setup_remote_docker
      - run:
          name: Setup build runner
          command: |
            # Bash and PHP needed for test scripts.
            apk --no-cache add bash php5
            # Needed to push built Docker images to registry.
            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


Install Bash in build runner
Install Bash in build runner
