hotfix/DO-0/some_refactoring - remove unused vars (!104)

Co-authored-by: Rustam Tagaev <rustam.tagaev@avroid.tech>
Reviewed-on: https://git.avroid.tech/DevOps/jenkins-pipelines/pulls/104
Reviewed-by: Aleksandr Vodyanov <aleksandr.vodyanov@avroid.team>
Reviewed-by: Denis Patrakeev <denis.patrakeev@avroid.team>
This commit is contained in:
Rustam Tagaev
2025-03-13 15:16:52 +03:00
parent 8ad06c6d32
commit b4b9e54cd4
4 changed files with 14 additions and 30 deletions

View File

@@ -5,7 +5,6 @@ import tech.avroid.scm.Git
import tech.avroid.jenkins.Notifications
import tech.avroid.jenkins.Jenkins
String projectName = 'cloud' // Replace with your Harbor project name
String repositoryName = 'msg-files' // Replace with your Harbor repository name
String k8sAppName = repositoryName
Map envBranch = [
@@ -13,8 +12,6 @@ Map envBranch = [
'TEST': 'test'
]
String apiUrl = "https://${JENKINS_DOCKER_REGISTRY}/api/v2.0/projects/${projectName}" +
"/repositories/${repositoryName}/artifacts"
properties([
buildDiscarder(logRotator(artifactNumToKeepStr: '10',
numToKeepStr: '10')),
@@ -72,14 +69,13 @@ return imageVersions
])
])
String repoPath = 'Apps-Backend/msg-files.git'
String repoPath = "Apps-Backend/${repositoryName}.git"
String branch = envBranch.find { it.key == params.ENV }?.value
String valuesPath = ".helm/values.${params.ENV.toLowerCase()}.yaml"
String namespace = "tavro-cloud-${params.ENV.toLowerCase()}"
String helmChart = 'msg-files'
String helmRepoPath = "avroid/${helmChart}"
String helmRepoPath = "avroid/${repositoryName}"
String helmRepo = "${env.JENKINS_NEXUS_URL}/repository/devops-helm-release"
println(branch)
Git git = new Git(this, env.JENKINS_GIT_CREDENTIALS_SSH)

View File

@@ -5,17 +5,13 @@ import tech.avroid.scm.Git
import tech.avroid.jenkins.Notifications
import tech.avroid.jenkins.Jenkins
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([
buildDiscarder(logRotator(artifactDaysToKeepStr: '',
artifactNumToKeepStr: '10',
@@ -54,8 +50,8 @@ def createGetHttpClient(String url, String jenkinsCreds) {
return httpClient
}
String harborApiUrl = "https://${JENKINS_DOCKER_REGISTRY}/api/v2.0/projects/cloud/repositories/msg-messenger-core-api/" +
"artifacts?page=1&page_size=100&with_tag=true&sort=-push_time"
String harborApiUrl = "https://${JENKINS_DOCKER_REGISTRY}/api/v2.0/projects/cloud/repositories/" +
"msg-messenger-core-api/artifacts?page=1&page_size=100&with_tag=true&sort=-push_time"
def httpClientHarbor = createGetHttpClient(harborApiUrl, "${JENKINS_HARBOR_CREDENTIALS}")
httpClientHarbor.connect()
@@ -75,14 +71,12 @@ return imageVersions
])
])
String repoPath = 'Apps-Backend/msg-messenger-core-api.git'
String repoPath = "Apps-Backend/${repositoryName}.git"
String branch = envBranch.find { it.key == params.ENV }?.value
String valuesPath = ".helm/values.${params.ENV.toLowerCase()}.yaml"
String namespace = "tavro-cloud-${params.ENV.toLowerCase()}"
String helmChart = 'msg-messenger-core-api'
String helmRepoPath = "avroid/${helmChart}"
String helmRepoPath = "avroid/${repositoryName}"
String helmRepo = "${env.JENKINS_NEXUS_URL}/repository/devops-helm-release"
println(branch)
Git git = new Git(this, env.JENKINS_GIT_CREDENTIALS_SSH)

View File

@@ -5,17 +5,13 @@ import tech.avroid.scm.Git
import tech.avroid.jenkins.Notifications
import tech.avroid.jenkins.Jenkins
String projectName = 'cloud' // Replace with your Harbor project name
String repositoryName = 'msg-profiles' // Replace with your Harbor repository name
String repositoryName = 'msg-profiles'
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([
buildDiscarder(logRotator(artifactNumToKeepStr: '10',
numToKeepStr: '10')),
@@ -73,14 +69,12 @@ return imageVersions
])
])
String repoPath = 'Apps-Backend/msg-profiles.git'
String repoPath = "Apps-Backend/${repositoryName}.git"
String branch = envBranch.find { it.key == params.ENV }?.value
String valuesPath = ".helm/values.${params.ENV.toLowerCase()}.yaml"
String namespace = "tavro-cloud-${params.ENV.toLowerCase()}"
String helmChart = 'msg-profiles'
String helmRepoPath = "avroid/${helmChart}"
String helmRepoPath = "avroid/${repositoryName}"
String helmRepo = "${env.JENKINS_NEXUS_URL}/repository/devops-helm-release"
println(branch)
Git git = new Git(this, env.JENKINS_GIT_CREDENTIALS_SSH)

View File

@@ -18,7 +18,7 @@ String branch = 'master'
String valuesPath = 'avroid.local/api-gateway/openresty'
String namespace = 'api-gateway'
String helmChart = 'openresty'
String helmRepoPath = 'avroid/openresty'
String helmRepoPath = "avroid/${helmChart}"
String helmRepo = "${env.JENKINS_NEXUS_URL}/repository/devops-helm-release"
Map configuration = [