hotfix/DO-00/some_refactoring (!59)
Co-authored-by: Rustam Tagaev <rustam.tagaev@avroid.tech> Reviewed-on: https://git.avroid.tech/DevOps/jenkins-pipelines/pulls/59
This commit is contained in:
@@ -19,6 +19,7 @@ String valuesPath = 'avroid.local/api-gateway/openresty'
|
|||||||
String namespace = 'api-gateway'
|
String namespace = 'api-gateway'
|
||||||
String helmChart = 'openresty'
|
String helmChart = 'openresty'
|
||||||
String helmRepoPath = 'avroid/openresty'
|
String helmRepoPath = 'avroid/openresty'
|
||||||
|
String helmRepo = "${env.JENKINS_NEXUS_URL}/repository/avroid-charts"
|
||||||
|
|
||||||
Map configuration = [
|
Map configuration = [
|
||||||
vaultUrl: env.JENKINS_VAULT_URL,
|
vaultUrl: env.JENKINS_VAULT_URL,
|
||||||
@@ -40,7 +41,6 @@ PodTemplates slaveTemplates = new PodTemplates(this, env.JENKINS_DOCKER_REGISTRY
|
|||||||
|
|
||||||
slaveTemplates.jnlp {
|
slaveTemplates.jnlp {
|
||||||
slaveTemplates.helm {
|
slaveTemplates.helm {
|
||||||
slaveTemplates.kubectl {
|
|
||||||
try {
|
try {
|
||||||
node(POD_LABEL){
|
node(POD_LABEL){
|
||||||
withVault([configuration: configuration, vaultSecrets: dockerCreds]) {
|
withVault([configuration: configuration, vaultSecrets: dockerCreds]) {
|
||||||
@@ -52,8 +52,9 @@ slaveTemplates.jnlp {
|
|||||||
stage('deploy'){
|
stage('deploy'){
|
||||||
dir(valuesPath){
|
dir(valuesPath){
|
||||||
sh """#!/bin/sh
|
sh """#!/bin/sh
|
||||||
helm repo add avroid ${env.JENKINS_NEXUS_URL}/repository/devops-helm-release
|
helm repo add avroid ${helmRepo}
|
||||||
helm -n ${namespace} upgrade -f values.yaml --install ${helmChart} ${helmRepoPath}
|
helm -n ${namespace} upgrade -f values.yaml \
|
||||||
|
--install ${helmChart} ${helmRepoPath}
|
||||||
"""
|
"""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -79,7 +80,5 @@ slaveTemplates.jnlp {
|
|||||||
to: "${currentBuildUser}@avroid.team"
|
to: "${currentBuildUser}@avroid.team"
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user