From 8954fc0f461214ee1bceb7ce4b8c6c038d696e31 Mon Sep 17 00:00:00 2001 From: David Ichim Date: Wed, 15 Nov 2023 19:31:32 +0200 Subject: [PATCH 1/4] fix(performance): use cloneDeepSchema for cloning the schema to avoid potential errors --- src/components/manage/Blocks/MetadataSection/variations.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/manage/Blocks/MetadataSection/variations.js b/src/components/manage/Blocks/MetadataSection/variations.js index 4628947..4dc1989 100644 --- a/src/components/manage/Blocks/MetadataSection/variations.js +++ b/src/components/manage/Blocks/MetadataSection/variations.js @@ -1,11 +1,11 @@ import { TableSchema } from './schema'; -import { cloneDeep } from 'lodash'; +import { cloneDeepSchema } from '@plone/volto/helpers/Utils/Utils'; export const addTableField = ({ schema, intl }) => { const applied = schema.fieldsets[0].fields.includes('table'); if (!applied) { - const resSchema = cloneDeep(schema); + const resSchema = cloneDeepSchema(schema); resSchema.fieldsets.push({ id: 'tableStyle', From 9376a3d9789f71cfdfc042cabfd5e1358f823ffa Mon Sep 17 00:00:00 2001 From: valentinab25 Date: Fri, 17 Nov 2023 04:08:34 +0200 Subject: [PATCH 2/4] test: [JENKINS] Run cypress in started frontend container --- Jenkinsfile | 7 ++++++- Makefile | 6 ++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index edf27ef..f406fa6 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -159,7 +159,8 @@ 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 '''timeout -s 9 3600 docker run --shm-size=2g --cpu-quota=150000 --link $IMAGE_NAME-plone:plone --entrypoint=make --name="$IMAGE_NAME-cypress" --workdir=/app/src/addons/${GIT_NAME} -e "RAZZLE_INTERNAL_API_PATH=http://plone:8080/Plone" $IMAGE_NAME-frontend cypress-ci''' + 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 '''timeout -s 9 1800 docker exec --workdir=/app/src/addons/${GIT_NAME} $IMAGE_NAME-cypress make cypress-ci''' } finally { try { sh '''rm -rf cypress-videos cypress-results cypress-coverage cypress-screenshots''' @@ -189,6 +190,10 @@ pipeline { catchError(buildResult: 'SUCCESS', stageResult: 'SUCCESS') { junit testResults: 'cypress-results/**/*.xml', allowEmptyResults: true } + catchError(buildResult: 'SUCCESS', stageResult: 'SUCCESS') { + sh '''docker logs $IMAGE_NAME-cypress''' + } + sh script: "docker stop $IMAGE_NAME-cypress", returnStatus: true sh script: "docker stop $IMAGE_NAME-plone", returnStatus: true sh script: "docker rm -v $IMAGE_NAME-plone", returnStatus: true sh script: "docker rm -v $IMAGE_NAME-cypress", returnStatus: true diff --git a/Makefile b/Makefile index 30b44f0..efbf2fb 100644 --- a/Makefile +++ b/Makefile @@ -151,14 +151,12 @@ test-ci: .PHONY: start-ci start-ci: + cp .coverage.babel.config.js /app/babel.config.js cd ../.. - yarn start & + yarn start .PHONY: cypress-ci cypress-ci: - cp .coverage.babel.config.js /app/babel.config.js - make start-ci $(NODE_MODULES)/.bin/wait-on -t 240000 http://localhost:3000 NODE_ENV=development make cypress-run - From 1b03bcff0ca18ea13ef5efe4cacb41ffe8990d97 Mon Sep 17 00:00:00 2001 From: valentinab25 Date: Fri, 17 Nov 2023 20:08:51 +0200 Subject: [PATCH 3/4] test: [JENKINS] Use java17 for sonarqube scanner --- Jenkinsfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index f406fa6..4cbad1a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,4 +1,7 @@ pipeline { + tools { + jdk 'Java17' + } agent { node { label 'docker-host' } } From e07f4d7ffe1fa81cbc5be944099a7e7dbb91b674 Mon Sep 17 00:00:00 2001 From: EEA Jenkins <@users.noreply.github.com> Date: Fri, 24 Nov 2023 10:09:06 +0000 Subject: [PATCH 4/4] Automated release 6.0.5 --- CHANGELOG.md | 12 +++++++++--- package.json | 2 +- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6796182..eadc6c0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,11 +4,17 @@ 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). -### [6.0.4](https://github.com/eea/volto-metadata-block/compare/6.0.3...6.0.4) - 13 November 2023 +### [6.0.5](https://github.com/eea/volto-metadata-block/compare/6.0.4...6.0.5) - 24 November 2023 + +#### :bug: Bug Fixes -#### :rocket: New Features +- fix(performance): use cloneDeepSchema for cloning the schema to avoid potential errors [David Ichim - [`8954fc0`](https://github.com/eea/volto-metadata-block/commit/8954fc0f461214ee1bceb7ce4b8c6c038d696e31)] -- feat: comma added from ArrayWidget in volto core [Miu Razvan - [`608bad8`](https://github.com/eea/volto-metadata-block/commit/608bad85186fdabeac2d8fd2e54b7f1bd5b37f69)] +#### :hammer_and_wrench: Others + +- test: [JENKINS] Use java17 for sonarqube scanner [valentinab25 - [`1b03bcf`](https://github.com/eea/volto-metadata-block/commit/1b03bcff0ca18ea13ef5efe4cacb41ffe8990d97)] +- test: [JENKINS] Run cypress in started frontend container [valentinab25 - [`9376a3d`](https://github.com/eea/volto-metadata-block/commit/9376a3d9789f71cfdfc042cabfd5e1358f823ffa)] +### [6.0.4](https://github.com/eea/volto-metadata-block/compare/6.0.3...6.0.4) - 13 November 2023 #### :house: Internal changes diff --git a/package.json b/package.json index 54bdda1..48d4693 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@eeacms/volto-metadata-block", - "version": "6.0.4", + "version": "6.0.5", "description": "Volto Metadata Block", "main": "src/index.js", "author": "European Environment Agency: IDM2 A-Team",