Skip to content

Commit

Permalink
feat(support-services): set default pipeline before reindexing all re…
Browse files Browse the repository at this point in the history
…cords
  • Loading branch information
jahow committed Dec 27, 2023
1 parent 0192cd9 commit 02a99f9
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 22 deletions.
13 changes: 0 additions & 13 deletions apps/datahub-e2e/src/e2e/datasets.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -483,19 +483,6 @@ describe('datasets', () => {
.should('not.exist')
})

it('should reindex records', () => {
cy.login('admin', 'admin', false)
cy.visit(
`http://localhost:8080/geonetwork/srv/eng/admin.console#/tools`
)
cy.intercept({
method: 'PUT',
url: 'http://localhost:8080/geonetwork/srv/api/site/index?reset=false&asynchronous=true',
}).as('indexingRecordsXHR')
cy.get('[class=panel-body]').find('button').first().click()
cy.wait('@indexingRecordsXHR')
})

it('should display quality widget', () => {
cy.visit('/search')
cy.get('gn-ui-progress-bar')
Expand Down
23 changes: 14 additions & 9 deletions support-services/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,18 @@ services:
ports:
- '8080:8080'

init-pipeline:
image: geonetwork/geonetwork-ui-tools-pipelines:latest
build: ../tools/pipelines
environment:
ES_HOST: http://elasticsearch:9200
RECORDS_INDEX: gn-records
depends_on:
geonetwork:
condition: service_healthy
elasticsearch:
condition: service_healthy

init:
image: alpine/curl
# only run init if volumes were cleared
Expand All @@ -110,6 +122,8 @@ services:
condition: service_healthy
elasticsearch:
condition: service_healthy
init-pipeline:
condition: service_completed_successfully
healthcheck:
test: ['CMD-SHELL', "sh -c '[ -f /done ]'"]
interval: 5s
Expand Down Expand Up @@ -140,12 +154,3 @@ services:
condition: service_healthy
ports:
- '8081:8080'

tools-pipelines:
image: geonetwork/geonetwork-ui-tools-pipelines:latest
environment:
ES_HOST: http://elasticsearch:9200
RECORDS_INDEX: gn-records
depends_on:
init:
condition: service_completed_successfully
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh

indexConfigDir=/mnt/geonetwork_data/config/index/

echo "Setting default pipeline to geonetwork-ui ..."
jq '.settings.index.default_pipeline = "geonetwork-ui"' ${indexConfigDir}records.json > /tmp.json
mv /tmp.json ${indexConfigDir}records.json

0 comments on commit 02a99f9

Please sign in to comment.