feature/DO-1628_CICD_msg_test (!84)
Reviewed-on: https://git.avroid.tech/DevOps/jenkins-pipelines/pulls/84 Reviewed-by: Rustam Tagaev <rustam.tagaev@avroid.team> Reviewed-by: Denis Patrakeev <denis.patrakeev@avroid.team>
This commit is contained in:
@@ -9,6 +9,11 @@ String projectName = 'cloud' // Replace with your Harbor project name
|
||||
String repositoryName = 'msg-messenger-core-api' // Replace with your Harbor repository name
|
||||
String k8sAppName = repositoryName
|
||||
String pageSize = 100 // maximum number of artifacts to return 100
|
||||
Map envBranch = [
|
||||
'DEV': 'develop',
|
||||
'TEST': 'test'
|
||||
]
|
||||
|
||||
String apiUrl = "https://${JENKINS_DOCKER_REGISTRY}/api/v2.0/projects/${projectName}" +
|
||||
"/repositories/${repositoryName}/artifacts"
|
||||
properties([
|
||||
@@ -20,7 +25,7 @@ properties([
|
||||
parameters([
|
||||
choice(
|
||||
name: 'ENV',
|
||||
choices: ['DEV'],
|
||||
choices: envBranch.keySet().toList(),
|
||||
description: 'Select one of environments'
|
||||
),
|
||||
[$class: 'ChoiceParameter',
|
||||
@@ -70,10 +75,8 @@ return imageVersions
|
||||
])
|
||||
|
||||
])
|
||||
|
||||
|
||||
String repoPath = 'Apps-Backend/msg-messenger-core-api.git'
|
||||
String branch = 'develop'
|
||||
String branch = envBranch.find { it.key == params.ENV }?.value
|
||||
String valuesPath = ".helm/values.${params.ENV.toLowerCase()}.yaml"
|
||||
String namespace = "tavro-cloud-${params.ENV.toLowerCase()}"
|
||||
|
||||
@@ -81,11 +84,11 @@ String namespace = "tavro-cloud-${params.ENV.toLowerCase()}"
|
||||
String helmChart = 'msg-messenger-core-api'
|
||||
String helmRepoPath = "avroid/${helmChart}"
|
||||
String helmRepo = "${env.JENKINS_NEXUS_URL}/repository/devops-helm-release"
|
||||
|
||||
println(branch)
|
||||
Git git = new Git(this, env.JENKINS_GIT_CREDENTIALS_SSH)
|
||||
PodTemplates slaveTemplates = new PodTemplates(this, env.JENKINS_DOCKER_REGISTRY,
|
||||
["${env.JENKINS_K8S_HARBOR_SECRET}"],
|
||||
'avroid-office')
|
||||
["${env.JENKINS_K8S_HARBOR_SECRET}"],
|
||||
'avroid-office')
|
||||
|
||||
slaveTemplates.jnlp {
|
||||
slaveTemplates.helm {
|
||||
|
||||
Reference in New Issue
Block a user