From 3ed871cb4c56ba7637f1dc1b9eb32d1569a757b4 Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Tue, 10 Oct 2023 12:46:05 +0200 Subject: [PATCH 1/9] refs #6200 fix --- debian/changelog | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 54f83ad0..1bf34bf8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -hedera-web (23.30.5) stable; urgency=low +hedera-web (23.40.7) stable; urgency=low * Initial Release. diff --git a/package.json b/package.json index b5051590..476c071f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hedera-web", - "version": "23.30.5", + "version": "23.40.7", "description": "Verdnatura web page", "license": "GPL-3.0", "repository": { From 496061fb3cee6e11abbf4c109edba10c0fdb9bc4 Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Tue, 10 Oct 2023 14:17:50 +0200 Subject: [PATCH 2/9] refs #6200 Version increased --- debian/changelog | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index ee25dfca..1bf34bf8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -hedera-web (23.40.6) stable; urgency=low +hedera-web (23.40.7) stable; urgency=low * Initial Release. diff --git a/package.json b/package.json index ef46e548..4342256a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hedera-web", - "version": "23.40.6", + "version": "23.40.7", "description": "Verdnatura web page", "license": "GPL-3.0", "repository": { From 02ddc877554b3bc84ef5a9c385a0c447cb297883 Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Thu, 22 Feb 2024 09:03:28 +0100 Subject: [PATCH 3/9] version increased --- debian/changelog | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/debian/changelog b/debian/changelog index 1bf34bf8..2088a6ba 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -hedera-web (23.40.7) stable; urgency=low +hedera-web (24.8.1) stable; urgency=low * Initial Release. diff --git a/package-lock.json b/package-lock.json index 26efb32e..84b72c45 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "hedera-web", - "version": "24.8.0", + "version": "24.8.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "hedera-web", - "version": "24.8.0", + "version": "24.8.1", "license": "GPL-3.0", "dependencies": { "js-yaml": "^3.12.1", diff --git a/package.json b/package.json index 646fdfc1..e1261337 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hedera-web", - "version": "24.8.0", + "version": "24.8.1", "description": "Verdnatura web page", "license": "GPL-3.0", "repository": { From d1cdba800d59d3aec8b83c563def92a1ea1759f8 Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Thu, 22 Feb 2024 09:25:38 +0100 Subject: [PATCH 4/9] Jenkinsfile refactor --- Jenkinsfile | 53 +++++++++++++++++++++++++++++++---------------------- 1 file changed, 31 insertions(+), 22 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 3e434ad2..629d1db9 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,5 +1,27 @@ #!/usr/bin/env groovy +def BRANCH_ENV = [ + test: 'test', + master: 'production' +] + +node { + stage('Setup') { + env.MAIN_REPLICAS = 1 + env.CRON_REPLICAS = 0 + env.NODE_ENV = BRANCH_ENV[env.BRANCH_NAME] ?: 'dev' + + switch (env.BRANCH_NAME) { + case 'master': + env.MAIN_REPLICAS = 3 + env.CRON_REPLICAS = 1 + break + } + + echo "NODE_NAME: ${env.NODE_NAME}" + echo "WORKSPACE: ${env.WORKSPACE}" + } +} pipeline { agent any environment { @@ -7,28 +29,6 @@ pipeline { STACK_NAME = "${env.PROJECT_NAME}-${env.BRANCH_NAME}" } stages { - stage('Checkout') { - steps { - script { - def packageJson = readJSON file: 'package.json' - env.VERSION = packageJson.version - - switch (env.BRANCH_NAME) { - case 'master': - env.NODE_ENV = 'production' - env.MAIN_REPLICAS = 3 - env.CRON_REPLICAS = 1 - break - case 'test': - env.NODE_ENV = 'test' - env.MAIN_REPLICAS = 1 - env.CRON_REPLICAS = 0 - break - } - } - setEnv() - } - } stage('Debuild') { when { anyOf { @@ -60,6 +60,10 @@ pipeline { CREDS = credentials('docker-registry') } steps { + script { + def packageJson = readJSON file: 'package.json' + env.VERSION = packageJson.version + } sh 'docker login --username $CREDS_USR --password $CREDS_PSW $REGISTRY' sh 'docker-compose build --build-arg BUILD_ID=$BUILD_ID --parallel' sh 'docker-compose push' @@ -76,12 +80,17 @@ pipeline { DOCKER_HOST = "${env.SWARM_HOST}" } steps { + script { + def packageJson = readJSON file: 'package.json' + env.VERSION = packageJson.version + } sh "docker stack deploy --with-registry-auth --compose-file docker-compose.yml ${env.STACK_NAME}" } } } post { unsuccessful { + setEnv() sendEmail() } } From 2515cbcee7100727028e9e4e37868f8c764f3026 Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Thu, 22 Feb 2024 09:41:39 +0100 Subject: [PATCH 5/9] ci: HOTFIX Use version to tag docker images --- docker-compose.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index fb21ab7b..5f5d238e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,7 @@ version: '3.7' services: main: - image: registry.verdnatura.es/hedera-web:${BRANCH_NAME:?} + image: registry.verdnatura.es/hedera-web:${VERSION:?} build: context: . dockerfile: Dockerfile @@ -25,7 +25,7 @@ services: limits: memory: 2G cron: - image: registry.verdnatura.es/hedera-web:${BRANCH_NAME:?} + image: registry.verdnatura.es/hedera-web:${VERSION:?} command: 'cron -f' configs: - source: config From 73ba16634eb544790aa56f05e4f0282812e65ebe Mon Sep 17 00:00:00 2001 From: guillermo Date: Mon, 11 Mar 2024 08:50:35 +0100 Subject: [PATCH 6/9] refactor: refs #5167 Deleted provinces section --- README.md | 41 +++++++++++++++++++------- forms/agencies/packages/index.js | 7 ----- forms/agencies/packages/ui.xml | 5 ---- forms/agencies/provinces/index.js | 7 ----- forms/agencies/provinces/locale/ca.yml | 6 ---- forms/agencies/provinces/locale/en.yml | 6 ---- forms/agencies/provinces/locale/es.yml | 6 ---- forms/agencies/provinces/locale/fr.yml | 6 ---- forms/agencies/provinces/locale/pt.yml | 6 ---- forms/agencies/provinces/style.scss | 0 forms/agencies/provinces/ui.xml | 18 ----------- import.js | 4 +-- 12 files changed, 31 insertions(+), 81 deletions(-) delete mode 100644 forms/agencies/provinces/index.js delete mode 100644 forms/agencies/provinces/locale/ca.yml delete mode 100644 forms/agencies/provinces/locale/en.yml delete mode 100644 forms/agencies/provinces/locale/es.yml delete mode 100644 forms/agencies/provinces/locale/fr.yml delete mode 100644 forms/agencies/provinces/locale/pt.yml delete mode 100644 forms/agencies/provinces/style.scss delete mode 100644 forms/agencies/provinces/ui.xml diff --git a/README.md b/README.md index 02a6bd99..63f726a3 100644 --- a/README.md +++ b/README.md @@ -1,36 +1,55 @@ # Hedera -Hedera is the main web page for Verdnatura. +Hedera is the main web shop page for Verdnatura. -## Getting Started +## Prerequisites -Required dependencies. +Required applications. * PHP >= 7.0 * Node.js >= 8.0 + * [php-vn-lib](https://gitea.verdnatura.es/verdnatura/php-vn-lib) -### Web application +### Installing dependencies and launching -Launch fronted. +Pull from repository. + +Run this commands on project root directory to install Node dependencies. ``` -npm run front +$ npm install ``` -Launch backend. +Install project [dependences](https://gitea.verdnatura.es/verdnatura/hedera-web/src/branch/dev/debian/control). + +Pull from repository [php-vn-lib](https://gitea.verdnatura.es/verdnatura/php-vn-lib) and install [dependences](https://gitea.verdnatura.es/verdnatura/php-vn-lib/src/branch/master/debian/control) of this project. + +Configure [config.php](https://gitea.verdnatura.es/verdnatura/hedera-web/src/branch/dev/config.php) file. + +Launch project fronted. ``` -npm run db -npm run back -php -S 127.0.0.1:3001 -t . index.php +$ npm run front +``` + +Launch salix backend. +``` +$ npm run db +$ npm run back +``` +Launch project backend. +``` +$ php -S 127.0.0.1:3001 -t . index.php ``` ### Command line Run server side method from command line. ``` -php hedera-web.php -m method_path +$ php hedera-web.php -m method_path ``` ## Built with + * [nodejs](https://nodejs.org/) + * [php](https://www.php.net/) * [Webpack](https://webpack.js.org/) * [MooTools](https://mootools.net/) * [TinyMCE](https://www.tinymce.com/) diff --git a/forms/agencies/packages/index.js b/forms/agencies/packages/index.js index 8c8d3238..2a34fa24 100644 --- a/forms/agencies/packages/index.js +++ b/forms/agencies/packages/index.js @@ -3,12 +3,5 @@ import './style.scss'; export default new Class({ Extends: Hedera.Form, Template: require('./ui.xml'), - - onShowClick(column, agencyId) { - this.hash.setAll({ - form: 'agencies/provinces', - agency: agencyId - }); - } }); diff --git a/forms/agencies/packages/ui.xml b/forms/agencies/packages/ui.xml index 866bab74..ac865023 100644 --- a/forms/agencies/packages/ui.xml +++ b/forms/agencies/packages/ui.xml @@ -10,11 +10,6 @@ CALL vn2008.agencia_volume () - diff --git a/forms/agencies/provinces/index.js b/forms/agencies/provinces/index.js deleted file mode 100644 index 36552d4f..00000000 --- a/forms/agencies/provinces/index.js +++ /dev/null @@ -1,7 +0,0 @@ -import './style.scss'; - -export default new Class({ - Extends: Hedera.Form, - Template: require('./ui.xml') -}); - diff --git a/forms/agencies/provinces/locale/ca.yml b/forms/agencies/provinces/locale/ca.yml deleted file mode 100644 index c46b70c3..00000000 --- a/forms/agencies/provinces/locale/ca.yml +++ /dev/null @@ -1,6 +0,0 @@ -ByProvince: Desglose per província -Return: Tornar -SelectAgency: Selecciona una agència al llistat de l'esquerra -Province: Província -Expeditions: Exps. -Left: Falten diff --git a/forms/agencies/provinces/locale/en.yml b/forms/agencies/provinces/locale/en.yml deleted file mode 100644 index f72295d0..00000000 --- a/forms/agencies/provinces/locale/en.yml +++ /dev/null @@ -1,6 +0,0 @@ -ByProvince: Breakdown by province -Return: Return -SelectAgency: Select an agency -Province: Province -Expeditions: Exps. -Left: Left diff --git a/forms/agencies/provinces/locale/es.yml b/forms/agencies/provinces/locale/es.yml deleted file mode 100644 index f04d3d2e..00000000 --- a/forms/agencies/provinces/locale/es.yml +++ /dev/null @@ -1,6 +0,0 @@ -ByProvince: Desglose por provincia -Return: Volver -SelectAgency: Selecciona una agencia -Province: Provincia -Expeditions: Exps. -Left: Faltan diff --git a/forms/agencies/provinces/locale/fr.yml b/forms/agencies/provinces/locale/fr.yml deleted file mode 100644 index e289766b..00000000 --- a/forms/agencies/provinces/locale/fr.yml +++ /dev/null @@ -1,6 +0,0 @@ -ByProvince: Par province -Return: Retour -SelectAgency: Sélectionnez une agence -Province: Province -Expeditions: Expéditions -Left: Restant diff --git a/forms/agencies/provinces/locale/pt.yml b/forms/agencies/provinces/locale/pt.yml deleted file mode 100644 index 815c8d5c..00000000 --- a/forms/agencies/provinces/locale/pt.yml +++ /dev/null @@ -1,6 +0,0 @@ -ByProvince: Desglosse por Distritos -Return: Voltar -SelectAgency: Seleccione uma agência -Province: Distrito -Expeditions: Exps. -Left: Faltam diff --git a/forms/agencies/provinces/style.scss b/forms/agencies/provinces/style.scss deleted file mode 100644 index e69de29b..00000000 diff --git a/forms/agencies/provinces/ui.xml b/forms/agencies/provinces/ui.xml deleted file mode 100644 index 46fd7c04..00000000 --- a/forms/agencies/provinces/ui.xml +++ /dev/null @@ -1,18 +0,0 @@ - -
-

