Skip to content

Commit

Permalink
Merge pull request #24 from eea/develop
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
avoinea committed Sep 29, 2023
2 parents 5e359dc + 4606a2f commit e82a0f5
Show file tree
Hide file tree
Showing 15 changed files with 465 additions and 52 deletions.
2 changes: 2 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[ -n "$CI" ] && exit 0
yarn lint-staged
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,24 @@ 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.4.5](https://github.com/eea/volto-nextcloud-video-block/compare/0.4.4...0.4.5) - 29 September 2023

#### :house: Internal changes

- style: lint-staged reorder in package.json [Alin Voinea - [`8d401dd`](https://github.com/eea/volto-nextcloud-video-block/commit/8d401ddf8061d3fe971a16f9b2643f532f28e685)]

#### :house: Documentation changes

- docs: Update README and DEVELOP [Alin Voinea - [`54d7dec`](https://github.com/eea/volto-nextcloud-video-block/commit/54d7dec9d5aecfc38e8e0a3c059836b3bc1f776a)]

#### :hammer_and_wrench: Others

- Add Sonarqube tag using forests-frontend addons list [EEA Jenkins - [`b3fe0a2`](https://github.com/eea/volto-nextcloud-video-block/commit/b3fe0a2cf89d9fd8e2f65c1b4206a1f9a5b8bb74)]
- test: EN locales, pre-commit fix, feature PRs checks Refs #257193 [valentinab25 - [`f768b7c`](https://github.com/eea/volto-nextcloud-video-block/commit/f768b7ccda394e8f260c95f3f1a71819ea4bba88)]
- test: Fix eslint and yarn i18n [Alin Voinea - [`7412fe7`](https://github.com/eea/volto-nextcloud-video-block/commit/7412fe7de8a8697f2bfd9dd1b0bf7ef8c949c88b)]
- i18n: Add en [Alin Voinea - [`9d01288`](https://github.com/eea/volto-nextcloud-video-block/commit/9d0128842887d397d8115fa075d27d8e66b4cbf5)]
- test: Update Makefile and docker-compose to align it with Jenkinsfile [valentinab25 - [`2962d47`](https://github.com/eea/volto-nextcloud-video-block/commit/2962d476c1e82f59dd2698161ea953305a750538)]
- Add Sonarqube tag using freshwater-frontend addons list [EEA Jenkins - [`31a4525`](https://github.com/eea/volto-nextcloud-video-block/commit/31a4525b41d98112ef036034f35990d58c86d367)]
### [0.4.4](https://github.com/eea/volto-nextcloud-video-block/compare/0.4.3...0.4.4) - 4 August 2023

#### :house: Documentation changes
Expand Down
13 changes: 6 additions & 7 deletions DEVELOP.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,14 @@

1. Go to http://localhost:3000

1. Happy hacking!
1. Initialize git hooks

```Bash
cd src/addons/volto-nextcloud-video-block/
yarn prepare
```

1. Happy hacking!

### Or add @eeacms/volto-nextcloud-video-block to your Volto project

Before starting make sure your development environment is properly set. See [Volto Developer Documentation](https://docs.voltocms.com/getting-started/install/)
Expand All @@ -48,18 +50,15 @@ Before starting make sure your development environment is properly set. See [Vol

1. Install

yarn develop
make develop
yarn

1. Start backend

docker pull plone
docker run -d --name plone -p 8080:8080 -e SITE=Plone -e PROFILES="profile-plone.restapi:blocks" plone
docker run --pull always -it --rm --name plone -p 8080:8080 -e SITE=Plone plone/plone-backend

...wait for backend to setup and start - `Ready to handle requests`:

docker logs -f plone

...you can also check http://localhost:8080/Plone

1. Start frontend
Expand Down
68 changes: 46 additions & 22 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pipeline {
environment {
GIT_NAME = "volto-nextcloud-video-block"
NAMESPACE = "@eeacms"
SONARQUBE_TAGS = "volto.eea.europa.eu,demo-www.eea.europa.eu,www.eea.europa.eu-en,climate-advisory-board.europa.eu,clmsdemo.devel6cph.eea.europa.eu,climate-adapt.eea.europa.eu,biodiversity.europa.eu,water.europa.eu-marine,industry.eea.europa.eu,climate-energy.eea.europa.eu"
SONARQUBE_TAGS = "volto.eea.europa.eu,demo-www.eea.europa.eu,www.eea.europa.eu-en,climate-advisory-board.europa.eu,clmsdemo.devel6cph.eea.europa.eu,climate-adapt.eea.europa.eu,biodiversity.europa.eu,water.europa.eu-marine,industry.eea.europa.eu,climate-energy.eea.europa.eu,water.europa.eu-freshwater,forest.eea.europa.eu"
DEPENDENCIES = ""
VOLTO = ""
}
Expand Down Expand Up @@ -62,11 +62,17 @@ pipeline {

stage('Tests') {
when {
allOf {
environment name: 'CHANGE_ID', value: ''
anyOf {
not { changelog '.*^Automated release [0-9\\.]+$' }
branch 'master'
anyOf {
allOf {
not { environment name: 'CHANGE_ID', value: '' }
environment name: 'CHANGE_TARGET', value: 'develop'
}
allOf {
environment name: 'CHANGE_ID', value: ''
anyOf {
not { changelog '.*^Automated release [0-9\\.]+$' }
branch 'master'
}
}
}
}
Expand Down Expand Up @@ -110,11 +116,17 @@ pipeline {

stage('Integration tests') {
when {
allOf {
environment name: 'CHANGE_ID', value: ''
anyOf {
not { changelog '.*^Automated release [0-9\\.]+$' }
branch 'master'
anyOf {
allOf {
not { environment name: 'CHANGE_ID', value: '' }
environment name: 'CHANGE_TARGET', value: 'develop'
}
allOf {
environment name: 'CHANGE_ID', value: ''
anyOf {
not { changelog '.*^Automated release [0-9\\.]+$' }
branch 'master'
}
}
}
}
Expand Down Expand Up @@ -167,13 +179,19 @@ pipeline {

stage('Report to SonarQube') {
when {
allOf {
environment name: 'CHANGE_ID', value: ''
anyOf {
branch 'master'
allOf {
branch 'develop'
not { changelog '.*^Automated release [0-9\\.]+$' }
anyOf {
allOf {
not { environment name: 'CHANGE_ID', value: '' }
environment name: 'CHANGE_TARGET', value: 'develop'
}
allOf {
environment name: 'CHANGE_ID', value: ''
anyOf {
allOf {
branch 'develop'
not { changelog '.*^Automated release [0-9\\.]+$' }
}
branch 'master'
}
}
}
Expand All @@ -199,10 +217,16 @@ pipeline {

stage('SonarQube compare to master') {
when {
allOf {
environment name: 'CHANGE_ID', value: ''
branch 'develop'
not { changelog '.*^Automated release [0-9\\.]+$' }
anyOf {
allOf {
not { environment name: 'CHANGE_ID', value: '' }
environment name: 'CHANGE_TARGET', value: 'develop'
}
allOf {
environment name: 'CHANGE_ID', value: ''
branch 'develop'
not { changelog '.*^Automated release [0-9\\.]+$' }
}
}
}
steps {
Expand Down
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@ start: ## Start development environment
echo "Running: ${DOCKER_COMPOSE} up"
${DOCKER_COMPOSE} up

.PHONY: shell
shell: ## Start a shell in the frontend container
echo "Running: ${DOCKER_COMPOSE} run frontend bash"
${DOCKER_COMPOSE} run --entrypoint=bash frontend

.PHONY: cypress-open
cypress-open: ## Open cypress integration tests
NODE_ENV=development $(NODE_MODULES)/cypress/bin/cypress open
Expand Down
33 changes: 18 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,24 @@
This add-on only allows playback from Nextcloud videos, from a selection of allowed domains.
![Nextcloud](https://github.com/eea/volto-nextcloud-video-block/raw/develop/docs/Nextcloud-video.gif)

Add `whitelist`` in **index.js**:

```JSON

const applyConfig = (config) => {
config.blocks.blocksConfig.nextCloudVideo = {
....
whiteList: [
'https://cmshare.eea.europa.eu',
'https://shareit.eea.europa.eu',
],
....
};

return config;
};

```

## Getting started

Expand Down Expand Up @@ -70,21 +88,6 @@ Go to http://localhost:3000
yarn
yarn start
```
1. Add whitelist in index.js
```JSON
const applyConfig = (config) => {
config.blocks.blocksConfig.nextCloudVideo = {
....
whiteList: [
'https://cmshare.eea.europa.eu',
'https://shareit.eea.europa.eu',
],
....
};

return config;
};
```

1. Go to http://localhost:3000

Expand Down
4 changes: 2 additions & 2 deletions cypress.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ const { defineConfig } = require('cypress');

module.exports = defineConfig({
viewportWidth: 1280,
defaultCommandTimeout: 8888,
defaultCommandTimeout: 5000,
chromeWebSecurity: false,
reporter: 'junit',
video: true,
retries: {
runMode: 8,
runMode: 1,
openMode: 0,
},
reporterOptions: {
Expand Down
6 changes: 5 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
version: "3"
services:
backend:
image: plone/plone-backend:${PLONE_VERSION:-6}
image: eeacms/plone-backend
ports:
- "8080:8080"
environment:
SITE: "Plone"
PROFILES: "eea.kitkat:testing"

frontend:
build:
Expand All @@ -23,6 +24,9 @@ services:
volumes:
- ./:/app/src/addons/${ADDON_PATH}
environment:
CI: "true"
NODE_ENV: "development"
RAZZLE_JEST_CONFIG: "src/addons/${ADDON_PATH}/jest-addon.config.js"
RAZZLE_INTERNAL_API_PATH: "http://backend:8080/Plone"
RAZZLE_DEV_PROXY_API_PATH: "http://backend:8080/Plone"
HOST: "0.0.0.0"
64 changes: 64 additions & 0 deletions locales/de/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,68 @@ msgstr ""
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#: NextCloud/schema
# defaultMessage: Alignment
msgid "Alignment"
msgstr ""

#: NextCloud/schema
# defaultMessage: File
msgid "File"
msgstr ""

#: NextCloud/schema
# defaultMessage: Language
msgid "Language"
msgstr ""

#: NextCloud/VideoSidebar
# defaultMessage: No Video selected
msgid "No Video selected"
msgstr ""

#: NextCloud/NextCloudVideoEdit
# defaultMessage: Please enter a valid video URL, starting with:
msgid "Please enter a valid video URL, starting with: "
msgstr ""

#: NextCloud/schema
# defaultMessage: Preview Image URL
msgid "Preview Image URL"
msgstr ""

#: NextCloud/NextCloudVideoEdit
# defaultMessage: Specify a NextCloud video or playlist url
msgid "Specify a NextCloud video or playlist url"
msgstr ""

#: NextCloud/schema
# defaultMessage: Title
msgid "Title"
msgstr ""

#: NextCloud/schema
#: NextCloud/VideoSidebar
# defaultMessage: Video
msgid "Video"
msgstr ""

#: NextCloud/schema
# defaultMessage: Video Autoplay
msgid "Video Autoplay"
msgstr ""

#: NextCloud/schema
# defaultMessage: Video Loop
msgid "Video Loop"
msgstr ""

#: NextCloud/schema
# defaultMessage: Video URL
msgid "Video URL"
msgstr ""

#: NextCloud/NextCloudVideoEdit
# defaultMessage: Video URL (NextCloud)
msgid "Video URL (NextCloud)"
msgstr ""

0 comments on commit e82a0f5

Please sign in to comment.