Skip to content

Commit

Permalink
Adjust solr setup to run via a step so that precreate command can be …
Browse files Browse the repository at this point in the history
…called
  • Loading branch information
bbpennel committed Jan 24, 2025
1 parent 8686de4 commit fffc591
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,6 @@ jobs:
--health-interval 10s
--health-timeout 5s
ports: ["5432:5432"]
solr:
image: solr:9
ports:
- 8983:8983
options: >-
--name solr_container
clamavd:
image: lokori/clamav-java
ports:
Expand Down Expand Up @@ -124,11 +118,18 @@ jobs:
run: |
psql -c 'create database hyrax_test with owner hyrax;'
- name: Copy solr config into docker container
run: docker cp solr/config solr_container:/tmp/solr_config
- name: Make directory for solr config
run: mkdir -p /tmp/solr-config

- name: Create Solr core
run: docker exec solr_container solr create -c hydra-test -d /tmp/solr_config
# Need to copy the config is outside of the source path, otherwise it produces permission conflicts
- name: Copy Solr Config into container
run: sudo cp -r ${{ github.workspace }}/solr/config /tmp/solr-config/

- name: Run solr container as command to trigger core creation
run: |
docker run -v /tmp/solr-config:/opt/solr/server/solr/configsets/hy-c/ \
-d --rm -p 8983:8983 solr:9 \
solr-precreate hydra-test -d /opt/solr/server/solr/configsets/hy-c/
- name: Run rspec tests
run: bundle exec rspec
Expand Down

0 comments on commit fffc591

Please sign in to comment.