Skip to content

Commit

Permalink
Merge pull request #17 from eea/develop
Browse files Browse the repository at this point in the history
Improve fields name and description
  • Loading branch information
tiberiuichim authored Sep 15, 2023
2 parents 9b6c421 + f8a8e40 commit 3a54cc4
Show file tree
Hide file tree
Showing 17 changed files with 491 additions and 79 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
1 change: 0 additions & 1 deletion .i18n.babel.config.js

This file was deleted.

19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,25 @@ 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.5.3](https://github.com/eea/volto-slate-label/compare/0.5.2...0.5.3) - 15 September 2023

#### :house: Internal changes

- style: lint-staged reorder in package.json [Alin Voinea - [`1801ba8`](https://github.com/eea/volto-slate-label/commit/1801ba849d085eb63dcc1faedc849e716e6661d0)]

#### :house: Documentation changes

- docs: Cleanup Makefile, update DEVELOP documentation, i18n - refs #254894 [valentinab25 - [`c4f5f73`](https://github.com/eea/volto-slate-label/commit/c4f5f7300671ee13331c803593b0741f53d21c22)]

#### :hammer_and_wrench: Others

- Refs #257521 - Add Simple style as default for labels. [GhitaB - [`ba2e66e`](https://github.com/eea/volto-slate-label/commit/ba2e66eafdb7a3a77185c5c0b90b05e9afb9ede1)]
- Refs #257521 - Improve texts for label and tooltip. [GhitaB - [`d9496e0`](https://github.com/eea/volto-slate-label/commit/d9496e0f30fc3091d30ac8c916761287d51555c6)]
- test: EN locales, pre-commit fix, feature PRs checks Refs #257193 [valentinab25 - [`778f07d`](https://github.com/eea/volto-slate-label/commit/778f07dc3b0713a094a89fc04e4a943cad9de4f8)]
- test: Fix package.json scripts to use makefile [Alin Voinea - [`872eaf9`](https://github.com/eea/volto-slate-label/commit/872eaf9e16be65890e1ba942935c0a7a47ac2aca)]
- i18n: Add en [Alin Voinea - [`12ef506`](https://github.com/eea/volto-slate-label/commit/12ef506c27d8810836968f137d9e6a1711fdf64e)]
- test: Update Makefile and docker-compose to align it with Jenkinsfile [valentinab25 - [`e9b984b`](https://github.com/eea/volto-slate-label/commit/e9b984b42d3428ab737c02ffd480d2f6de393652)]
- Add Sonarqube tag using freshwater-frontend addons list [EEA Jenkins - [`c85d929`](https://github.com/eea/volto-slate-label/commit/c85d929a5637eb15bca13b4761b5ac08d8d29d79)]
### [0.5.2](https://github.com/eea/volto-slate-label/compare/0.5.1...0.5.2) - 14 June 2023

### [0.5.1](https://github.com/eea/volto-slate-label/compare/0.5.0...0.5.1) - 12 June 2023
Expand Down
56 changes: 56 additions & 0 deletions DEVELOP.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,28 @@

## Develop

1. Make sure you have `docker` and `docker compose` installed and running on your machine:

```Bash
git clone https://github.com/eea/volto-slate-label.git
cd volto-slate-label
git checkout -b bugfix-123456 develop
make
make start
```

1. Wait for `Volto started at 0.0.0.0:3000` meesage

1. Go to http://localhost:3000

1. Happy hacking!

```Bash
cd src/addons/volto-slate-label/
```

### Or add @eeacms/volto-slate-label 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/)

1. Make sure you have installed `yo`, `@plone/generator-volto` and `mrs-developer`
Expand Down Expand Up @@ -50,3 +72,37 @@ Before starting make sure your development environment is properly set. See [Vol

cd src/addons/volto-slate-label/
o-addon-template/

## Cypress

To run cypress locally, first make sure you don't have any Volto/Plone running on ports `8080` and `3000`.
You don't have to be in a `clean-volto-project`, you can be in any Volto Frontend
project where you added `volto-slate-label` to `mrs.developer.json`

Go to:

```BASH
cd src/addons/volto-slate-label/
```

Start:

```Bash
make
make start
```

This will build and start with Docker a clean `Plone backend` and `Volto Frontend` with `volto-slate-label` block installed.

Open Cypress Interface:

```Bash
make cypress-open
```

Or run it:

```Bash
make cypress-run
```
14 changes: 14 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# syntax=docker/dockerfile:1
ARG VOLTO_VERSION
FROM plone/frontend-builder:${VOLTO_VERSION}

ARG ADDON_NAME
ARG ADDON_PATH

COPY --chown=node:node ./ /app/src/addons/${ADDON_PATH}/

RUN /setupAddon
RUN yarn install

ENTRYPOINT ["yarn"]
CMD ["start"]
85 changes: 67 additions & 18 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pipeline {
environment {
GIT_NAME = "volto-slate-label"
NAMESPACE = "@eeacms"
SONARQUBE_TAGS = "volto.eea.europa.eu,demo-www.eea.europa.eu,forest.eea.europa.eu,clmsdemo.devel6cph.eea.europa.eu,water.europa.eu-marine,biodiversity.europa.eu,climate-adapt.eea.europa.eu,climate-energy.eea.europa.eu,climate-advisory-board.devel4cph.eea.europa.eu,climate-advisory-board.europa.eu,www.eea.europa.eu-ims,www.eea.europa.eu-en,industry.eea.europa.eu"
SONARQUBE_TAGS = "volto.eea.europa.eu,demo-www.eea.europa.eu,forest.eea.europa.eu,clmsdemo.devel6cph.eea.europa.eu,water.europa.eu-marine,biodiversity.europa.eu,climate-adapt.eea.europa.eu,climate-energy.eea.europa.eu,climate-advisory-board.devel4cph.eea.europa.eu,climate-advisory-board.europa.eu,www.eea.europa.eu-ims,www.eea.europa.eu-en,industry.eea.europa.eu,water.europa.eu-freshwater"
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 @@ -197,6 +215,37 @@ pipeline {
}
}

stage('SonarQube compare to master') {
when {
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 {
node(label: 'docker') {
script {
sh '''docker pull eeacms/gitflow'''
sh '''echo "Error" > checkresult.txt'''
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
sh '''set -o pipefail; docker run -i --rm --name="$BUILD_TAG-gitflow-sn" -e GIT_BRANCH="$BRANCH_NAME" -e GIT_NAME="$GIT_NAME" eeacms/gitflow /checkSonarqubemaster.sh | grep -v "Found script" | tee checkresult.txt'''
}

publishChecks name: 'SonarQube', title: 'Sonarqube Code Quality Check', summary: "Quality check on the SonarQube metrics from branch develop, comparing it with the ones from master branch. No bugs are allowed",
text: readFile(file: 'checkresult.txt'), conclusion: "${currentBuild.currentResult}",
detailsURL: "${env.BUILD_URL}display/redirect"
}
}
}
}

stage('Pull Request') {
when {
not {
Expand Down
Loading

0 comments on commit 3a54cc4

Please sign in to comment.