test → master #66

Merged
guillermo merged 70 commits from test into master 2024-07-23 06:23:47 +00:00
5 changed files with 42 additions and 40 deletions

59
Jenkinsfile vendored
View File

@ -4,6 +4,7 @@ def BRANCH_ENV = [
test: 'test',
master: 'production'
]
def remote = [:]
node {
stage('Setup') {
@ -28,35 +29,28 @@ pipeline {
}
agent {
docker {
image 'registry.verdnatura.es/debuild:2.23.4-vn1'
image 'registry.verdnatura.es/verdnatura/debuild:2.23.4-vn7'
registryUrl 'https://registry.verdnatura.es/'
registryCredentialsId 'docker-registry'
args '-v /mnt/appdata/reprepro:/reprepro'
}
}
steps {
sh 'debuild -us -uc -b'
sh 'vn-includedeb bookworm'
}
}
stage('Container') {
when {
anyOf {
branch 'master'
branch 'test'
}
}
environment {
CREDS = credentials('docker-registry')
}
steps {
sh 'mkdir -p debuild'
sh 'mv ../hedera-web_* debuild'
script {
def packageJson = readJSON file: 'package.json'
env.VERSION = packageJson.version
def files = findFiles(glob: 'debuild/*.changes')
files.each { file -> env.CHANGES_FILE = file.name }
}
configFileProvider([
configFile(fileId: "dput.cf", variable: 'DPUT_CONFIG')
]) {
sshagent(credentials: ['jenkins-agent']) {
sh 'dput --config "$DPUT_CONFIG" verdnatura "debuild/$CHANGES_FILE"'
}
}
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'
}
}
stage('Deploy') {
@ -66,18 +60,35 @@ pipeline {
branch 'test'
}
}
environment {
CREDS = credentials('docker-registry')
IMAGE = "$REGISTRY/verdnatura/hedera-web"
}
steps {
script {
def packageJson = readJSON file: 'package.json'
env.VERSION = packageJson.version
env.VERSION = "${packageJson.version}"
env.TAG = "${packageJson.version}-build${env.BUILD_ID}"
}
sh 'docker-compose build --build-arg BUILD_ID=$BUILD_ID --parallel'
sh 'docker login --username $CREDS_USR --password $CREDS_PSW $REGISTRY'
sh 'docker push $IMAGE:$TAG'
script {
if (env.BRANCH_NAME == 'master') {
sh 'docker tag $IMAGE:$TAG $IMAGE:latest'
sh 'docker push $IMAGE:latest'
}
}
withKubeConfig([
serverUrl: "$KUBERNETES_API",
credentialsId: 'kubernetes',
namespace: 'salix'
]) {
sh 'kubectl set image deployment/hedera-web-$BRANCH_NAME hedera-web-$BRANCH_NAME=$REGISTRY/hedera-web:$VERSION'
sh 'kubectl set image deployment/hedera-web-cron-$BRANCH_NAME hedera-web-cron-$BRANCH_NAME=$REGISTRY/hedera-web:$VERSION'
sh 'kubectl set image deployment/hedera-web-$BRANCH_NAME hedera-web-$BRANCH_NAME=$IMAGE:$TAG'
sh 'kubectl set image deployment/hedera-web-cron-$BRANCH_NAME hedera-web-cron-$BRANCH_NAME=$IMAGE:$TAG'
}
}
}

2
debian/changelog vendored
View File

@ -1,4 +1,4 @@
hedera-web (24.14.8) stable; urgency=low
hedera-web (24.14.10) stable; urgency=low
* Initial Release.

View File

@ -1,12 +1,9 @@
version: '3.7'
services:
main:
image: registry.verdnatura.es/hedera-web:${VERSION:?}
image: registry.verdnatura.es/verdnatura/hedera-web:${TAG:?}
build:
context: .
dockerfile: Dockerfile
args:
- VERSION=${VERSION:?}
cron:
image: registry.verdnatura.es/hedera-web:${VERSION:?}
command: 'cron -f'

View File

@ -117,7 +117,7 @@
SELECT i.id, i.longName item, i.subName,
i.tag5, i.value5, i.tag6, i.value6,
i.tag7, i.value7, i.tag8, i.value8,
i.relevancy, i.size, i.category, i.minQuantity,
i.relevancy, i.size, i.category, b.minQuantity,
k.name ink, p.name producer, o.name origin,
b.available, b.price, b.`grouping`,
i.image, im.updated
@ -126,19 +126,13 @@
LEFT JOIN vn.ink k ON k.id = i.inkFk
LEFT JOIN vn.producer p ON p.id = i.producerFk
LEFT JOIN vn.origin o ON o.id = i.originFk
LEFT JOIN image im
ON im.collectionFk = 'catalog'
LEFT JOIN image im ON im.collectionFk = 'catalog'
AND im.name = i.image
WHERE b.available > 0
ORDER BY i.relevancy DESC, i.name, i.size
LIMIT 5000;
DROP TEMPORARY TABLE
tmp.item,
tmp.ticketCalculateItem,
tmp.ticketComponentPrice,
tmp.ticketComponent,
tmp.ticketLot,
tmp.zoneGetShipped;
DROP TEMPORARY TABLE tmp.item;
CALL vn.ticketCalculatePurge();
</db-model>
<db-form id="$card" v-model="card" model="items"/>
<vn-lot id="card-lot"/>

View File

@ -1,6 +1,6 @@
{
"name": "hedera-web",
"version": "24.14.8",
"version": "24.14.10",
"description": "Verdnatura web page",
"license": "GPL-3.0",
"repository": {