From e1be2703e8038e6a5f9194bb0f93eae04e09c81c Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Mon, 25 Nov 2024 14:36:38 +0100 Subject: [PATCH] refs #4922 Setup Vue deployment --- Jenkinsfile | 24 +++++++++++++++--------- debian/changelog | 2 +- debian/install | 2 +- debian/rules | 6 +++--- package-lock.json | 16 ++++++++++------ package.json | 4 ++-- 6 files changed, 32 insertions(+), 22 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index ef4c3583..83c39b03 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,8 +1,12 @@ #!/usr/bin/env groovy +def PROTECTED_BRANCH +def RUN_BUILD + def BRANCH_ENV = [ test: 'test', - master: 'production' + master: 'production', + vue: 'test' ] def remote = [:] @@ -10,6 +14,14 @@ node { stage('Setup') { env.NODE_ENV = BRANCH_ENV[env.BRANCH_NAME] ?: 'dev' + PROTECTED_BRANCH = [ + 'dev', + 'test', + 'master' + ].contains(env.BRANCH_NAME) + + RUN_BUILD = PROTECTED_BRANCH + echo "NODE_NAME: ${env.NODE_NAME}" echo "WORKSPACE: ${env.WORKSPACE}" } @@ -22,10 +34,7 @@ pipeline { stages { stage('Debuild') { when { - anyOf { - branch 'master' - branch 'test' - } + expression { PROTECTED_BRANCH } } agent { docker { @@ -55,10 +64,7 @@ pipeline { } stage('Deploy') { when { - anyOf { - branch 'master' - branch 'test' - } + expression { PROTECTED_BRANCH } } environment { CREDS = credentials('docker-registry') diff --git a/debian/changelog b/debian/changelog index 1392bb32..e32eb39a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -hedera-web (22.48.2) stable; urgency=low +hedera-web (24.0.0) stable; urgency=low * Initial Release. diff --git a/debian/install b/debian/install index 2a89565f..12b0a6cd 100644 --- a/debian/install +++ b/debian/install @@ -13,7 +13,7 @@ rest usr/share/hedera-web utils usr/share/hedera-web index.php usr/share/hedera-web package.json usr/share/hedera-web -build usr/share/hedera-web +dist/spa usr/share/hedera-web README.md usr/share/hedera-web webpack.config.json usr/share/hedera-web build-deps/node_modules usr/share/hedera-web diff --git a/debian/rules b/debian/rules index 0854cf25..f2d57af0 100755 --- a/debian/rules +++ b/debian/rules @@ -8,10 +8,10 @@ clean: npm run clean dh_clean $@ - + build: - npm install --no-audit --prefer-offline - npm --omit=dev run build + npm install --omit=dev --no-audit --prefer-offline + npx quasar build mkdir -p build-deps cp package.json package-lock.json build-deps diff --git a/package-lock.json b/package-lock.json index 78673069..b6b53c76 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5127,9 +5127,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001431", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001431.tgz", - "integrity": "sha512-zBUoFU0ZcxpvSt9IU66dXVT/3ctO1cy4y9cscs1szkPlcWb6pasYM144GqrUygUbT+k7cmUCW61cvskjcv0enQ==", + "version": "1.0.30001684", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001684.tgz", + "integrity": "sha512-G1LRwLIQjBQoyq0ZJGqGIJUXzJ8irpbjHLpVRXDvBEScFJ9b17sgK6vlx0GAJFE21okD7zXl08rRRUfq6HdoEQ==", "dev": true, "funding": [ { @@ -5139,6 +5139,10 @@ { "type": "tidelift", "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" } ] }, @@ -19566,9 +19570,9 @@ } }, "caniuse-lite": { - "version": "1.0.30001431", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001431.tgz", - "integrity": "sha512-zBUoFU0ZcxpvSt9IU66dXVT/3ctO1cy4y9cscs1szkPlcWb6pasYM144GqrUygUbT+k7cmUCW61cvskjcv0enQ==", + "version": "1.0.30001684", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001684.tgz", + "integrity": "sha512-G1LRwLIQjBQoyq0ZJGqGIJUXzJ8irpbjHLpVRXDvBEScFJ9b17sgK6vlx0GAJFE21okD7zXl08rRRUfq6HdoEQ==", "dev": true }, "caseless": { diff --git a/package.json b/package.json index 1d390328..2e487fd8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hedera-web", - "version": "22.48.2", + "version": "24.0.0", "description": "Verdnatura web page", "license": "GPL-3.0", "productName": "Salix", @@ -68,7 +68,7 @@ }, "scripts": { "front": "webpack serve --open", - "back": "cd ../vn-database && myvc start && cd ../salix && gulp backOnly", + "back": "cd ../salix && gulp backOnly", "resetDatabase": "cd ../salix && gulp docker", "cy:open": "npm run resetDatabase && cd ../hedera-web && cypress open", "test:e2e": "npm run resetDatabase && cd ../hedera-web && cypress run",