Skip to content

Commit 8d18150

Browse files
authored
Merge pull request #77 from eea/develop
Release volto 17
2 parents ac593d6 + e6af3c4 commit 8d18150

16 files changed

+8025
-2932
lines changed

.eslintrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ module.exports = {
3131
['@package', `${__dirname}/src`],
3232
['~', `${__dirname}/src`],
3333
],
34-
extensions: ['.js', '.jsx', '.json'],
34+
extensions: ['.js', '.jsx', '.ts', '.tsx', '.json'],
3535
},
3636
'babel-plugin-root-import': {
3737
rootPathSuffix: 'src',

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ logs
33
*.log
44
npm-debug.log*
55
.DS_Store
6+
start_local.sh
67

78
coverage
89

CHANGELOG.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,39 @@ All notable changes to this project will be documented in this file. Dates are d
44

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

7+
### [2.0.0](https://github.com/eea/freshwater-frontend/compare/1.23.0...2.0.0) - 5 September 2024
8+
9+
#### :rocket: New Features
10+
11+
- feat: volto 17 refs#269816 [nileshgulia1 - [`1fc4a1d`](https://github.com/eea/freshwater-frontend/commit/1fc4a1d3c52acef7afecae135b0e012c7a52522c)]
12+
13+
#### :rocket: Dependency updates
14+
15+
- Release @eeacms/volto-freshwater-policy@1.0.3 [EEA Jenkins - [`71bae23`](https://github.com/eea/freshwater-frontend/commit/71bae2367c80a2f4132af7d7dfa70445d105da14)]
16+
- Release @eeacms/volto-searchlib@2.0.3 - resolutions [EEA Jenkins - [`d54ef55`](https://github.com/eea/freshwater-frontend/commit/d54ef553450ba80b0451dc89e224dfd045930889)]
17+
- Release @eeacms/volto-freshwater-policy@1.0.2 [EEA Jenkins - [`19ef4ea`](https://github.com/eea/freshwater-frontend/commit/19ef4eaf6efab702eef2a2ee35942bfb70c1dc61)]
18+
- Release @eeacms/volto-eea-kitkat@25.3.0 [EEA Jenkins - [`eb2a5ad`](https://github.com/eea/freshwater-frontend/commit/eb2a5adf8efd9002f94b919dfac300ef70cc447f)]
19+
- Release @eeacms/volto-block-toc@6.0.0 - resolutions [EEA Jenkins - [`85ed36d`](https://github.com/eea/freshwater-frontend/commit/85ed36d6b0abf9708466c0762448afb497167d7a)]
20+
- Release @eeacms/volto-tabs-block@8.1.0 - resolutions [EEA Jenkins - [`1d6d76e`](https://github.com/eea/freshwater-frontend/commit/1d6d76e666fdd58fb39efd600599f2b54668b96a)]
21+
- Release @eeacms/volto-tags-block@3.0.0 - resolutions [EEA Jenkins - [`e9f4544`](https://github.com/eea/freshwater-frontend/commit/e9f4544b0eb51bc23902597f35362ec681920c25)]
22+
- Release @eeacms/volto-slate-footnote@7.0.1 - resolutions [EEA Jenkins - [`3d02d9f`](https://github.com/eea/freshwater-frontend/commit/3d02d9f5906ecb1c7fbb564f19f46e874092a084)]
23+
- Release @eeacms/volto-eea-kitkat@25.2.0 [EEA Jenkins - [`92421c2`](https://github.com/eea/freshwater-frontend/commit/92421c253749da58e9109bab88de5553e0e28469)]
24+
- Release @eeacms/volto-eea-map@5.0.3 [EEA Jenkins - [`4f2bcb0`](https://github.com/eea/freshwater-frontend/commit/4f2bcb0c8722b330229716ada8d3ab93ce98d2cf)]
25+
- Release @eeacms/volto-group-block@7.1.0 - resolutions [EEA Jenkins - [`9e2df20`](https://github.com/eea/freshwater-frontend/commit/9e2df2023e8a96e0a46b652665b2187ffc90dc77)]
26+
- Release @eeacms/volto-freshwater-policy@1.0.1 [EEA Jenkins - [`e904e1b`](https://github.com/eea/freshwater-frontend/commit/e904e1b5f79bc438e28ec9366eb1168d2aa76a98)]
27+
28+
#### :house: Internal changes
29+
30+
- chore: update to latest versions in package.json [laszlocseh - [`a4c915f`](https://github.com/eea/freshwater-frontend/commit/a4c915f0ec9f631e1ecf901cb332920c6702445b)]
31+
- chore: add @loadable/babel-plugin [nileshgulia1 - [`78fd184`](https://github.com/eea/freshwater-frontend/commit/78fd184fcc36e01a1534b313427b418aa76de3d0)]
32+
- chore: add @babel/plugin-proposal-throw-expressions [nileshgulia1 - [`ff13a8d`](https://github.com/eea/freshwater-frontend/commit/ff13a8d50f33d2cfae271bd8a451f7eb3de5e3ca)]
33+
34+
#### :house: Documentation changes
35+
36+
37+
#### :hammer_and_wrench: Others
38+
39+
- pin volto-freshwater-policy to 1.0.0 [nileshgulia1 - [`a7343a7`](https://github.com/eea/freshwater-frontend/commit/a7343a777ca91442c3a21c5a671d617db83dc304)]
740
### [1.23.0](https://github.com/eea/freshwater-frontend/compare/1.22.0...1.23.0) - 16 August 2024
841

942
#### :rocket: Dependency updates

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:16-slim
1+
FROM node:18-bullseye-slim
22

33
COPY . /app/
44
WORKDIR /app/
@@ -18,7 +18,7 @@ RUN runDeps="openssl ca-certificates patch gosu git make tmux locales-all" \
1818

1919
USER node
2020

21-
ARG MAX_OLD_SPACE_SIZE=8192
21+
ARG MAX_OLD_SPACE_SIZE=16384
2222
ARG RAZZLE_PREFIX_PATH=/freshwater
2323
ENV RAZZLE_PREFIX_PATH=$RAZZLE_PREFIX_PATH
2424
ENV NODE_OPTIONS=--max_old_space_size=$MAX_OLD_SPACE_SIZE

Jenkinsfile

Lines changed: 48 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,57 @@
11
pipeline {
22
environment {
3-
registry = "eeacms/freshwater-frontend"
4-
template = "templates/volto-freshwater"
53
RANCHER_STACKID = ""
64
RANCHER_ENVID = ""
5+
GIT_NAME = "freshwater-frontend"
6+
registry = "eeacms/freshwater-frontend"
7+
template = ""
78
dockerImage = ""
89
tagName = ""
9-
GIT_NAME = "freshwater-frontend"
1010
SONARQUBE_TAG = "water.europa.eu-freshwater"
1111
}
1212

1313
agent any
1414

15-
1615
stages {
1716

1817
stage('Integration tests') {
1918
parallel {
20-
stage('Cypress') {
21-
when {
22-
allOf {
23-
environment name: 'CHANGE_ID', value: ''
24-
not { branch 'master' }
25-
not { changelog '.*^Automated release [0-9\\.]+$' }
26-
not { buildingTag() }
27-
}
28-
}
29-
steps {
30-
node(label: 'docker') {
31-
script {
32-
try {
33-
sh '''docker pull eeacms/plone-backend; docker run --rm -d --name="$BUILD_TAG-plone" -e SITE="Plone" -e PROFILES="eea.kitkat:testing" eeacms/plone-backend'''
34-
sh '''docker pull eeacms/volto-project-ci; docker run -i --name="$BUILD_TAG-cypress" --link $BUILD_TAG-plone:plone -e GIT_NAME=$GIT_NAME -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" eeacms/volto-project-ci cypress'''
35-
} finally {
36-
try {
37-
sh '''rm -rf cypress-reports cypress-results'''
38-
sh '''mkdir -p cypress-reports cypress-results'''
39-
sh '''docker cp $BUILD_TAG-cypress:/opt/frontend/my-volto-project/cypress/videos cypress-reports/'''
40-
sh '''docker cp $BUILD_TAG-cypress:/opt/frontend/my-volto-project/cypress/reports cypress-results/'''
41-
archiveArtifacts artifacts: 'cypress-reports/videos/*.mp4', fingerprint: true
42-
}
43-
finally {
44-
catchError(buildResult: 'SUCCESS', stageResult: 'SUCCESS') {
45-
junit testResults: 'cypress-results/**/*.xml', allowEmptyResults: true
46-
}
47-
sh script: "docker stop $BUILD_TAG-plone", returnStatus: true
48-
sh script: "docker rm -v $BUILD_TAG-plone", returnStatus: true
49-
sh script: "docker rm -v $BUILD_TAG-cypress", returnStatus: true
50-
}
51-
}
52-
}
53-
}
54-
}
55-
}
19+
stage('Cypress') {
20+
when {
21+
allOf {
22+
environment name: 'CHANGE_ID', value: ''
23+
not { branch 'master' }
24+
not { changelog '.*^Automated release [0-9\\.]+$' }
25+
not { buildingTag() }
26+
}
27+
}
28+
steps {
29+
node(label: 'docker') {
30+
script {
31+
try {
32+
sh '''docker pull plone; docker run -d --name="$BUILD_TAG-plone" -e SITE="Plone" -e PROFILES="profile-plone.restapi:blocks" plone fg'''
33+
sh '''docker pull eeacms/volto-project-ci; docker run -i --name="$BUILD_TAG-cypress" --link $BUILD_TAG-plone:plone -e GIT_NAME=$GIT_NAME -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" eeacms/volto-project-ci cypress'''
34+
} finally {
35+
try {
36+
sh '''rm -rf cypress-reports cypress-results'''
37+
sh '''mkdir -p cypress-reports cypress-results'''
38+
sh '''docker cp $BUILD_TAG-cypress:/opt/frontend/my-volto-project/cypress/videos cypress-reports/'''
39+
sh '''docker cp $BUILD_TAG-cypress:/opt/frontend/my-volto-project/cypress/reports cypress-results/'''
40+
archiveArtifacts artifacts: 'cypress-reports/videos/*.mp4', fingerprint: true
41+
}
42+
finally {
43+
catchError(buildResult: 'SUCCESS', stageResult: 'SUCCESS') {
44+
junit testResults: 'cypress-results/**/*.xml', allowEmptyResults: true
45+
}
46+
sh script: "docker stop $BUILD_TAG-plone", returnStatus: true
47+
sh script: "docker rm -v $BUILD_TAG-plone", returnStatus: true
48+
sh script: "docker rm -v $BUILD_TAG-cypress", returnStatus: true
49+
}
50+
}
51+
}
52+
}
53+
}
54+
}
5655

5756
stage("Docker test build") {
5857
when {
@@ -127,7 +126,10 @@ pipeline {
127126

128127
stage('Build & Push ( on tag )') {
129128
when {
130-
buildingTag()
129+
anyOf {
130+
buildingTag()
131+
branch 'volto-17'
132+
}
131133
}
132134
steps{
133135
node(label: 'docker-host') {
@@ -166,6 +168,9 @@ pipeline {
166168

167169
stage('Upgrade demo ( on tag )') {
168170
when {
171+
not {
172+
environment name: 'RANCHER_STACKID', value: ''
173+
}
169174
buildingTag()
170175
}
171176
steps {
@@ -199,6 +204,8 @@ pipeline {
199204
}
200205
}
201206

207+
208+
202209
post {
203210
always {
204211
cleanWs(cleanWhenAborted: true, cleanWhenFailure: true, cleanWhenNotBuilt: true, cleanWhenSuccess: true, cleanWhenUnstable: true, deleteDirs: true)

Makefile

Lines changed: 44 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -1,93 +1,67 @@
1-
##############################################################################
2-
# Run:
3-
# make
4-
# make start
5-
#
6-
# Go to:
7-
#
8-
# http://localhost:3000
9-
#
10-
##############################################################################
11-
# SETUP MAKE
12-
#
13-
## Defensive settings for make: https://tech.davis-hansson.com/p/make/
1+
# Yeoman Volto App development
2+
3+
### Defensive settings for make:
4+
# https://tech.davis-hansson.com/p/make/
145
SHELL:=bash
156
.ONESHELL:
16-
# for Makefile debugging purposes add -x to the .SHELLFLAGS
17-
.SHELLFLAGS:=-eu -o pipefail -O inherit_errexit -c
7+
.SHELLFLAGS:=-xeu -o pipefail -O inherit_errexit -c
188
.SILENT:
199
.DELETE_ON_ERROR:
2010
MAKEFLAGS+=--warn-undefined-variables
2111
MAKEFLAGS+=--no-builtin-rules
2212

23-
# Colors
24-
# OK=Green, warn=yellow, error=red
25-
ifeq ($(TERM),)
26-
# no colors if not in terminal
27-
MARK_COLOR=
28-
OK_COLOR=
29-
WARN_COLOR=
30-
ERROR_COLOR=
31-
NO_COLOR=
32-
else
33-
MARK_COLOR=`tput setaf 6`
34-
OK_COLOR=`tput setaf 2`
35-
WARN_COLOR=`tput setaf 3`
36-
ERROR_COLOR=`tput setaf 1`
37-
NO_COLOR=`tput sgr0`
38-
endif
13+
# Project settings
14+
15+
DIR=$(shell basename $$(pwd))
16+
ADDON ?= "freshwater-frontend"
17+
18+
# Recipe snippets for reuse
19+
20+
# We like colors
21+
# From: https://coderwall.com/p/izxssa/colored-makefile-for-golang-projects
22+
RED=`tput setaf 1`
23+
GREEN=`tput setaf 2`
24+
RESET=`tput sgr0`
25+
YELLOW=`tput setaf 3`
3926

40-
##############################################################################
4127

4228
# Top-level targets
4329
.PHONY: all
44-
all: develop install
30+
all: project
4531

46-
.PHONY: develop
47-
develop: ## Runs missdev in the local project (mrs.developer.json should be present)
48-
npx -p mrs-developer missdev --config=jsconfig.json --output=addons --fetch-https
32+
.PHONY: start-test-backend
33+
start-test-backend: ## Start Test Plone Backend
34+
@echo "$(GREEN)==> Start Test Plone Backend$(RESET)"
35+
docker run -i --rm -e ZSERVER_HOST=0.0.0.0 -e ZSERVER_PORT=55001 -p 55001:55001 -e VERSIONS="plone.restapi=8.17.0 plone.rest=2.0.0a1 plone.app.vocabularies=4.3.0" -e APPLY_PROFILES=plone.app.contenttypes:plone-content,plone.restapi:default,plone.volto:default-homepage -e CONFIGURE_PACKAGES=plone.app.contenttypes,plone.restapi,plone.volto,plone.volto.cors -e ADDONS='plone.app.robotframework plone.app.contenttypes plone.restapi plone.volto' plone ./bin/robot-server plone.app.robotframework.testing.PLONE_ROBOT_TESTING
36+
37+
.PHONY: start-backend-docker
38+
start-backend-docker: ## Starts a Docker-based backend
39+
@echo "$(GREEN)==> Start Docker-based Plone Backend$(RESET)"
40+
docker run -it --rm --name=plone -p 8080:8080 -e VERSIONS="plone.restapi=8.17.0 plone.rest=2.0.0a1 plone.app.vocabularies=4.3.0" -e SITE=Plone -e ADDONS="plone.volto" -e ZCML="plone.volto.cors" plone
41+
42+
.PHONY: help
43+
help: ## Show this help.
44+
@echo -e "$$(grep -hE '^\S+:.*##' $(MAKEFILE_LIST) | sed -e 's/:.*##\s*/:/' -e 's/^\(.\+\):\(.*\)/\\x1b[36m\1\\x1b[m:\2/' | column -c2 -t -s :)"
4945

5046
.PHONY: install
51-
install: ## Frontend: Install project and add-ons
47+
install: ## Install the frontend
48+
@echo "Install frontend"
49+
$(MAKE) omelette
50+
$(MAKE) preinstall
5251
yarn install
5352

54-
.PHONY: start
55-
start: ## Frontend: Start
56-
yarn start
53+
.PHONY: preinstall
54+
preinstall: ## Preinstall task, checks if missdev (mrs-developer) is present and runs it
55+
if [ -f $$(pwd)/mrs.developer.json ]; then make develop; fi
56+
57+
.PHONY: develop
58+
develop: ## Runs missdev in the local project (mrs.developer.json should be present)
59+
npx -p mrs-developer missdev --config=jsconfig.json --output=addons --fetch-https
5760

5861
.PHONY: omelette
5962
omelette: ## Creates the omelette folder that contains a link to the installed version of Volto (a softlink pointing to node_modules/@plone/volto)
6063
if [ ! -d omelette ]; then ln -sf node_modules/@plone/volto omelette; fi
6164

6265
.PHONY: patches
6366
patches:
64-
/bin/bash patches/patchit.sh > /dev/null 2>&1 ||true
65-
66-
.PHONY: release
67-
release: ## Show release candidates
68-
./scripts/release.py -v
69-
70-
.PHONY: update
71-
update: ## git pull all src/addons
72-
./scripts/update.sh
73-
74-
.PHONY: issues
75-
issues: ## Check github for open pull-requests
76-
./scripts/pull-requests.py WARN
77-
78-
.PHONY: issues-all
79-
issues-all: ## Check github for open pull-requests
80-
./scripts/pull-requests-volto.py WARN
81-
82-
.PHONY: status
83-
status: ## Check src/addons for changes
84-
./scripts/status.sh
85-
86-
.PHONY: pull
87-
pull: ## Run git pull on all src/addons
88-
./scripts/pull.sh
89-
90-
.PHONY: help
91-
help: ## Show this help.
92-
@echo -e "$$(grep -hE '^\S+:.*##' $(MAKEFILE_LIST) | sed -e 's/:.*##\s*/:/' -e 's/^\(.\+\):\(.*\)/\\x1b[36m\1\\x1b[m:\2/' | column -c2 -t -s :)"
93-
head -n 10 Makefile
67+
/bin/bash patches/patchit.sh > /dev/null 2>&1 ||true

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[![Release](https://img.shields.io/github/v/release/eea/freshwater-frontend?sort=semver)](https://github.com/eea/freshwater-frontend/releases)
44
[![Pipeline](https://ci.eionet.europa.eu/buildStatus/icon?job=volto%2Ffreshwater-frontend%2Fmaster&subject=master)](https://ci.eionet.europa.eu/view/Github/job/volto/job/freshwater-frontend/job/master/lastBuild/display/redirect)
55
[![Pipeline](https://ci.eionet.europa.eu/buildStatus/icon?job=volto%2Ffreshwater-frontend%2Fdevelop&subject=develop)](https://ci.eionet.europa.eu/view/Github/job/volto/job/freshwater-frontend/job/develop/lastBuild/display/redirect)
6-
[![Release pipeline](https://ci.eionet.europa.eu/buildStatus/icon?job=volto%2Ffreshwater-frontend%2F1.23.0&build=last&subject=release%20v1.23.0%20pipeline)](https://ci.eionet.europa.eu/view/Github/job/volto/job/freshwater-frontend/job/1.23.0/lastBuild/display/redirect/)
6+
[![Release pipeline](https://ci.eionet.europa.eu/buildStatus/icon?job=volto%2Ffreshwater-frontend%2F2.0.0&build=last&subject=release%20v2.0.0%20pipeline)](https://ci.eionet.europa.eu/view/Github/job/volto/job/freshwater-frontend/job/2.0.0/lastBuild/display/redirect/)
77

88
## Documentation
99

cypress.config.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ const { defineConfig } = require('cypress');
22

33
module.exports = defineConfig({
44
viewportWidth: 1280,
5-
defaultCommandTimeout: 10000,
5+
defaultCommandTimeout: 8888,
66
chromeWebSecurity: false,
77
reporter: 'junit',
88
video: true,
@@ -18,11 +18,9 @@ module.exports = defineConfig({
1818
e2e: {
1919
setupNodeEvents(on, config) {
2020
// e2e testing node events setup code
21-
require('@cypress/code-coverage/task')(on, config);
22-
require('cypress-fail-fast/plugin')(on, config);
21+
2322
return config;
2423
},
2524
baseUrl: 'http://localhost:3000',
2625
},
2726
});
28-

0 commit comments

Comments
 (0)