Skip to content

Commit 0a15a77

Browse files
committed
Run integration tests in 'machine' type on CircleCI
Need to move the 'images' directory to /tmp since /go isn't writeable in 'machine' executor type on CircleCI. Indirect via symlink so we can run the Makefile unchanged from the project directory. The Postgres container we were running seems to have been ignored, since the Makefile always runs another one. Signed-off-by: Bryan Boreham <[email protected]>
1 parent d408ded commit 0a15a77

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

.circleci/config.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -77,25 +77,22 @@ jobs:
7777
command: make BUILD_IN_CONTAINER=false test
7878

7979
integration:
80-
docker:
81-
- image: cortexproject/build-image:master-561033f49
82-
- image: circleci/postgres:9.6.2-alpine
83-
environment:
84-
POSTGRES_DB: configs_test
80+
machine:
81+
image: ubuntu-1604:201903-01
8582

86-
working_directory: /go/src/github.com/cortexproject/cortex
83+
working_directory: ~/src/github.com/cortexproject/cortex
8784
steps:
8885
- checkout
89-
- setup_remote_docker
90-
- install-docker
9186
- restore_cache:
9287
key: v1-cortex-{{ .Branch }}-{{ .Revision }}
9388
- run:
9489
name: Integration Test
95-
command: MIGRATIONS_DIR=$(pwd)/cmd/cortex/migrations make BUILD_IN_CONTAINER=false configs-integration-test
90+
command: |
91+
touch build-image/.uptodate
92+
MIGRATIONS_DIR=$(pwd)/cmd/cortex/migrations make BUILD_IMAGE=cortexproject/build-image:1370-pin-protoc-7ae297930 configs-integration-test
9693
- run:
9794
name: Load Images
98-
command: make BUILD_IN_CONTAINER=false load-images
95+
command: ln -s /tmp/images ./images; make BUILD_IN_CONTAINER=false load-images
9996
- run:
10097
name: Ingester hand-over test
10198
command: ./integration-tests/test-handover.sh
@@ -124,12 +121,15 @@ jobs:
124121

125122
- run:
126123
name: Save Images
127-
command: make BUILD_IN_CONTAINER=false save-images
124+
command: |
125+
mkdir /tmp/images
126+
ln -s /tmp/images ./images
127+
make BUILD_IN_CONTAINER=false save-images
128128
129129
- save_cache:
130130
key: v1-cortex-{{ .Branch }}-{{ .Revision }}
131131
paths:
132-
- images/
132+
- /tmp/images/
133133

134134
deploy:
135135
<<: *defaults
@@ -143,7 +143,7 @@ jobs:
143143

144144
- run:
145145
name: Load Images
146-
command: make BUILD_IN_CONTAINER=false load-images
146+
command: ln -s /tmp/images ./images; make BUILD_IN_CONTAINER=false load-images
147147

148148
- run:
149149
name: Deploy

0 commit comments

Comments
 (0)