test → master #66
|
@ -4,6 +4,7 @@ def BRANCH_ENV = [
|
||||||
test: 'test',
|
test: 'test',
|
||||||
master: 'production'
|
master: 'production'
|
||||||
]
|
]
|
||||||
|
def remote = [:]
|
||||||
|
|
||||||
node {
|
node {
|
||||||
stage('Setup') {
|
stage('Setup') {
|
||||||
|
@ -28,35 +29,28 @@ pipeline {
|
||||||
}
|
}
|
||||||
agent {
|
agent {
|
||||||
docker {
|
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/'
|
registryUrl 'https://registry.verdnatura.es/'
|
||||||
registryCredentialsId 'docker-registry'
|
registryCredentialsId 'docker-registry'
|
||||||
args '-v /mnt/appdata/reprepro:/reprepro'
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
steps {
|
steps {
|
||||||
sh 'debuild -us -uc -b'
|
sh 'debuild -us -uc -b'
|
||||||
sh 'vn-includedeb bookworm'
|
sh 'mkdir -p debuild'
|
||||||
}
|
sh 'mv ../hedera-web_* debuild'
|
||||||
}
|
|
||||||
stage('Container') {
|
|
||||||
when {
|
|
||||||
anyOf {
|
|
||||||
branch 'master'
|
|
||||||
branch 'test'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
environment {
|
|
||||||
CREDS = credentials('docker-registry')
|
|
||||||
}
|
|
||||||
steps {
|
|
||||||
script {
|
script {
|
||||||
def packageJson = readJSON file: 'package.json'
|
def files = findFiles(glob: 'debuild/*.changes')
|
||||||
env.VERSION = packageJson.version
|
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') {
|
stage('Deploy') {
|
||||||
|
@ -66,18 +60,35 @@ pipeline {
|
||||||
branch 'test'
|
branch 'test'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
environment {
|
||||||
|
CREDS = credentials('docker-registry')
|
||||||
|
IMAGE = "$REGISTRY/verdnatura/hedera-web"
|
||||||
|
}
|
||||||
steps {
|
steps {
|
||||||
script {
|
script {
|
||||||
def packageJson = readJSON file: 'package.json'
|
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([
|
withKubeConfig([
|
||||||
serverUrl: "$KUBERNETES_API",
|
serverUrl: "$KUBERNETES_API",
|
||||||
credentialsId: 'kubernetes',
|
credentialsId: 'kubernetes',
|
||||||
namespace: 'salix'
|
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-$BRANCH_NAME hedera-web-$BRANCH_NAME=$IMAGE:$TAG'
|
||||||
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-cron-$BRANCH_NAME hedera-web-cron-$BRANCH_NAME=$IMAGE:$TAG'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
hedera-web (24.14.8) stable; urgency=low
|
hedera-web (24.14.10) stable; urgency=low
|
||||||
|
|
||||||
* Initial Release.
|
* Initial Release.
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,9 @@
|
||||||
version: '3.7'
|
version: '3.7'
|
||||||
services:
|
services:
|
||||||
main:
|
main:
|
||||||
image: registry.verdnatura.es/hedera-web:${VERSION:?}
|
image: registry.verdnatura.es/verdnatura/hedera-web:${TAG:?}
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
args:
|
args:
|
||||||
- VERSION=${VERSION:?}
|
- VERSION=${VERSION:?}
|
||||||
cron:
|
|
||||||
image: registry.verdnatura.es/hedera-web:${VERSION:?}
|
|
||||||
command: 'cron -f'
|
|
||||||
|
|
|
@ -117,7 +117,7 @@
|
||||||
SELECT i.id, i.longName item, i.subName,
|
SELECT i.id, i.longName item, i.subName,
|
||||||
i.tag5, i.value5, i.tag6, i.value6,
|
i.tag5, i.value5, i.tag6, i.value6,
|
||||||
i.tag7, i.value7, i.tag8, i.value8,
|
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,
|
k.name ink, p.name producer, o.name origin,
|
||||||
b.available, b.price, b.`grouping`,
|
b.available, b.price, b.`grouping`,
|
||||||
i.image, im.updated
|
i.image, im.updated
|
||||||
|
@ -126,19 +126,13 @@
|
||||||
LEFT JOIN vn.ink k ON k.id = i.inkFk
|
LEFT JOIN vn.ink k ON k.id = i.inkFk
|
||||||
LEFT JOIN vn.producer p ON p.id = i.producerFk
|
LEFT JOIN vn.producer p ON p.id = i.producerFk
|
||||||
LEFT JOIN vn.origin o ON o.id = i.originFk
|
LEFT JOIN vn.origin o ON o.id = i.originFk
|
||||||
LEFT JOIN image im
|
LEFT JOIN image im ON im.collectionFk = 'catalog'
|
||||||
ON im.collectionFk = 'catalog'
|
|
||||||
AND im.name = i.image
|
AND im.name = i.image
|
||||||
WHERE b.available > 0
|
WHERE b.available > 0
|
||||||
ORDER BY i.relevancy DESC, i.name, i.size
|
ORDER BY i.relevancy DESC, i.name, i.size
|
||||||
LIMIT 5000;
|
LIMIT 5000;
|
||||||
DROP TEMPORARY TABLE
|
DROP TEMPORARY TABLE tmp.item;
|
||||||
tmp.item,
|
CALL vn.ticketCalculatePurge();
|
||||||
tmp.ticketCalculateItem,
|
|
||||||
tmp.ticketComponentPrice,
|
|
||||||
tmp.ticketComponent,
|
|
||||||
tmp.ticketLot,
|
|
||||||
tmp.zoneGetShipped;
|
|
||||||
</db-model>
|
</db-model>
|
||||||
<db-form id="$card" v-model="card" model="items"/>
|
<db-form id="$card" v-model="card" model="items"/>
|
||||||
<vn-lot id="card-lot"/>
|
<vn-lot id="card-lot"/>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "hedera-web",
|
"name": "hedera-web",
|
||||||
"version": "24.14.8",
|
"version": "24.14.10",
|
||||||
"description": "Verdnatura web page",
|
"description": "Verdnatura web page",
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|
Loading…
Reference in New Issue