feat: refs #7442 Kubernetes deploy
gitea/vn-support/pipeline/head There was a failure building this commit Details

This commit is contained in:
Juan Ferrer 2024-05-27 13:42:17 +02:00
parent 720035f770
commit facc7be940
4 changed files with 30 additions and 15 deletions

22
Jenkinsfile vendored
View File

@ -8,7 +8,8 @@ pipeline {
stages {
stage('Checkout') {
steps {
setEnv()
echo "NODE_NAME: ${env.NODE_NAME}"
echo "WORKSPACE: ${env.WORKSPACE}"
}
}
stage('Build') {
@ -19,6 +20,10 @@ pipeline {
CREDENTIALS = credentials('docker-registry')
}
steps {
script {
def packageJson = readJSON file: 'package.json'
env.VERSION = packageJson.version
}
dockerBuild()
}
}
@ -26,16 +31,25 @@ pipeline {
when {
branch 'master'
}
environment {
DOCKER_HOST = "${env.SWARM_HOST}"
}
steps {
script {
def packageJson = readJSON file: 'package.json'
env.VERSION = packageJson.version
}
withKubeConfig([
serverUrl: "$KUBERNETES_API",
credentialsId: 'kubernetes',
namespace: 'support'
]) {
sh 'kubectl set image deployment/support support=$REGISTRY/vn-support:$VERSION'
}
dockerStackDeploy()
}
}
}
post {
always {
setEnv()
sendEmail()
}
}

2
debian/changelog vendored
View File

@ -1,4 +1,4 @@
vn-support (2.0.12) stable; urgency=low
vn-support (24.20.1) stable; urgency=low
* Initial Release.

View File

@ -2,14 +2,5 @@
version: '3.7'
services:
main:
image: registry.verdnatura.es/vn-support
image: registry.verdnatura.es/vn-support:${VERSION:?}
build: .
ports:
- 80
deploy:
placement:
constraints:
- node.role == worker
resources:
limits:
memory: 500M

10
package.json Normal file
View File

@ -0,0 +1,10 @@
{
"name": "vn-support",
"version": "24.20.1",
"description": "Verdnatura remote support tool and download page",
"license": "GPL-3.0",
"repository": {
"type": "git",
"url": "https://gitea.verdnatura.es/vn-support"
}
}