ByProvince

-
-
-
- - - CALL vn2008.desglose_volume(#agency) - - - - - - -
-
-
diff --git a/import.js b/import.js index 4b33cf30..fe87079e 100644 --- a/import.js +++ b/import.js @@ -40,9 +40,7 @@ export const routes = { }, agencies: { packages: - () => import('agencies/packages'), - provinces: - () => import('agencies/provinces') + () => import('agencies/packages') }, cms: { about: From a121750fa7bb2d236306fe4bf785c46d5cdb7958 Mon Sep 17 00:00:00 2001 From: guillermo Date: Mon, 11 Mar 2024 08:52:43 +0100 Subject: [PATCH 7/9] refactor: refs #5167 Deleted provinces section --- forms/agencies/packages/locale/ca.yml | 1 - forms/agencies/packages/locale/en.yml | 1 - forms/agencies/packages/locale/es.yml | 1 - forms/agencies/packages/locale/fr.yml | 1 - forms/agencies/packages/locale/pt.yml | 1 - 5 files changed, 5 deletions(-) diff --git a/forms/agencies/packages/locale/ca.yml b/forms/agencies/packages/locale/ca.yml index 12cbbe67..f873f81a 100644 --- a/forms/agencies/packages/locale/ca.yml +++ b/forms/agencies/packages/locale/ca.yml @@ -1,5 +1,4 @@ ListByAgency: Paquets per agència -ShowByProvince: Mostrar desglose per província Agency: Agència Exps: Exps. Bundles: Paquets diff --git a/forms/agencies/packages/locale/en.yml b/forms/agencies/packages/locale/en.yml index 651dcfae..bc542460 100644 --- a/forms/agencies/packages/locale/en.yml +++ b/forms/agencies/packages/locale/en.yml @@ -1,5 +1,4 @@ ListByAgency: Bundles by agency -ShowByProvince: Show breakdown by province Agency: Agency Exps: Exps. Bundles: Bundles diff --git a/forms/agencies/packages/locale/es.yml b/forms/agencies/packages/locale/es.yml index 4532c554..44e1e288 100644 --- a/forms/agencies/packages/locale/es.yml +++ b/forms/agencies/packages/locale/es.yml @@ -1,5 +1,4 @@ ListByAgency: Bultos por agencia -ShowByProvince: Mostrar desglose por provincia Agency: Agencia Exps: Exps. Bundles: Bultos diff --git a/forms/agencies/packages/locale/fr.yml b/forms/agencies/packages/locale/fr.yml index a1999077..3f61e223 100644 --- a/forms/agencies/packages/locale/fr.yml +++ b/forms/agencies/packages/locale/fr.yml @@ -1,5 +1,4 @@ ListByAgency: Liste par agence -ShowByProvince: Montrer par province Agency: Agence Exps: Expéditeur Bundles: Cartons diff --git a/forms/agencies/packages/locale/pt.yml b/forms/agencies/packages/locale/pt.yml index ae5bef89..44e1e288 100644 --- a/forms/agencies/packages/locale/pt.yml +++ b/forms/agencies/packages/locale/pt.yml @@ -1,5 +1,4 @@ ListByAgency: Bultos por agencia -ShowByProvince: Mostrar desglosse por Distrito Agency: Agencia Exps: Exps. Bundles: Bultos From 1d2f9061c53ff77c48d09ba797946fc456393504 Mon Sep 17 00:00:00 2001 From: guillermo Date: Mon, 11 Mar 2024 13:23:07 +0100 Subject: [PATCH 8/9] refactor: refs #5167 Requested changes --- README.md | 4 ++-- config.php | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 63f726a3..589b7f4c 100644 --- a/README.md +++ b/README.md @@ -18,11 +18,11 @@ Run this commands on project root directory to install Node dependencies. $ npm install ``` -Install project [dependences](https://gitea.verdnatura.es/verdnatura/hedera-web/src/branch/dev/debian/control). +Install project dependences (debian/control). Pull from repository [php-vn-lib](https://gitea.verdnatura.es/verdnatura/php-vn-lib) and install [dependences](https://gitea.verdnatura.es/verdnatura/php-vn-lib/src/branch/master/debian/control) of this project. -Configure [config.php](https://gitea.verdnatura.es/verdnatura/hedera-web/src/branch/dev/config.php) file. +Configure config.php file. Launch project fronted. ``` diff --git a/config.php b/config.php index bca8a8db..7e853029 100644 --- a/config.php +++ b/config.php @@ -12,6 +12,8 @@ * * - http://www.mydomain.org -> config.www.php * - http://test.mydomain.org -> config.test.php + * + * Put the password in base64. */ return [ /** From 1414b6c96eefd330e0f889d8207eea12377d68ad Mon Sep 17 00:00:00 2001 From: guillermo Date: Thu, 21 Mar 2024 07:15:28 +0100 Subject: [PATCH 9/9] refactor: refs #5167 Version increased --- debian/changelog | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 2088a6ba..8ed748ea 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -hedera-web (24.8.1) stable; urgency=low +hedera-web (24.8.2) stable; urgency=low * Initial Release. diff --git a/package.json b/package.json index e1261337..23cc4a9b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hedera-web", - "version": "24.8.1", + "version": "24.8.2", "description": "Verdnatura web page", "license": "GPL-3.0", "repository": {