Skip to content

Commit

Permalink
Merge pull request #89 from eea/develop
Browse files Browse the repository at this point in the history
updated index & index_name
  • Loading branch information
olimpiurob authored Feb 28, 2024
2 parents ee0d3de + e4ad55e commit a9b16e0
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 13 deletions.
3 changes: 3 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Jest configuration variables
# - possible values: ON, OFF
JEST_USE_SETUP=OFF
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
.vscode/
.history
.eslintrc.js
.nyc_output
project
coverage
Expand Down
10 changes: 8 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ All notable changes to this project will be documented in this file. Dates are d

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

### [0.2.6](https://github.com/eea/volto-freshwater-policy/compare/1.0.0-prefix-path-fixes.1-alpha...0.2.6) - 27 February 2024
### [0.2.7](https://github.com/eea/volto-freshwater-policy/compare/1.0.0-prefix-path-fixes.1-alpha...0.2.7) - 28 February 2024

#### :rocket: New Features

Expand Down Expand Up @@ -44,6 +44,10 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### :hammer_and_wrench: Others

- test: revert jest config [valentinab25 - [`866f1f6`](https://github.com/eea/volto-freshwater-policy/commit/866f1f617b0ec63a3beab0e763ca482eb7d3b83f)]
- test: revert eslint configuration [valentinab25 - [`b54c1f8`](https://github.com/eea/volto-freshwater-policy/commit/b54c1f8ab3ea6a927b444e6f3e7be253eee749fc)]
- test: Update jest,Jenkinsfile,lint to volto-addons-template PR30 [valentinab25 - [`c1332e4`](https://github.com/eea/volto-freshwater-policy/commit/c1332e41da9f818fe8bb853bb11b364b342d0c6e)]
- updated index & index_name [Zoltan Szabo - [`5087e60`](https://github.com/eea/volto-freshwater-policy/commit/5087e60ec3a067c015448e9314a110e1b6571c7e)]
- Remove volto-datablocks and volto-embed customization [laszlocseh - [`1f7ff4b`](https://github.com/eea/volto-freshwater-policy/commit/1f7ff4b4fd822b0b8d058f673729128164566059)]
- Fix eslint [laszlocseh - [`afe29a4`](https://github.com/eea/volto-freshwater-policy/commit/afe29a45df99febd0c95d6ecaee99931edfebdd1)]
- Temporarily add volto-datablocks and volto-embed customizations [laszlocseh - [`fbbbaec`](https://github.com/eea/volto-freshwater-policy/commit/fbbbaec17459d87b14526caec18725a3817a20ae)]
Expand Down Expand Up @@ -86,7 +90,9 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

- fix: override of volto-call-to-action widget [nileshgulia1 - [`bc613be`](https://github.com/eea/volto-freshwater-policy/commit/bc613be163d32ffd296458c7307ac5fa1c586c9e)]

### [1.0.0-prefix-path-fixes.0-alpha](https://github.com/eea/volto-freshwater-policy/compare/0.2.5...1.0.0-prefix-path-fixes.0-alpha) - 15 January 2024
### [1.0.0-prefix-path-fixes.0-alpha](https://github.com/eea/volto-freshwater-policy/compare/0.2.6...1.0.0-prefix-path-fixes.0-alpha) - 15 January 2024

### [0.2.6](https://github.com/eea/volto-freshwater-policy/compare/0.2.5...0.2.6) - 27 February 2024

### [0.2.5](https://github.com/eea/volto-freshwater-policy/compare/0.2.4...0.2.5) - 26 February 2024

Expand Down
9 changes: 8 additions & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -162,10 +162,16 @@ pipeline {
script {
try {
sh '''docker run --pull always --rm -d --name="$IMAGE_NAME-plone" -e SITE="Plone" -e PROFILES="$BACKEND_PROFILES" -e ADDONS="$BACKEND_ADDONS" eeacms/plone-backend'''
sh '''docker run -d --shm-size=3g --link $IMAGE_NAME-plone:plone --name="$IMAGE_NAME-cypress" -e "RAZZLE_INTERNAL_API_PATH=http://plone:8080/Plone" --entrypoint=make --workdir=/app/src/addons/$GIT_NAME $IMAGE_NAME-frontend start-ci'''
sh '''docker run -d --shm-size=4g --link $IMAGE_NAME-plone:plone --name="$IMAGE_NAME-cypress" -e "RAZZLE_INTERNAL_API_PATH=http://plone:8080/Plone" --entrypoint=make --workdir=/app/src/addons/$GIT_NAME $IMAGE_NAME-frontend start-ci'''
frontend = sh script:'''docker exec --workdir=/app/src/addons/${GIT_NAME} $IMAGE_NAME-cypress make check-ci''', returnStatus: true
if ( frontend != 0 ) {
sh '''docker logs $IMAGE_NAME-cypress; exit 1'''
}

sh '''timeout -s 9 1800 docker exec --workdir=/app/src/addons/${GIT_NAME} $IMAGE_NAME-cypress make cypress-ci'''
} finally {
try {
if ( frontend == 0 ) {
sh '''rm -rf cypress-videos cypress-results cypress-coverage cypress-screenshots'''
sh '''mkdir -p cypress-videos cypress-results cypress-coverage cypress-screenshots'''
videos = sh script: '''docker cp $IMAGE_NAME-cypress:/app/src/addons/$GIT_NAME/cypress/videos cypress-videos/''', returnStatus: true
Expand All @@ -189,6 +195,7 @@ pipeline {
sh '''for file in $(find cypress-results -name *.xml); do if [ $(grep -E 'failures="[1-9].*"' $file | wc -l) -eq 0 ]; then testname=$(grep -E 'file=.*failures="0"' $file | sed 's#.* file=".*\\/\\(.*\\.[jsxt]\\+\\)" time.*#\\1#' ); rm -f cypress-videos/videos/$testname.mp4; fi; done'''
archiveArtifacts artifacts: 'cypress-videos/**/*.mp4', fingerprint: true, allowEmptyArchive: true
}
}
} finally {
catchError(buildResult: 'SUCCESS', stageResult: 'SUCCESS') {
junit testResults: 'cypress-results/**/*.xml', allowEmptyResults: true
Expand Down
9 changes: 6 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ cypress-open: ## Open cypress integration tests

.PHONY: cypress-run
cypress-run: ## Run cypress integration tests
CYPRESS_API_PATH="${RAZZLE_DEV_PROXY_API_PATH}" NODE_ENV=development $(NODE_MODULES)/cypress/bin/cypress run --browser chromium
CYPRESS_API_PATH="${RAZZLE_DEV_PROXY_API_PATH}" NODE_ENV=development $(NODE_MODULES)/cypress/bin/cypress run

.PHONY: test
test: ## Run jest tests
Expand Down Expand Up @@ -155,8 +155,11 @@ start-ci:
cd ../..
yarn start

.PHONY: check-ci
check-ci:
$(NODE_MODULES)/.bin/wait-on -t 240000 http://localhost:3000

.PHONY: cypress-ci
cypress-ci:
$(NODE_MODULES)/.bin/wait-on -t 240000 http://localhost:3000
NODE_ENV=development make cypress-run

CYPRESS_API_PATH="${RAZZLE_DEV_PROXY_API_PATH}" NODE_ENV=development $(NODE_MODULES)/cypress/bin/cypress run --browser chromium
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@eeacms/volto-freshwater-policy",
"version": "0.2.6",
"version": "0.2.7",
"description": "@eeacms/volto-freshwater-policy: Volto add-on",
"main": "src/index.js",
"author": "European Environment Agency: IDM2 A-Team",
Expand Down Expand Up @@ -53,7 +53,8 @@
"cypress-fail-fast": "^5.0.1",
"husky": "^8.0.3",
"lint-staged": "^14.0.1",
"md5": "^2.3.0"
"md5": "^2.3.0",
"dotenv": "^16.3.2"
},
"lint-staged": {
"src/**/*.{js,jsx,ts,tsx,json}": [
Expand Down
4 changes: 2 additions & 2 deletions src/search/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ export default function install(config) {

config.searchui.freshwatermeasure = {
...mergeConfig(envConfig, config.searchui.globalsearch),
elastic_index: '_es/freshwatermeasure',
index_name: 'wisetest_searchui',
elastic_index: '_es/globalsearch',
index_name: 'data_searchui',
host: process.env.RAZZLE_ES_PROXY_ADDR || 'http://localhost:3000',
runtime_mappings: build_runtime_mappings(clusters),
};
Expand Down
4 changes: 2 additions & 2 deletions src/search/resource_catalogue/config-catalogue.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ export default function installResourceCatalogSearch(config) {

config.searchui.resourceCatalog = {
...mergeConfig(envConfig, config.searchui.globalsearchbase),
elastic_index: '_es/freshwatermeasure',
index_name: 'wisetest_searchui',
elastic_index: '_es/globalsearch',
index_name: 'data_searchui',
host: process.env.RAZZLE_ES_PROXY_ADDR || 'http://localhost:3000',
runtime_mappings: build_runtime_mappings(clusters),
};
Expand Down

0 comments on commit a9b16e0

Please sign in to comment.