Skip to content

Commit

Permalink
Merge pull request #22 from eea/develop
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
avoinea authored Sep 28, 2023
2 parents b6c55db + c947eac commit ab72ec3
Show file tree
Hide file tree
Showing 21 changed files with 996 additions and 125 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.

38 changes: 18 additions & 20 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,39 @@ 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).

### [4.1.4](https://github.com/eea/volto-call-to-action-block/compare/4.1.3...4.1.4) - 16 June 2023
### [4.2.0](https://github.com/eea/volto-call-to-action-block/compare/4.1.4...4.2.0) - 28 September 2023

#### :rocket: New Features

- feat: I18n and docs update [Alin Voinea - [`f7b80e8`](https://github.com/eea/volto-call-to-action-block/commit/f7b80e8d9791b1d1ed69b2b3b28578f97be81ad5)]

#### :house: Internal changes

- chore: Fix dependencies pin [Alin Voinea - [`16bc89d`](https://github.com/eea/volto-call-to-action-block/commit/16bc89db73885399eb1fe15f92d886f16037f07c)]
- style: lint-staged reorder in package.json [Alin Voinea - [`1fde0b2`](https://github.com/eea/volto-call-to-action-block/commit/1fde0b2726c52acdb1a0d590b9919a15eed487f3)]

#### :house: Documentation changes

- docs: Cleanup Makefile, update DEVELOP documentation, i18n - refs #254894 [valentinab25 - [`390eb9e`](https://github.com/eea/volto-call-to-action-block/commit/390eb9e0da885d978855aa51978faf25fd972c89)]

#### :hammer_and_wrench: Others

- test: Temp. disable SonarQube coverage to be able to release [Alin Voinea - [`760e1eb`](https://github.com/eea/volto-call-to-action-block/commit/760e1eb2079c9f294b6fd942331813c3f041fc8e)]
- test: EN locales, pre-commit fix, feature PRs checks Refs #257193 [valentinab25 - [`8522a41`](https://github.com/eea/volto-call-to-action-block/commit/8522a4181a5a622c2e30482dee26cd740d6c3d09)]
- i18n: Add en [Alin Voinea - [`be35c5d`](https://github.com/eea/volto-call-to-action-block/commit/be35c5dc9ba4f29d5abd6c8eb261371e8daf23bf)]
- test: Update Makefile and docker-compose to align it with Jenkinsfile [valentinab25 - [`567a4ac`](https://github.com/eea/volto-call-to-action-block/commit/567a4ac159360e799ddc5fdcdbef5ec1e453dbe9)]
### [4.1.4](https://github.com/eea/volto-call-to-action-block/compare/4.1.3...4.1.4) - 16 June 2023

### [4.1.3](https://github.com/eea/volto-call-to-action-block/compare/4.1.2...4.1.3) - 14 June 2023

### [4.1.2](https://github.com/eea/volto-call-to-action-block/compare/4.1.1...4.1.2) - 12 June 2023

#### :house: Internal changes

- chore: [JENKINS] Deprecate circularity website [valentinab25 - [`2e2d8ad`](https://github.com/eea/volto-call-to-action-block/commit/2e2d8ad039cd60ac5391b63d5359b5bf7cb4d4a5)]

#### :hammer_and_wrench: Others

- test: jest should look for addons in node_modules Refs #253277 [valentinab25 - [`e9c4a3f`](https://github.com/eea/volto-call-to-action-block/commit/e9c4a3f6fd4ecad1e1ff2ef28876dcb500ecd4b3)]
- test: Fix test config, coverage Refs #253277 [valentinab25 - [`8a67d7f`](https://github.com/eea/volto-call-to-action-block/commit/8a67d7f21794a33976bbf46b84309cca0c9e58fd)]
- Add Sonarqube tag using industry-frontend addons list [EEA Jenkins - [`3ae3cb5`](https://github.com/eea/volto-call-to-action-block/commit/3ae3cb51c08b53530cca88921fd8bbc097fa6b70)]
### [4.1.1](https://github.com/eea/volto-call-to-action-block/compare/4.1.0...4.1.1) - 4 April 2023

#### :nail_care: Enhancements
Expand All @@ -34,8 +48,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### :hammer_and_wrench: Others

- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`8911bba`](https://github.com/eea/volto-call-to-action-block/commit/8911bbadbe3036432c8d083cc836d3ab7f36c01c)]
- Add Sonarqube tag using ims-frontend addons list [EEA Jenkins - [`d58685c`](https://github.com/eea/volto-call-to-action-block/commit/d58685ca755e59cd77090ddeb446855d56a73876)]
## [4.0.0](https://github.com/eea/volto-call-to-action-block/compare/3.0.1...4.0.0) - 7 February 2023

#### :nail_care: Enhancements
Expand All @@ -55,17 +67,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### :hammer_and_wrench: Others

- Add Sonarqube tag using advisory-board-frontend addons list [EEA Jenkins - [`e46fb39`](https://github.com/eea/volto-call-to-action-block/commit/e46fb392ba15f9280e1a2d91b38e4acaa3105486)]
- Add Sonarqube tag using advisory-board-frontend addons list [EEA Jenkins - [`184e4d5`](https://github.com/eea/volto-call-to-action-block/commit/184e4d527764cbb754398b7c1975268c0eacdc86)]
- Add Sonarqube tag using climate-energy-frontend addons list [EEA Jenkins - [`8ff40cc`](https://github.com/eea/volto-call-to-action-block/commit/8ff40cc8fb5087bd0f56fbc3e38a26f5d61d63fa)]
- test(Jenkins): Run tests and cypress with latest canary @plone/volto [Alin Voinea - [`d1ba7b8`](https://github.com/eea/volto-call-to-action-block/commit/d1ba7b844f114305604e7f8c8b3158746dd59a7b)]
- Add Sonarqube tag using cca-frontend addons list [EEA Jenkins - [`4dea109`](https://github.com/eea/volto-call-to-action-block/commit/4dea10962560c760c2c44db27d3446a4268ded57)]
- Add Sonarqube tag using bise-frontend addons list [EEA Jenkins - [`fd6b7f3`](https://github.com/eea/volto-call-to-action-block/commit/fd6b7f31d28e05ed254a32bb213ad662e2635c96)]
- yarn 3 [Alin Voinea - [`8bfd09a`](https://github.com/eea/volto-call-to-action-block/commit/8bfd09a161d1d0b3174585c172a3804e56315dea)]
- Add Sonarqube tag using marine-frontend addons list [EEA Jenkins - [`440cd71`](https://github.com/eea/volto-call-to-action-block/commit/440cd71451fd5d5ef0316b5c74b61e66170444a7)]
- Add Sonarqube tag using clms-frontend addons list [EEA Jenkins - [`e05f0dd`](https://github.com/eea/volto-call-to-action-block/commit/e05f0dd0cf782872b4105f3305c7f40ccb69cbb9)]
- Add Sonarqube tag using demo-kitkat-frontend addons list [EEA Jenkins - [`6d44be8`](https://github.com/eea/volto-call-to-action-block/commit/6d44be88d8aabd57a8b74a3e16be7032dfda5eee)]
- Add Sonarqube tag using forests-frontend addons list [EEA Jenkins - [`4867cf3`](https://github.com/eea/volto-call-to-action-block/commit/4867cf362a91ea38bded8598d1937d33b35a12ab)]
## [2.0.0](https://github.com/eea/volto-call-to-action-block/compare/1.0.0...2.0.0) - 16 November 2022

#### :nail_care: Enhancements
Expand All @@ -75,7 +77,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
#### :hammer_and_wrench: Others

- test(estlint): Fix .project.eslintrc.js [Alin Voinea - [`39e8df4`](https://github.com/eea/volto-call-to-action-block/commit/39e8df468509414924327917154f035235ec5798)]
- Add Sonarqube tag using circularity-frontend addons list [EEA Jenkins - [`0e06348`](https://github.com/eea/volto-call-to-action-block/commit/0e06348412feed9eeea6ae5d06ae59b8c21e4eff)]
- test(cypress): Rename [Alin Voinea - [`ef8b823`](https://github.com/eea/volto-call-to-action-block/commit/ef8b82323a0c108e58f73c180f5b4cb23ed04f0e)]
## [1.0.0](https://github.com/eea/volto-call-to-action-block/compare/0.2.4...1.0.0) - 28 October 2022

Expand All @@ -89,15 +90,13 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- test(cypress): Fix typo [Alin Voinea - [`f3cc342`](https://github.com/eea/volto-call-to-action-block/commit/f3cc3424ace81d26b296882b8484d6b6b12b0d28)]
- Cleanup [Alin Voinea - [`2e63ef6`](https://github.com/eea/volto-call-to-action-block/commit/2e63ef665d3812d44b6a87bac6c7f657e40e2147)]
- Update dependencies [Alin Voinea - [`cfb5062`](https://github.com/eea/volto-call-to-action-block/commit/cfb50627df9a9a15ebe67adc43dac97379c64efb)]
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`09c7c14`](https://github.com/eea/volto-call-to-action-block/commit/09c7c14265b0e63f054c3373530ba1dfbd39f4f7)]
### [0.2.4](https://github.com/eea/volto-call-to-action-block/compare/0.2.3...0.2.4) - 30 June 2022

### [0.2.3](https://github.com/eea/volto-call-to-action-block/compare/0.2.2...0.2.3) - 30 June 2022

#### :hammer_and_wrench: Others

- Add tertiary theming option [Alin Voinea - [`c133291`](https://github.com/eea/volto-call-to-action-block/commit/c133291f17c7a8800271bafe96c008dae3b4ee79)]
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`720a9a6`](https://github.com/eea/volto-call-to-action-block/commit/720a9a62f1505906b5e6e0667272e07598a67972)]
### [0.2.2](https://github.com/eea/volto-call-to-action-block/compare/0.2.1...0.2.2) - 2 June 2022

### [0.2.1](https://github.com/eea/volto-call-to-action-block/compare/0.2.0...0.2.1) - 2 June 2022
Expand All @@ -120,5 +119,4 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### :hammer_and_wrench: Others

- yarn bootstrap [Alin Voinea - [`12f3e83`](https://github.com/eea/volto-call-to-action-block/commit/12f3e834d6d3e257cb9e7b6dde80dab783613a01)]
- Initial commit [Alin Voinea - [`00f39c8`](https://github.com/eea/volto-call-to-action-block/commit/00f39c8a36327a821cc613a772bf228451a71e67)]
66 changes: 61 additions & 5 deletions DEVELOP.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,31 @@

## Develop

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

```Bash
git clone https://github.com/eea/volto-call-to-action-block.git
cd volto-call-to-action-block
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. Initialize git hooks

```Bash
yarn prepare
```

1. Happy hacking!


### Or add @eeacms/volto-call-to-action-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/)

1. Make sure you have installed `yo`, `@plone/generator-volto` and `mrs-developer`
Expand All @@ -26,18 +51,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 All @@ -49,3 +71,37 @@ Before starting make sure your development environment is properly set. See [Vol
1. Happy hacking!

cd src/addons/volto-call-to-action-block/

## 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-call-to-action-block` to `mrs.developer.json`

Go to:

```BASH
cd src/addons/volto-call-to-action-block/
```

Start:

```Bash
make
make start
```

This will build and start with Docker a clean `Plone backend` and `Volto Frontend` with `volto-call-to-action-block` 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-call-to-action-block"
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 ab72ec3

Please sign in to comment.