@eeacms/volto-design-tokens 0.1.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5 -2
- package/DEVELOP.md +6 -6
- package/README.md +19 -19
- package/package.json +1 -1
- package/DEVELOP.md.tpl +0 -51
- package/Jenkinsfile.tpl +0 -243
- package/Makefile.tpl +0 -97
- package/README.md.tpl +0 -80
- package/package.json.tpl +0 -46
package/CHANGELOG.md
CHANGED
|
@@ -4,13 +4,16 @@ All notable changes to this project will be documented in this file. Dates are d
|
|
|
4
4
|
|
|
5
5
|
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
6
6
|
|
|
7
|
-
### [0.1.
|
|
7
|
+
### [0.1.1](https://github.com/eea/volto-design-tokens/compare/1.0.0...0.1.1) - 14 July 2023
|
|
8
8
|
|
|
9
9
|
#### :house: Internal changes
|
|
10
10
|
|
|
11
|
+
- chore: Replace addon name [dana-cfc4 - [`bd18b00`](https://github.com/eea/volto-design-tokens/commit/bd18b006369b548ed2faef77e433cb3e52b5adda)]
|
|
11
12
|
- chore: Change addon name, formatting [dana-cfc4 - [`8d96d9b`](https://github.com/eea/volto-design-tokens/commit/8d96d9bb5614db5695372e9e6cfff4ab195689ef)]
|
|
12
13
|
|
|
13
|
-
|
|
14
|
+
## [1.0.0](https://github.com/eea/volto-design-tokens/compare/0.1.0...1.0.0) - 13 July 2023
|
|
15
|
+
|
|
16
|
+
### 0.1.0 - 13 July 2023
|
|
14
17
|
|
|
15
18
|
#### :house: Internal changes
|
|
16
19
|
|
package/DEVELOP.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# volto-
|
|
1
|
+
# volto-design-tokens
|
|
2
2
|
|
|
3
3
|
## Develop
|
|
4
4
|
|
|
@@ -10,15 +10,15 @@ Before starting make sure your development environment is properly set. See [Vol
|
|
|
10
10
|
|
|
11
11
|
1. Create new volto app
|
|
12
12
|
|
|
13
|
-
yo @plone/volto my-volto-project --addon @eeacms/volto-
|
|
13
|
+
yo @plone/volto my-volto-project --addon @eeacms/volto-design-tokens --skip-install
|
|
14
14
|
cd my-volto-project
|
|
15
15
|
|
|
16
16
|
1. Add the following to `mrs.developer.json`:
|
|
17
17
|
|
|
18
18
|
{
|
|
19
|
-
"volto-
|
|
20
|
-
"url": "https://github.com/eea/volto-
|
|
21
|
-
"package": "@eeacms/volto-
|
|
19
|
+
"volto-design-tokens": {
|
|
20
|
+
"url": "https://github.com/eea/volto-design-tokens.git",
|
|
21
|
+
"package": "@eeacms/volto-design-tokens",
|
|
22
22
|
"branch": "develop",
|
|
23
23
|
"path": "src"
|
|
24
24
|
}
|
|
@@ -48,4 +48,4 @@ Before starting make sure your development environment is properly set. See [Vol
|
|
|
48
48
|
|
|
49
49
|
1. Happy hacking!
|
|
50
50
|
|
|
51
|
-
cd src/addons/volto-
|
|
51
|
+
cd src/addons/volto-design-tokens/
|
package/README.md
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
# volto-
|
|
1
|
+
# volto-design-tokens
|
|
2
2
|
|
|
3
|
-
[](https://github.com/eea/volto-design-tokens/releases)
|
|
4
4
|
|
|
5
|
-
[](https://sonarqube.eea.europa.eu/api/project_badges/measure?project=volto-
|
|
5
|
+
[](https://ci.eionet.europa.eu/view/Github/job/volto-addons/job/volto-design-tokens/job/master/display/redirect)
|
|
6
|
+
[](https://sonarqube.eea.europa.eu/dashboard?id=volto-design-tokens-master)
|
|
7
|
+
[](https://sonarqube.eea.europa.eu/dashboard?id=volto-design-tokens-master)
|
|
8
|
+
[](https://sonarqube.eea.europa.eu/dashboard?id=volto-design-tokens-master)
|
|
9
|
+
[](https://sonarqube.eea.europa.eu/dashboard?id=volto-design-tokens-master)
|
|
10
10
|
|
|
11
|
-
[](https://sonarqube.eea.europa.eu/api/project_badges/measure?project=volto-
|
|
11
|
+
[](https://ci.eionet.europa.eu/view/Github/job/volto-addons/job/volto-design-tokens/job/develop/display/redirect)
|
|
12
|
+
[](https://sonarqube.eea.europa.eu/dashboard?id=volto-design-tokens-develop)
|
|
13
|
+
[](https://sonarqube.eea.europa.eu/dashboard?id=volto-design-tokens-develop)
|
|
14
|
+
[](https://sonarqube.eea.europa.eu/dashboard?id=volto-design-tokens-develop)
|
|
15
|
+
[](https://sonarqube.eea.europa.eu/dashboard?id=volto-design-tokens-develop)
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
[Volto](https://github.com/plone/volto) add-on
|
|
@@ -23,7 +23,7 @@ Demo GIF
|
|
|
23
23
|
|
|
24
24
|
## Getting started
|
|
25
25
|
|
|
26
|
-
### Add volto-
|
|
26
|
+
### Add volto-design-tokens to your Volto project
|
|
27
27
|
|
|
28
28
|
1. Make sure you have a [Plone backend](https://plone.org/download) up-and-running at http://localhost:8080/Plone
|
|
29
29
|
|
|
@@ -33,11 +33,11 @@ Demo GIF
|
|
|
33
33
|
|
|
34
34
|
```JSON
|
|
35
35
|
"addons": [
|
|
36
|
-
"@eeacms/volto-
|
|
36
|
+
"@eeacms/volto-design-tokens"
|
|
37
37
|
],
|
|
38
38
|
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@eeacms/volto-
|
|
40
|
+
"@eeacms/volto-design-tokens": "*"
|
|
41
41
|
}
|
|
42
42
|
```
|
|
43
43
|
|
|
@@ -45,7 +45,7 @@ Demo GIF
|
|
|
45
45
|
|
|
46
46
|
```
|
|
47
47
|
npm install -g yo @plone/generator-volto
|
|
48
|
-
yo @plone/volto my-volto-project --canary --addon @eeacms/volto-
|
|
48
|
+
yo @plone/volto my-volto-project --canary --addon @eeacms/volto-design-tokens
|
|
49
49
|
cd my-volto-project
|
|
50
50
|
```
|
|
51
51
|
|
|
@@ -62,18 +62,18 @@ Demo GIF
|
|
|
62
62
|
|
|
63
63
|
## Release
|
|
64
64
|
|
|
65
|
-
See [RELEASE.md](https://github.com/eea/volto-
|
|
65
|
+
See [RELEASE.md](https://github.com/eea/volto-design-tokens/blob/master/RELEASE.md).
|
|
66
66
|
|
|
67
67
|
## How to contribute
|
|
68
68
|
|
|
69
|
-
See [DEVELOP.md](https://github.com/eea/volto-
|
|
69
|
+
See [DEVELOP.md](https://github.com/eea/volto-design-tokens/blob/master/DEVELOP.md).
|
|
70
70
|
|
|
71
71
|
## Copyright and license
|
|
72
72
|
|
|
73
73
|
The Initial Owner of the Original Code is European Environment Agency (EEA).
|
|
74
74
|
All Rights Reserved.
|
|
75
75
|
|
|
76
|
-
See [LICENSE.md](https://github.com/eea/volto-
|
|
76
|
+
See [LICENSE.md](https://github.com/eea/volto-design-tokens/blob/master/LICENSE.md) for details.
|
|
77
77
|
|
|
78
78
|
## Funding
|
|
79
79
|
|
package/package.json
CHANGED
package/DEVELOP.md.tpl
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
# <%= name %>
|
|
2
|
-
|
|
3
|
-
## Develop
|
|
4
|
-
|
|
5
|
-
Before starting make sure your development environment is properly set. See [Volto Developer Documentation](https://docs.voltocms.com/getting-started/install/)
|
|
6
|
-
|
|
7
|
-
1. Make sure you have installed `yo`, `@plone/generator-volto` and `mrs-developer`
|
|
8
|
-
|
|
9
|
-
npm install -g yo @plone/generator-volto mrs-developer
|
|
10
|
-
|
|
11
|
-
1. Create new volto app
|
|
12
|
-
|
|
13
|
-
yo @plone/volto my-volto-project --addon <%= addonName %> --skip-install
|
|
14
|
-
cd my-volto-project
|
|
15
|
-
|
|
16
|
-
1. Add the following to `mrs.developer.json`:
|
|
17
|
-
|
|
18
|
-
{
|
|
19
|
-
"<%= name %>": {
|
|
20
|
-
"url": "https://github.com/eea/<%= name %>.git",
|
|
21
|
-
"package": "<%= addonName %>",
|
|
22
|
-
"branch": "develop",
|
|
23
|
-
"path": "src"
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
1. Install
|
|
28
|
-
|
|
29
|
-
yarn develop
|
|
30
|
-
yarn
|
|
31
|
-
|
|
32
|
-
1. Start backend
|
|
33
|
-
|
|
34
|
-
docker pull plone
|
|
35
|
-
docker run -d --name plone -p 8080:8080 -e SITE=Plone -e PROFILES="profile-plone.restapi:blocks" plone
|
|
36
|
-
|
|
37
|
-
...wait for backend to setup and start - `Ready to handle requests`:
|
|
38
|
-
|
|
39
|
-
docker logs -f plone
|
|
40
|
-
|
|
41
|
-
...you can also check http://localhost:8080/Plone
|
|
42
|
-
|
|
43
|
-
1. Start frontend
|
|
44
|
-
|
|
45
|
-
yarn start
|
|
46
|
-
|
|
47
|
-
1. Go to http://localhost:3000
|
|
48
|
-
|
|
49
|
-
1. Happy hacking!
|
|
50
|
-
|
|
51
|
-
cd src/addons/<%= name %>/
|
package/Jenkinsfile.tpl
DELETED
|
@@ -1,243 +0,0 @@
|
|
|
1
|
-
pipeline {
|
|
2
|
-
agent any
|
|
3
|
-
|
|
4
|
-
environment {
|
|
5
|
-
GIT_NAME = "<%= name %>"
|
|
6
|
-
NAMESPACE = "@eeacms"
|
|
7
|
-
SONARQUBE_TAGS = "volto.eea.europa.eu"
|
|
8
|
-
DEPENDENCIES = ""
|
|
9
|
-
VOLTO = ""
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
stages {
|
|
13
|
-
|
|
14
|
-
stage('Release') {
|
|
15
|
-
when {
|
|
16
|
-
allOf {
|
|
17
|
-
environment name: 'CHANGE_ID', value: ''
|
|
18
|
-
branch 'master'
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
steps {
|
|
22
|
-
node(label: 'docker') {
|
|
23
|
-
withCredentials([string(credentialsId: 'eea-jenkins-token', variable: 'GITHUB_TOKEN'),string(credentialsId: 'eea-jenkins-npm-token', variable: 'NPM_TOKEN')]) {
|
|
24
|
-
sh '''docker pull eeacms/gitflow'''
|
|
25
|
-
sh '''docker run -i --rm --name="$BUILD_TAG-gitflow-master" -e GIT_BRANCH="$BRANCH_NAME" -e GIT_NAME="$GIT_NAME" -e GIT_TOKEN="$GITHUB_TOKEN" -e NPM_TOKEN="$NPM_TOKEN" -e LANGUAGE=javascript eeacms/gitflow'''
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
stage('Code') {
|
|
32
|
-
when {
|
|
33
|
-
allOf {
|
|
34
|
-
environment name: 'CHANGE_ID', value: ''
|
|
35
|
-
not { changelog '.*^Automated release [0-9\\.]+$' }
|
|
36
|
-
not { branch 'master' }
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
steps {
|
|
40
|
-
parallel(
|
|
41
|
-
|
|
42
|
-
"ES lint": {
|
|
43
|
-
node(label: 'docker') {
|
|
44
|
-
sh '''docker run -i --rm --name="$BUILD_TAG-eslint" -e NAMESPACE="$NAMESPACE" -e GIT_NAME=$GIT_NAME -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" -e VOLTO=$VOLTO plone/volto-addon-ci eslint'''
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
|
-
|
|
48
|
-
"Style lint": {
|
|
49
|
-
node(label: 'docker') {
|
|
50
|
-
sh '''docker run -i --rm --name="$BUILD_TAG-stylelint" -e NAMESPACE="$NAMESPACE" -e GIT_NAME=$GIT_NAME -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" -e VOLTO=$VOLTO plone/volto-addon-ci stylelint'''
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
|
|
54
|
-
"Prettier": {
|
|
55
|
-
node(label: 'docker') {
|
|
56
|
-
sh '''docker run -i --rm --name="$BUILD_TAG-prettier" -e NAMESPACE="$NAMESPACE" -e GIT_NAME=$GIT_NAME -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" -e VOLTO=$VOLTO plone/volto-addon-ci prettier'''
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
)
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
stage('Tests') {
|
|
64
|
-
when {
|
|
65
|
-
allOf {
|
|
66
|
-
environment name: 'CHANGE_ID', value: ''
|
|
67
|
-
anyOf {
|
|
68
|
-
not { changelog '.*^Automated release [0-9\\.]+$' }
|
|
69
|
-
branch 'master'
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
steps {
|
|
74
|
-
parallel(
|
|
75
|
-
|
|
76
|
-
"Volto": {
|
|
77
|
-
node(label: 'docker') {
|
|
78
|
-
script {
|
|
79
|
-
try {
|
|
80
|
-
sh '''docker pull plone/volto-addon-ci'''
|
|
81
|
-
sh '''docker run -i --name="$BUILD_TAG-volto" -e NAMESPACE="$NAMESPACE" -e GIT_NAME=$GIT_NAME -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" -e VOLTO=$VOLTO plone/volto-addon-ci'''
|
|
82
|
-
sh '''rm -rf xunit-reports'''
|
|
83
|
-
sh '''mkdir -p xunit-reports'''
|
|
84
|
-
sh '''docker cp $BUILD_TAG-volto:/opt/frontend/my-volto-project/coverage xunit-reports/'''
|
|
85
|
-
sh '''docker cp $BUILD_TAG-volto:/opt/frontend/my-volto-project/junit.xml xunit-reports/'''
|
|
86
|
-
sh '''docker cp $BUILD_TAG-volto:/opt/frontend/my-volto-project/unit_tests_log.txt xunit-reports/'''
|
|
87
|
-
stash name: "xunit-reports", includes: "xunit-reports/**"
|
|
88
|
-
archiveArtifacts artifacts: "xunit-reports/unit_tests_log.txt", fingerprint: true
|
|
89
|
-
publishHTML (target : [
|
|
90
|
-
allowMissing: false,
|
|
91
|
-
alwaysLinkToLastBuild: true,
|
|
92
|
-
keepAll: true,
|
|
93
|
-
reportDir: 'xunit-reports/coverage/lcov-report',
|
|
94
|
-
reportFiles: 'index.html',
|
|
95
|
-
reportName: 'UTCoverage',
|
|
96
|
-
reportTitles: 'Unit Tests Code Coverage'
|
|
97
|
-
])
|
|
98
|
-
} finally {
|
|
99
|
-
catchError(buildResult: 'SUCCESS', stageResult: 'SUCCESS') {
|
|
100
|
-
junit testResults: 'xunit-reports/junit.xml', allowEmptyResults: true
|
|
101
|
-
}
|
|
102
|
-
sh script: '''docker rm -v $BUILD_TAG-volto''', returnStatus: true
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
)
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
stage('Integration tests') {
|
|
112
|
-
when {
|
|
113
|
-
allOf {
|
|
114
|
-
environment name: 'CHANGE_ID', value: ''
|
|
115
|
-
anyOf {
|
|
116
|
-
not { changelog '.*^Automated release [0-9\\.]+$' }
|
|
117
|
-
branch 'master'
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
steps {
|
|
122
|
-
parallel(
|
|
123
|
-
|
|
124
|
-
"Cypress": {
|
|
125
|
-
node(label: 'docker') {
|
|
126
|
-
script {
|
|
127
|
-
try {
|
|
128
|
-
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'''
|
|
129
|
-
sh '''docker pull plone/volto-addon-ci; docker run -i --name="$BUILD_TAG-cypress" --link $BUILD_TAG-plone:plone -e NAMESPACE="$NAMESPACE" -e GIT_NAME=$GIT_NAME -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" -e DEPENDENCIES="$DEPENDENCIES" -e VOLTO=$VOLTO plone/volto-addon-ci cypress'''
|
|
130
|
-
} finally {
|
|
131
|
-
try {
|
|
132
|
-
sh '''rm -rf cypress-reports cypress-results cypress-coverage'''
|
|
133
|
-
sh '''mkdir -p cypress-reports cypress-results cypress-coverage'''
|
|
134
|
-
sh '''docker cp $BUILD_TAG-cypress:/opt/frontend/my-volto-project/src/addons/$GIT_NAME/cypress/videos cypress-reports/'''
|
|
135
|
-
sh '''docker cp $BUILD_TAG-cypress:/opt/frontend/my-volto-project/src/addons/$GIT_NAME/cypress/reports cypress-results/'''
|
|
136
|
-
coverage = sh script: '''docker cp $BUILD_TAG-cypress:/opt/frontend/my-volto-project/src/addons/$GIT_NAME/coverage cypress-coverage/''', returnStatus: true
|
|
137
|
-
if ( coverage == 0 ) {
|
|
138
|
-
publishHTML (target : [allowMissing: false,
|
|
139
|
-
alwaysLinkToLastBuild: true,
|
|
140
|
-
keepAll: true,
|
|
141
|
-
reportDir: 'cypress-coverage/coverage/lcov-report',
|
|
142
|
-
reportFiles: 'index.html',
|
|
143
|
-
reportName: 'CypressCoverage',
|
|
144
|
-
reportTitles: 'Integration Tests Code Coverage'])
|
|
145
|
-
}
|
|
146
|
-
sh '''touch empty_file; for ok_test in $(grep -E 'file=.*failures="0"' $(grep 'testsuites .*failures="0"' $(find cypress-results -name *.xml) empty_file | awk -F: '{print $1}') empty_file | sed 's/.* file="\\(.*\\)" time.*/\\1/' | sed 's#^cypress/integration/##g' | sed 's#^../../../node_modules/@eeacms/##g'); do rm -f cypress-reports/videos/$ok_test.mp4; rm -f cypress-reports/$ok_test.mp4; done'''
|
|
147
|
-
archiveArtifacts artifacts: 'cypress-reports/**/*.mp4', fingerprint: true, allowEmptyArchive: true
|
|
148
|
-
stash name: "cypress-coverage", includes: "cypress-coverage/**", allowEmpty: true
|
|
149
|
-
}
|
|
150
|
-
finally {
|
|
151
|
-
catchError(buildResult: 'SUCCESS', stageResult: 'SUCCESS') {
|
|
152
|
-
junit testResults: 'cypress-results/**/*.xml', allowEmptyResults: true
|
|
153
|
-
}
|
|
154
|
-
sh script: "docker stop $BUILD_TAG-plone", returnStatus: true
|
|
155
|
-
sh script: "docker rm -v $BUILD_TAG-plone", returnStatus: true
|
|
156
|
-
sh script: "docker rm -v $BUILD_TAG-cypress", returnStatus: true
|
|
157
|
-
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
)
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
stage('Report to SonarQube') {
|
|
169
|
-
when {
|
|
170
|
-
allOf {
|
|
171
|
-
environment name: 'CHANGE_ID', value: ''
|
|
172
|
-
anyOf {
|
|
173
|
-
branch 'master'
|
|
174
|
-
allOf {
|
|
175
|
-
branch 'develop'
|
|
176
|
-
not { changelog '.*^Automated release [0-9\\.]+$' }
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
steps {
|
|
182
|
-
node(label: 'swarm') {
|
|
183
|
-
script{
|
|
184
|
-
checkout scm
|
|
185
|
-
unstash "xunit-reports"
|
|
186
|
-
unstash "cypress-coverage"
|
|
187
|
-
def scannerHome = tool 'SonarQubeScanner';
|
|
188
|
-
def nodeJS = tool 'NodeJS';
|
|
189
|
-
withSonarQubeEnv('Sonarqube') {
|
|
190
|
-
sh '''sed -i "s#/opt/frontend/my-volto-project/src/addons/${GIT_NAME}/##g" xunit-reports/coverage/lcov.info'''
|
|
191
|
-
sh '''sed -i "s#src/addons/${GIT_NAME}/##g" xunit-reports/coverage/lcov.info'''
|
|
192
|
-
sh "export PATH=${scannerHome}/bin:${nodeJS}/bin:$PATH; sonar-scanner -Dsonar.javascript.lcov.reportPaths=./xunit-reports/coverage/lcov.info,./cypress-coverage/coverage/lcov.info -Dsonar.sources=./src -Dsonar.projectKey=$GIT_NAME-$BRANCH_NAME -Dsonar.projectVersion=$BRANCH_NAME-$BUILD_NUMBER"
|
|
193
|
-
sh '''try=2; while [ \$try -gt 0 ]; do curl -s -XPOST -u "${SONAR_AUTH_TOKEN}:" "${SONAR_HOST_URL}api/project_tags/set?project=${GIT_NAME}-${BRANCH_NAME}&tags=${SONARQUBE_TAGS},${BRANCH_NAME}" > set_tags_result; if [ \$(grep -ic error set_tags_result ) -eq 0 ]; then try=0; else cat set_tags_result; echo "... Will retry"; sleep 60; try=\$(( \$try - 1 )); fi; done'''
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
stage('Pull Request') {
|
|
201
|
-
when {
|
|
202
|
-
not {
|
|
203
|
-
environment name: 'CHANGE_ID', value: ''
|
|
204
|
-
}
|
|
205
|
-
environment name: 'CHANGE_TARGET', value: 'master'
|
|
206
|
-
}
|
|
207
|
-
steps {
|
|
208
|
-
node(label: 'docker') {
|
|
209
|
-
script {
|
|
210
|
-
if ( env.CHANGE_BRANCH != "develop" ) {
|
|
211
|
-
error "Pipeline aborted due to PR not made from develop branch"
|
|
212
|
-
}
|
|
213
|
-
withCredentials([string(credentialsId: 'eea-jenkins-token', variable: 'GITHUB_TOKEN')]) {
|
|
214
|
-
sh '''docker pull eeacms/gitflow'''
|
|
215
|
-
sh '''docker run -i --rm --name="$BUILD_TAG-gitflow-pr" -e GIT_CHANGE_TARGET="$CHANGE_TARGET" -e GIT_CHANGE_BRANCH="$CHANGE_BRANCH" -e GIT_CHANGE_AUTHOR="$CHANGE_AUTHOR" -e GIT_CHANGE_TITLE="$CHANGE_TITLE" -e GIT_TOKEN="$GITHUB_TOKEN" -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" -e GIT_ORG="$GIT_ORG" -e GIT_NAME="$GIT_NAME" -e LANGUAGE=javascript eeacms/gitflow'''
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
post {
|
|
225
|
-
always {
|
|
226
|
-
cleanWs(cleanWhenAborted: true, cleanWhenFailure: true, cleanWhenNotBuilt: true, cleanWhenSuccess: true, cleanWhenUnstable: true, deleteDirs: true)
|
|
227
|
-
}
|
|
228
|
-
changed {
|
|
229
|
-
script {
|
|
230
|
-
def details = """<h1>${env.JOB_NAME} - Build #${env.BUILD_NUMBER} - ${currentBuild.currentResult}</h1>
|
|
231
|
-
<p>Check console output at <a href="${env.BUILD_URL}/display/redirect">${env.JOB_BASE_NAME} - #${env.BUILD_NUMBER}</a></p>
|
|
232
|
-
"""
|
|
233
|
-
emailext(
|
|
234
|
-
subject: '$DEFAULT_SUBJECT',
|
|
235
|
-
body: details,
|
|
236
|
-
attachLog: true,
|
|
237
|
-
compressLog: true,
|
|
238
|
-
recipientProviders: [[$class: 'DevelopersRecipientProvider'], [$class: 'CulpritsRecipientProvider']]
|
|
239
|
-
)
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
}
|
package/Makefile.tpl
DELETED
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
SHELL=/bin/bash
|
|
2
|
-
|
|
3
|
-
DIR=$(shell basename $$(pwd))
|
|
4
|
-
ADDON ?= "<%= addonName %>"
|
|
5
|
-
|
|
6
|
-
# We like colors
|
|
7
|
-
# From: https://coderwall.com/p/izxssa/colored-makefile-for-golang-projects
|
|
8
|
-
RED=`tput setaf 1`
|
|
9
|
-
GREEN=`tput setaf 2`
|
|
10
|
-
RESET=`tput sgr0`
|
|
11
|
-
YELLOW=`tput setaf 3`
|
|
12
|
-
|
|
13
|
-
ifeq ($(wildcard ./project),)
|
|
14
|
-
NODE_MODULES = "../../../node_modules"
|
|
15
|
-
else
|
|
16
|
-
NODE_MODULES = "./project/node_modules"
|
|
17
|
-
endif
|
|
18
|
-
|
|
19
|
-
project:
|
|
20
|
-
npm install -g yo
|
|
21
|
-
npm install -g @plone/generator-volto
|
|
22
|
-
npm install -g mrs-developer
|
|
23
|
-
yo @plone/volto project --addon ${ADDON} --workspace "src/addons/${DIR}" --no-interactive
|
|
24
|
-
ln -sf $$(pwd) project/src/addons/
|
|
25
|
-
cp .project.eslintrc.js .eslintrc.js
|
|
26
|
-
cd project && yarn
|
|
27
|
-
@echo "-------------------"
|
|
28
|
-
@echo "$(GREEN)Volto project is ready!$(RESET)"
|
|
29
|
-
@echo "$(RED)Now run: cd project && yarn start$(RESET)"
|
|
30
|
-
|
|
31
|
-
all: project
|
|
32
|
-
|
|
33
|
-
.PHONY: start-test-backend
|
|
34
|
-
start-test-backend: ## Start Test Plone Backend
|
|
35
|
-
@echo "$(GREEN)==> Start Test Plone Backend$(RESET)"
|
|
36
|
-
docker run -i --rm -e ZSERVER_HOST=0.0.0.0 -e ZSERVER_PORT=55001 -p 55001:55001 -e SITE=plone -e APPLY_PROFILES=plone.app.contenttypes:plone-content,plone.restapi:default,kitconcept.volto:default-homepage -e CONFIGURE_PACKAGES=plone.app.contenttypes,plone.restapi,kitconcept.volto,kitconcept.volto.cors -e ADDONS='plone.app.robotframework plone.app.contenttypes plone.restapi kitconcept.volto' plone ./bin/robot-server plone.app.robotframework.testing.PLONE_ROBOT_TESTING
|
|
37
|
-
|
|
38
|
-
.PHONY: start-backend-docker
|
|
39
|
-
start-backend-docker: ## Starts a Docker-based backend
|
|
40
|
-
@echo "$(GREEN)==> Start Docker-based Plone Backend$(RESET)"
|
|
41
|
-
docker run -it --rm --name=plone -p 8080:8080 -e SITE=Plone -e ADDONS="kitconcept.volto" -e ZCML="kitconcept.volto.cors" plone
|
|
42
|
-
|
|
43
|
-
.PHONY: test
|
|
44
|
-
test: ## Run jest tests
|
|
45
|
-
docker pull plone/volto-addon-ci
|
|
46
|
-
docker run -it --rm -e NAMESPACE="@eeacms" -e GIT_NAME="${DIR}" -e RAZZLE_JEST_CONFIG=jest-addon.config.js -v "$$(pwd):/opt/frontend/my-volto-project/src/addons/${DIR}" -e CI="true" plone/volto-addon-ci
|
|
47
|
-
|
|
48
|
-
.PHONY: test-update
|
|
49
|
-
test-update: ## Update jest tests snapshots
|
|
50
|
-
docker pull plone/volto-addon-ci
|
|
51
|
-
docker run -it --rm -e NAMESPACE="@eeacms" -e GIT_NAME="${DIR}" -e RAZZLE_JEST_CONFIG=jest-addon.config.js -v "$$(pwd):/opt/frontend/my-volto-project/src/addons/${DIR}" -e CI="true" plone/volto-addon-ci yarn test src/addons/${DIR}/src --watchAll=false -u
|
|
52
|
-
|
|
53
|
-
.PHONY: stylelint
|
|
54
|
-
stylelint: ## Stylelint
|
|
55
|
-
$(NODE_MODULES)/stylelint/bin/stylelint.js --allow-empty-input 'src/**/*.{css,less}'
|
|
56
|
-
|
|
57
|
-
.PHONY: stylelint-overrides
|
|
58
|
-
stylelint-overrides:
|
|
59
|
-
$(NODE_MODULES)/.bin/stylelint --syntax less --allow-empty-input 'theme/**/*.overrides' 'src/**/*.overrides'
|
|
60
|
-
|
|
61
|
-
.PHONY: stylelint-fix
|
|
62
|
-
stylelint-fix: ## Fix stylelint
|
|
63
|
-
$(NODE_MODULES)/stylelint/bin/stylelint.js --allow-empty-input 'src/**/*.{css,less}' --fix
|
|
64
|
-
$(NODE_MODULES)/.bin/stylelint --syntax less --allow-empty-input 'theme/**/*.overrides' 'src/**/*.overrides' --fix
|
|
65
|
-
|
|
66
|
-
.PHONY: prettier
|
|
67
|
-
prettier: ## Prettier
|
|
68
|
-
$(NODE_MODULES)/.bin/prettier --single-quote --check 'src/**/*.{js,jsx,json,css,less,md}'
|
|
69
|
-
|
|
70
|
-
.PHONY: prettier-fix
|
|
71
|
-
prettier-fix: ## Fix prettier
|
|
72
|
-
$(NODE_MODULES)/.bin/prettier --single-quote --write 'src/**/*.{js,jsx,json,css,less,md}'
|
|
73
|
-
|
|
74
|
-
.PHONY: lint
|
|
75
|
-
lint: ## ES Lint
|
|
76
|
-
$(NODE_MODULES)/eslint/bin/eslint.js --max-warnings=0 'src/**/*.{js,jsx}'
|
|
77
|
-
|
|
78
|
-
.PHONY: lint-fix
|
|
79
|
-
lint-fix: ## Fix ES Lint
|
|
80
|
-
$(NODE_MODULES)/eslint/bin/eslint.js --fix 'src/**/*.{js,jsx}'
|
|
81
|
-
|
|
82
|
-
.PHONY: i18n
|
|
83
|
-
i18n: ## i18n
|
|
84
|
-
rm -rf build/messages
|
|
85
|
-
NODE_ENV=development $(NODE_MODULES)/.bin/i18n --addon
|
|
86
|
-
|
|
87
|
-
.PHONY: cypress-run
|
|
88
|
-
cypress-run: ## Run cypress integration tests
|
|
89
|
-
NODE_ENV=development $(NODE_MODULES)/cypress/bin/cypress run
|
|
90
|
-
|
|
91
|
-
.PHONY: cypress-open
|
|
92
|
-
cypress-open: ## Open cypress integration tests
|
|
93
|
-
NODE_ENV=development $(NODE_MODULES)/cypress/bin/cypress open
|
|
94
|
-
|
|
95
|
-
.PHONY: help
|
|
96
|
-
help: ## Show this help.
|
|
97
|
-
@echo -e "$$(grep -hE '^\S+:.*##' $(MAKEFILE_LIST) | sed -e 's/:.*##\s*/:/' -e 's/^\(.\+\):\(.*\)/\\x1b[36m\1\\x1b[m:\2/' | column -c2 -t -s :)"
|
package/README.md.tpl
DELETED
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
# <%= name %>
|
|
2
|
-
|
|
3
|
-
[](https://github.com/eea/<%= name %>/releases)
|
|
4
|
-
|
|
5
|
-
[](https://ci.eionet.europa.eu/view/Github/job/volto-addons/job/<%= name %>/job/master/display/redirect)
|
|
6
|
-
[](https://sonarqube.eea.europa.eu/dashboard?id=<%= name %>-master)
|
|
7
|
-
[](https://sonarqube.eea.europa.eu/dashboard?id=<%= name %>-master)
|
|
8
|
-
[](https://sonarqube.eea.europa.eu/dashboard?id=<%= name %>-master)
|
|
9
|
-
[](https://sonarqube.eea.europa.eu/dashboard?id=<%= name %>-master)
|
|
10
|
-
|
|
11
|
-
[](https://ci.eionet.europa.eu/view/Github/job/volto-addons/job/<%= name %>/job/develop/display/redirect)
|
|
12
|
-
[](https://sonarqube.eea.europa.eu/dashboard?id=<%= name %>-develop)
|
|
13
|
-
[](https://sonarqube.eea.europa.eu/dashboard?id=<%= name %>-develop)
|
|
14
|
-
[](https://sonarqube.eea.europa.eu/dashboard?id=<%= name %>-develop)
|
|
15
|
-
[](https://sonarqube.eea.europa.eu/dashboard?id=<%= name %>-develop)
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
[Volto](https://github.com/plone/volto) add-on
|
|
19
|
-
|
|
20
|
-
## Features
|
|
21
|
-
|
|
22
|
-
Demo GIF
|
|
23
|
-
|
|
24
|
-
## Getting started
|
|
25
|
-
|
|
26
|
-
### Add <%= name %> to your Volto project
|
|
27
|
-
|
|
28
|
-
1. Make sure you have a [Plone backend](https://plone.org/download) up-and-running at http://localhost:8080/Plone
|
|
29
|
-
|
|
30
|
-
1. Start Volto frontend
|
|
31
|
-
|
|
32
|
-
* If you already have a volto project, just update `package.json`:
|
|
33
|
-
|
|
34
|
-
```JSON
|
|
35
|
-
"addons": [
|
|
36
|
-
"<%= addonName %>"
|
|
37
|
-
],
|
|
38
|
-
|
|
39
|
-
"dependencies": {
|
|
40
|
-
"<%= addonName %>": "*"
|
|
41
|
-
}
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
* If not, create one:
|
|
45
|
-
|
|
46
|
-
```
|
|
47
|
-
npm install -g yo @plone/generator-volto
|
|
48
|
-
yo @plone/volto my-volto-project --canary --addon <%= addonName %>
|
|
49
|
-
cd my-volto-project
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
1. Install new add-ons and restart Volto:
|
|
53
|
-
|
|
54
|
-
```
|
|
55
|
-
yarn
|
|
56
|
-
yarn start
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
1. Go to http://localhost:3000
|
|
60
|
-
|
|
61
|
-
1. Happy editing!
|
|
62
|
-
|
|
63
|
-
## Release
|
|
64
|
-
|
|
65
|
-
See [RELEASE.md](https://github.com/eea/<%= name %>/blob/master/RELEASE.md).
|
|
66
|
-
|
|
67
|
-
## How to contribute
|
|
68
|
-
|
|
69
|
-
See [DEVELOP.md](https://github.com/eea/<%= name %>/blob/master/DEVELOP.md).
|
|
70
|
-
|
|
71
|
-
## Copyright and license
|
|
72
|
-
|
|
73
|
-
The Initial Owner of the Original Code is European Environment Agency (EEA).
|
|
74
|
-
All Rights Reserved.
|
|
75
|
-
|
|
76
|
-
See [LICENSE.md](https://github.com/eea/<%= name %>/blob/master/LICENSE.md) for details.
|
|
77
|
-
|
|
78
|
-
## Funding
|
|
79
|
-
|
|
80
|
-
[European Environment Agency (EU)](http://eea.europa.eu)
|
package/package.json.tpl
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "<%= addonName %>",
|
|
3
|
-
"version": "0.1.0",
|
|
4
|
-
"description": "<%= addonName %>: Volto add-on",
|
|
5
|
-
"main": "src/index.js",
|
|
6
|
-
"author": "European Environment Agency: IDM2 A-Team",
|
|
7
|
-
"license": "MIT",
|
|
8
|
-
"homepage": "https://github.com/eea/<%= name %>",
|
|
9
|
-
"keywords": [
|
|
10
|
-
"volto-addon",
|
|
11
|
-
"volto",
|
|
12
|
-
"plone",
|
|
13
|
-
"react"
|
|
14
|
-
],
|
|
15
|
-
"repository": {
|
|
16
|
-
"type": "git",
|
|
17
|
-
"url": "git@github.com:eea/<%= name %>.git"
|
|
18
|
-
},
|
|
19
|
-
"dependencies": {},
|
|
20
|
-
"devDependencies": {
|
|
21
|
-
"@plone/scripts": "*",
|
|
22
|
-
"@cypress/code-coverage": "^3.10.0",
|
|
23
|
-
"cypress-fail-fast": "^5.0.1",
|
|
24
|
-
"babel-plugin-transform-class-properties": "^6.24.1",
|
|
25
|
-
"md5": "^2.3.0"
|
|
26
|
-
},
|
|
27
|
-
"scripts": {
|
|
28
|
-
"release": "release-it",
|
|
29
|
-
"release-major-beta": "release-it major --preRelease=beta",
|
|
30
|
-
"release-beta": "release-it --preRelease=beta",
|
|
31
|
-
"bootstrap": "npm install -g ejs; npm link ejs; node bootstrap",
|
|
32
|
-
"test": "make test",
|
|
33
|
-
"test:fix": "make test-update",
|
|
34
|
-
"pre-commit": "yarn stylelint:fix && yarn prettier:fix && yarn lint:fix",
|
|
35
|
-
"stylelint": "make stylelint",
|
|
36
|
-
"stylelint:overrides": "make stylelint-overrides",
|
|
37
|
-
"stylelint:fix": "make stylelint-fix",
|
|
38
|
-
"prettier": "make prettier",
|
|
39
|
-
"prettier:fix": "make prettier-fix",
|
|
40
|
-
"lint": "make lint",
|
|
41
|
-
"lint:fix": "make lint-fix",
|
|
42
|
-
"i18n": "make i18n",
|
|
43
|
-
"cypress:run": "make cypress-run",
|
|
44
|
-
"cypress:open": "make cypress-open"
|
|
45
|
-
}
|
|
46
|
-
}
|