Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test fix 3 for docker compose updater #150

Merged
merged 1 commit into from
Jul 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/updater/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ runs:
run: |
echo "::add-mask::DATABASE_URL"
export DATABASE_URL=$(heroku config:get DATABASE_URL -a $APP_ID)
docker compose -f docker-compose.updater.yml --profile process-commands-in-ci up --exit-code-from test_service
docker compose -f docker-compose.updater.yml --profile process-commands-in-ci up --exit-code-from test_service_ci
shell: bash
env:
CONSOLE_COMMAND: ${{ inputs.command }}
Expand Down
18 changes: 15 additions & 3 deletions docker-compose.updater.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,19 @@ services:
condition: service_healthy
profiles:
- process-commands
- process-commands-in-ci # added to test: service updater is required by test_service but is disabled. Can be enabled by profiles [process-commands]

updater-ci:
extends:
file: common-services.yml
service: updater
build:
target: production
environment:
CI: true
COMMAND: ${CONSOLE_COMMAND}
DATABASE_URL:
command: >
bash -c "node dist/apps/update-command/main"
profiles:
- process-commands-in-ci

Expand All @@ -37,7 +43,6 @@ services:
-c ssl_key_file=/etc/ssl/private/server.key
profiles:
- process-commands
- process-commands-in-ci # added to test: service postgres_db_dev is required by updater-ci but is disabled. Can be enabled by profiles [process-commands]

test_service:
extends:
Expand All @@ -46,8 +51,15 @@ services:
depends_on:
updater:
condition: service_completed_successfully
profiles:
- process-commands

test_service_ci:
extends:
file: common-services.yml
service: tester
depends_on:
updater-ci:
condition: service_completed_successfully
profiles:
- process-commands
- process-commands-in-ci
Loading