0
0
Fork 0

refs #6797 feat(jenkins) deploy dev-lilium

This commit is contained in:
Alex Moreno 2024-02-20 15:05:50 +01:00
parent df2bb66538
commit 87c5e6fe60
1 changed files with 10 additions and 9 deletions

19
Jenkinsfile vendored
View File

@ -49,6 +49,9 @@ pipeline {
options { options {
disableConcurrentBuilds() disableConcurrentBuilds()
} }
tools {
nodejs 'node-v18'
}
environment { environment {
PROJECT_NAME = 'lilium' PROJECT_NAME = 'lilium'
STACK_NAME = "${env.PROJECT_NAME}-${env.BRANCH_NAME}" STACK_NAME = "${env.PROJECT_NAME}-${env.BRANCH_NAME}"
@ -59,9 +62,7 @@ pipeline {
NODE_ENV = "" NODE_ENV = ""
} }
steps { steps {
nodejs('node-v18') { sh 'bun install --no-audit --prefer-offline'
sh 'bun install --no-audit --prefer-offline'
}
} }
} }
stage('Test') { stage('Test') {
@ -74,9 +75,7 @@ pipeline {
parallel { parallel {
stage('Frontend') { stage('Frontend') {
steps { steps {
nodejs('node-v18') { sh 'bun run test:unit:ci'
sh 'bun run test:unit:ci'
}
} }
} }
} }
@ -89,9 +88,7 @@ pipeline {
CREDENTIALS = credentials('docker-registry') CREDENTIALS = credentials('docker-registry')
} }
steps { steps {
nodejs('node-v18') { sh 'quasar build'
sh 'quasar build'
}
// dockerBuild() // dockerBuild()
} }
} }
@ -103,6 +100,10 @@ pipeline {
DOCKER_HOST = "${env.SWARM_HOST}" DOCKER_HOST = "${env.SWARM_HOST}"
} }
steps { 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}" sh "docker stack deploy --with-registry-auth --compose-file docker-compose.yml ${env.STACK_NAME}"
} }
} }