Merge pull request #4041 from matrix-org/rav/run_tests_in_docker
run the circle builds in docker containerspull/4050/head
						commit
						80736fd8ed
					
				| 
						 | 
				
			
			@ -23,99 +23,106 @@ jobs:
 | 
			
		|||
      - run: docker push matrixdotorg/synapse:latest
 | 
			
		||||
      - run: docker push matrixdotorg/synapse:latest-py3
 | 
			
		||||
  sytestpy2:
 | 
			
		||||
    machine: true
 | 
			
		||||
    docker:
 | 
			
		||||
      - image: matrixdotorg/sytest-synapsepy2
 | 
			
		||||
    working_directory: /src
 | 
			
		||||
    steps:
 | 
			
		||||
      - checkout
 | 
			
		||||
      - run: docker pull matrixdotorg/sytest-synapsepy2
 | 
			
		||||
      - run: docker run --rm -it -v $(pwd)\:/src -v $(pwd)/logs\:/logs matrixdotorg/sytest-synapsepy2
 | 
			
		||||
      - run: /synapse_sytest.sh
 | 
			
		||||
      - store_artifacts:
 | 
			
		||||
          path: ~/project/logs
 | 
			
		||||
          path: /logs
 | 
			
		||||
          destination: logs
 | 
			
		||||
      - store_test_results:
 | 
			
		||||
          path: logs
 | 
			
		||||
          path: /logs
 | 
			
		||||
  sytestpy2postgres:
 | 
			
		||||
    machine: true
 | 
			
		||||
    docker:
 | 
			
		||||
      - image: matrixdotorg/sytest-synapsepy2
 | 
			
		||||
    working_directory: /src
 | 
			
		||||
    steps:
 | 
			
		||||
      - checkout
 | 
			
		||||
      - run: docker pull matrixdotorg/sytest-synapsepy2
 | 
			
		||||
      - run: docker run --rm -it -v $(pwd)\:/src -v $(pwd)/logs\:/logs -e POSTGRES=1 matrixdotorg/sytest-synapsepy2
 | 
			
		||||
      - run: POSTGRES=1 /synapse_sytest.sh
 | 
			
		||||
      - store_artifacts:
 | 
			
		||||
          path: ~/project/logs
 | 
			
		||||
          path: /logs
 | 
			
		||||
          destination: logs
 | 
			
		||||
      - store_test_results:
 | 
			
		||||
          path: logs
 | 
			
		||||
          path: /logs
 | 
			
		||||
  sytestpy2merged:
 | 
			
		||||
    machine: true
 | 
			
		||||
    docker:
 | 
			
		||||
      - image: matrixdotorg/sytest-synapsepy2
 | 
			
		||||
    working_directory: /src
 | 
			
		||||
    steps:
 | 
			
		||||
      - checkout
 | 
			
		||||
      - run: bash .circleci/merge_base_branch.sh
 | 
			
		||||
      - run: docker pull matrixdotorg/sytest-synapsepy2
 | 
			
		||||
      - run: docker run --rm -it -v $(pwd)\:/src -v $(pwd)/logs\:/logs matrixdotorg/sytest-synapsepy2
 | 
			
		||||
      - run: /synapse_sytest.sh
 | 
			
		||||
      - store_artifacts:
 | 
			
		||||
          path: ~/project/logs
 | 
			
		||||
          path: /logs
 | 
			
		||||
          destination: logs
 | 
			
		||||
      - store_test_results:
 | 
			
		||||
          path: logs
 | 
			
		||||
 | 
			
		||||
          path: /logs
 | 
			
		||||
  sytestpy2postgresmerged:
 | 
			
		||||
    machine: true
 | 
			
		||||
    docker:
 | 
			
		||||
      - image: matrixdotorg/sytest-synapsepy2
 | 
			
		||||
    working_directory: /src
 | 
			
		||||
    steps:
 | 
			
		||||
      - checkout
 | 
			
		||||
      - run: bash .circleci/merge_base_branch.sh
 | 
			
		||||
      - run: docker pull matrixdotorg/sytest-synapsepy2
 | 
			
		||||
      - run: docker run --rm -it -v $(pwd)\:/src -v $(pwd)/logs\:/logs -e POSTGRES=1 matrixdotorg/sytest-synapsepy2
 | 
			
		||||
      - run: POSTGRES=1 /synapse_sytest.sh
 | 
			
		||||
      - store_artifacts:
 | 
			
		||||
          path: ~/project/logs
 | 
			
		||||
          path: /logs
 | 
			
		||||
          destination: logs
 | 
			
		||||
      - store_test_results:
 | 
			
		||||
          path: logs
 | 
			
		||||
          path: /logs
 | 
			
		||||
 | 
			
		||||
  sytestpy3:
 | 
			
		||||
    machine: true
 | 
			
		||||
    docker:
 | 
			
		||||
      - image: matrixdotorg/sytest-synapsepy3
 | 
			
		||||
    working_directory: /src
 | 
			
		||||
    steps:
 | 
			
		||||
      - checkout
 | 
			
		||||
      - run: docker pull matrixdotorg/sytest-synapsepy3
 | 
			
		||||
      - run: docker run --rm -it -v $(pwd)\:/src -v $(pwd)/logs\:/logs matrixdotorg/sytest-synapsepy3
 | 
			
		||||
      - run: /synapse_sytest.sh
 | 
			
		||||
      - store_artifacts:
 | 
			
		||||
          path: ~/project/logs
 | 
			
		||||
          path: /logs
 | 
			
		||||
          destination: logs
 | 
			
		||||
      - store_test_results:
 | 
			
		||||
          path: logs
 | 
			
		||||
          path: /logs
 | 
			
		||||
  sytestpy3postgres:
 | 
			
		||||
    machine: true
 | 
			
		||||
    docker:
 | 
			
		||||
      - image: matrixdotorg/sytest-synapsepy3
 | 
			
		||||
    working_directory: /src
 | 
			
		||||
    steps:
 | 
			
		||||
      - checkout
 | 
			
		||||
      - run: docker pull matrixdotorg/sytest-synapsepy3
 | 
			
		||||
      - run: docker run --rm -it -v $(pwd)\:/src -v $(pwd)/logs\:/logs -e POSTGRES=1 matrixdotorg/sytest-synapsepy3
 | 
			
		||||
      - run: POSTGRES=1 /synapse_sytest.sh
 | 
			
		||||
      - store_artifacts:
 | 
			
		||||
          path: ~/project/logs
 | 
			
		||||
          path: /logs
 | 
			
		||||
          destination: logs
 | 
			
		||||
      - store_test_results:
 | 
			
		||||
          path: logs
 | 
			
		||||
          path: /logs
 | 
			
		||||
  sytestpy3merged:
 | 
			
		||||
    machine: true
 | 
			
		||||
    docker:
 | 
			
		||||
      - image: matrixdotorg/sytest-synapsepy3
 | 
			
		||||
    working_directory: /src
 | 
			
		||||
    steps:
 | 
			
		||||
      - checkout
 | 
			
		||||
      - run: bash .circleci/merge_base_branch.sh
 | 
			
		||||
      - run: docker pull matrixdotorg/sytest-synapsepy3
 | 
			
		||||
      - run: docker run --rm -it -v $(pwd)\:/src -v $(pwd)/logs\:/logs matrixdotorg/sytest-synapsepy3
 | 
			
		||||
      - run: /synapse_sytest.sh
 | 
			
		||||
      - store_artifacts:
 | 
			
		||||
          path: ~/project/logs
 | 
			
		||||
          path: /logs
 | 
			
		||||
          destination: logs
 | 
			
		||||
      - store_test_results:
 | 
			
		||||
          path: logs
 | 
			
		||||
          path: /logs
 | 
			
		||||
  sytestpy3postgresmerged:
 | 
			
		||||
    machine: true
 | 
			
		||||
    docker:
 | 
			
		||||
      - image: matrixdotorg/sytest-synapsepy3
 | 
			
		||||
    working_directory: /src
 | 
			
		||||
    steps:
 | 
			
		||||
      - checkout
 | 
			
		||||
      - run: bash .circleci/merge_base_branch.sh
 | 
			
		||||
      - run: docker pull matrixdotorg/sytest-synapsepy3
 | 
			
		||||
      - run: docker run --rm -it -v $(pwd)\:/src -v $(pwd)/logs\:/logs -e POSTGRES=1 matrixdotorg/sytest-synapsepy3
 | 
			
		||||
      - run: POSTGRES=1 /synapse_sytest.sh
 | 
			
		||||
      - store_artifacts:
 | 
			
		||||
          path: ~/project/logs
 | 
			
		||||
          path: /logs
 | 
			
		||||
          destination: logs
 | 
			
		||||
      - store_test_results:
 | 
			
		||||
          path: logs
 | 
			
		||||
          path: /logs
 | 
			
		||||
 | 
			
		||||
workflows:
 | 
			
		||||
  version: 2
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -16,7 +16,7 @@ then
 | 
			
		|||
    GITBASE="develop"
 | 
			
		||||
else
 | 
			
		||||
    # Get the reference, using the GitHub API
 | 
			
		||||
    GITBASE=`curl -q https://api.github.com/repos/matrix-org/synapse/pulls/${CIRCLE_PR_NUMBER} | jq -r '.base.ref'`
 | 
			
		||||
    GITBASE=`wget -O- https://api.github.com/repos/matrix-org/synapse/pulls/${CIRCLE_PR_NUMBER} | jq -r '.base.ref'`
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
# Show what we are before
 | 
			
		||||
| 
						 | 
				
			
			@ -31,4 +31,4 @@ git fetch -u origin $GITBASE
 | 
			
		|||
git merge --no-edit origin/$GITBASE
 | 
			
		||||
 | 
			
		||||
# Show what we are after.
 | 
			
		||||
git show -s
 | 
			
		||||
git show -s
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -0,0 +1 @@
 | 
			
		|||
Run the CircleCI builds in docker containers
 | 
			
		||||
		Loading…
	
		Reference in New Issue