Skip to content

Commit

Permalink
pants ci: copy Reconfigure RabbitMQ task into pants workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
cognifloyd committed Nov 7, 2024
1 parent 7077ee3 commit eb8c853
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -339,8 +339,19 @@ jobs:
ports:
- 27017:27017

# In GHA, these services are started first before the code is checked out.
# We use bitnami images to facilitate reconfiguring RabbitMQ during integration tests.
# We rely on custom config and SSL certs that are in the repo.
# Many images require config in env vars (which we can't change during the test job)
# or they require config in entrypoint args (which we can't override for GHA services)
# bitnami builds ways to get config files from mounted volumes.
rabbitmq:
image: rabbitmq:3.8-management
volumes:
- /home/runner/rabbitmq_conf:/bitnami/conf # RABBITMQ_MOUNTED_CONF_DIR
env:
# tell bitnami/rabbitmq to enable this by default
RABBITMQ_PLUGINS: rabbitmq_management
options: >-
--name rabbitmq
ports:
Expand Down Expand Up @@ -404,6 +415,15 @@ jobs:
# To ignore a bad cache, bump the cache* integer.
gha-cache-key: cache0-py${{ matrix.python.version }}

# This is only required for st2common/tests/integration/test_rabbitmq_ssl_listener.py
- name: Reconfigure RabbitMQ
# bitnami image allows (see bitnami/rabbitmq readme):
# Here we're copying a rabbitmq.config file which won't do anything.
# We need to switch to custom.conf or advanced.config.
timeout-minutes: 2 # may die if rabbitmq fails to start
run: |
./scripts/github/configure-rabbitmq.sh
- name: Integration Tests
env:
# Github Actions uses the 'runner' user, so use that instead of stanley.
Expand Down

0 comments on commit eb8c853

Please sign in to comment.