From d89334d424af8aef920581c3657df2507c420140 Mon Sep 17 00:00:00 2001 From: konsthol Date: Thu, 29 May 2025 11:23:26 +0300 Subject: [PATCH] Update vars/jenkinsPipelineSkeleton.groovy --- vars/jenkinsPipelineSkeleton.groovy | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/vars/jenkinsPipelineSkeleton.groovy b/vars/jenkinsPipelineSkeleton.groovy index d50a45f..d307f35 100644 --- a/vars/jenkinsPipelineSkeleton.groovy +++ b/vars/jenkinsPipelineSkeleton.groovy @@ -36,14 +36,30 @@ def call(String projectName, Map config) { } } - stage('Build and Deploy') { - steps { - script { - buildAndDeploy(projectName, config.helmChart, config.helmRepo, config.namespace, config.version, config.useCustomDocker, config.useInsecureRegistry, config.port, config.quarkusDBName, config.quarkusDBPass) + withCredentials([ + string(credentialsId: 'quarkus-db-secret', variable: 'QUARKUS_DB_USER'), + string(credentialsId: 'quarkus-db-secret', variable: 'QUARKUS_DB_PASSWORD') + ]) { + stage('Build and Deploy') { + steps { + script { + buildAndDeploy( + projectName, + config.helmChart, + config.helmRepo, + config.namespace, + config.version, + config.useCustomDocker, + config.useInsecureRegistry, + config.port, + QUARKUS_DB_PASSWORD, + QUARKUS_DB_PASSWORD + ) + } + } } } } - } post { success { echo "Build for '${projectName}' was successful!"