Skip to content

Commit c290e85

Browse files
committed
chore(cirrus): use cirrus image built by make in docker compose
1 parent 9743a1d commit c290e85

File tree

3 files changed

+18
-23
lines changed

3 files changed

+18
-23
lines changed

Makefile

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ build_prod: ssl build_megazords
135135
$(DOCKER_BUILD) --target deploy -f experimenter/Dockerfile -t experimenter:deploy experimenter/
136136

137137
compose_stop:
138-
$(COMPOSE) kill || true
138+
$(CIRRUS_ENABLE) $(COMPOSE) kill || true
139139
$(COMPOSE_INTEGRATION) kill || true
140140
$(COMPOSE_PROD) kill || true
141141

@@ -179,15 +179,15 @@ test: build_test ## Run tests
179179
$(COMPOSE_TEST_RUN) experimenter sh -c '$(WAIT_FOR_DB) python manage.py test --parallel'
180180
pytest: test
181181

182-
start: build_dev ## Start containers
182+
start: build_dev cirrus_build ## Start containers
183183
$(COMPOSE) up
184184

185185
up: start
186186

187-
up_prod: build_prod
187+
up_prod: build_prod cirrus_build
188188
$(COMPOSE_PROD) up
189189

190-
up_prod_detached: build_prod
190+
up_prod_detached: build_prod cirrus_build
191191
$(COMPOSE_PROD) up -d
192192

193193
up_db: build_dev
@@ -196,29 +196,29 @@ up_db: build_dev
196196
up_django: build_dev
197197
$(COMPOSE) up nginx experimenter worker beat db redis kinto autograph
198198

199-
up_detached: build_dev
199+
up_detached: build_dev cirrus_build
200200
$(COMPOSE) up -d
201201

202202
generate_docs: build_dev
203-
$(COMPOSE_RUN) experimenter sh -c "$(GENERATE_DOCS)"
203+
$(COMPOSE_RUN) --no-deps experimenter sh -c "$(GENERATE_DOCS)"
204204

205205
generate_types: build_dev
206-
$(COMPOSE_RUN) experimenter sh -c "$(RESULTS_TYPES_GENERATE)"
206+
$(COMPOSE_RUN) --no-deps experimenter sh -c "$(RESULTS_TYPES_GENERATE)"
207207

208208
format: build_dev ## Format source tree
209-
$(COMPOSE_RUN) experimenter sh -c '${PARALLEL} "$(RUFF_FIX);$(DJLINT_FIX);$(RUFF_FORMAT_FIX)" "$(ESLINT_FIX_RESULTS)" "$(ESLINT_FIX_NIMBUS_UI)"'
209+
$(COMPOSE_RUN) --no-deps experimenter sh -c '${PARALLEL} "$(RUFF_FIX);$(DJLINT_FIX);$(RUFF_FORMAT_FIX)" "$(ESLINT_FIX_RESULTS)" "$(ESLINT_FIX_NIMBUS_UI)"'
210210
code_format: format
211211

212212
makemigrations: build_dev
213-
$(COMPOSE_RUN) experimenter python manage.py makemigrations
213+
$(COMPOSE_RUN) --no-deps experimenter python manage.py makemigrations
214214

215-
migrate: build_dev ## Run database migrations
215+
migrate: build_dev cirrus_build ## Run database migrations
216216
$(COMPOSE_RUN) experimenter sh -c "$(WAIT_FOR_DB) $(PYTHON_MIGRATE)"
217217

218-
bash: build_dev
218+
bash: build_dev cirrus_build
219219
$(COMPOSE_RUN) experimenter bash
220220

221-
refresh: kill build_dev compose_build refresh_db ## Rebuild all containers and the database
221+
refresh: kill build_dev cirrus_build compose_build refresh_db ## Rebuild all containers and the database
222222

223223
refresh_db: # Rebuild the database
224224
$(COMPOSE_RUN) -e SKIP_DUMMY=$$SKIP_DUMMY experimenter bash -c '$(WAIT_FOR_DB) $(PYTHON_MIGRATE)&&$(LOAD_LOCALES)&&$(LOAD_COUNTRIES)&&$(LOAD_LANGUAGES)&&$(LOAD_FEATURES)&&$(LOAD_DUMMY_EXPERIMENTS)'
@@ -285,7 +285,10 @@ cirrus_bash: cirrus_build_dev
285285
cirrus_up: cirrus_build
286286
$(CIRRUS_ENABLE) $(COMPOSE) up cirrus
287287

288-
cirrus_down: cirrus_build
288+
cirrus_up_detached: cirrus_build
289+
$(CIRRUS_ENABLE) $(COMPOSE) up -d cirrus
290+
291+
cirrus_down:
289292
$(CIRRUS_ENABLE) $(COMPOSE) down cirrus
290293

291294
cirrus_test: cirrus_build_test

docker-compose-cirrus.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,7 @@ version: "3"
22

33
services:
44
cirrus:
5-
build:
6-
additional_contexts:
7-
- fml=experimenter/experimenter/features/manifests/
8-
context: cirrus/server/
9-
dockerfile: Dockerfile
5+
image: cirrus:deploy
106
env_file: .env
117
depends_on:
128
- kinto

docker-compose.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -129,11 +129,7 @@ services:
129129
- "8000:8000"
130130

131131
cirrus-experimenter:
132-
build:
133-
additional_contexts:
134-
- fml=experimenter/experimenter/features/manifests/
135-
context: cirrus/server/
136-
dockerfile: Dockerfile
132+
image: cirrus:deploy
137133
env_file: .env
138134
environment:
139135
CIRRUS_APP_ID: experimenter.cirrus

0 commit comments

Comments
 (0)