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:
@@ -5,7 +5,6 @@ import tech.avroid.scm.Git
|
|||||||
import tech.avroid.jenkins.Notifications
|
import tech.avroid.jenkins.Notifications
|
||||||
import tech.avroid.jenkins.Jenkins
|
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 repositoryName = 'msg-files' // Replace with your Harbor repository name
|
||||||
String k8sAppName = repositoryName
|
String k8sAppName = repositoryName
|
||||||
Map envBranch = [
|
Map envBranch = [
|
||||||
@@ -13,8 +12,6 @@ Map envBranch = [
|
|||||||
'TEST': 'test'
|
'TEST': 'test'
|
||||||
]
|
]
|
||||||
|
|
||||||
String apiUrl = "https://${JENKINS_DOCKER_REGISTRY}/api/v2.0/projects/${projectName}" +
|
|
||||||
"/repositories/${repositoryName}/artifacts"
|
|
||||||
properties([
|
properties([
|
||||||
buildDiscarder(logRotator(artifactNumToKeepStr: '10',
|
buildDiscarder(logRotator(artifactNumToKeepStr: '10',
|
||||||
numToKeepStr: '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 branch = envBranch.find { it.key == params.ENV }?.value
|
||||||
String valuesPath = ".helm/values.${params.ENV.toLowerCase()}.yaml"
|
String valuesPath = ".helm/values.${params.ENV.toLowerCase()}.yaml"
|
||||||
String namespace = "tavro-cloud-${params.ENV.toLowerCase()}"
|
String namespace = "tavro-cloud-${params.ENV.toLowerCase()}"
|
||||||
|
|
||||||
|
|
||||||
String helmChart = 'msg-files'
|
String helmRepoPath = "avroid/${repositoryName}"
|
||||||
String helmRepoPath = "avroid/${helmChart}"
|
|
||||||
String helmRepo = "${env.JENKINS_NEXUS_URL}/repository/devops-helm-release"
|
String helmRepo = "${env.JENKINS_NEXUS_URL}/repository/devops-helm-release"
|
||||||
println(branch)
|
println(branch)
|
||||||
Git git = new Git(this, env.JENKINS_GIT_CREDENTIALS_SSH)
|
Git git = new Git(this, env.JENKINS_GIT_CREDENTIALS_SSH)
|
||||||
|
|||||||
@@ -5,17 +5,13 @@ import tech.avroid.scm.Git
|
|||||||
import tech.avroid.jenkins.Notifications
|
import tech.avroid.jenkins.Notifications
|
||||||
import tech.avroid.jenkins.Jenkins
|
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 repositoryName = 'msg-messenger-core-api' // Replace with your Harbor repository name
|
||||||
String k8sAppName = repositoryName
|
String k8sAppName = repositoryName
|
||||||
String pageSize = 100 // maximum number of artifacts to return 100
|
|
||||||
Map envBranch = [
|
Map envBranch = [
|
||||||
'DEV': 'develop',
|
'DEV': 'develop',
|
||||||
'TEST': 'test'
|
'TEST': 'test'
|
||||||
]
|
]
|
||||||
|
|
||||||
String apiUrl = "https://${JENKINS_DOCKER_REGISTRY}/api/v2.0/projects/${projectName}" +
|
|
||||||
"/repositories/${repositoryName}/artifacts"
|
|
||||||
properties([
|
properties([
|
||||||
buildDiscarder(logRotator(artifactDaysToKeepStr: '',
|
buildDiscarder(logRotator(artifactDaysToKeepStr: '',
|
||||||
artifactNumToKeepStr: '10',
|
artifactNumToKeepStr: '10',
|
||||||
@@ -54,8 +50,8 @@ def createGetHttpClient(String url, String jenkinsCreds) {
|
|||||||
return httpClient
|
return httpClient
|
||||||
}
|
}
|
||||||
|
|
||||||
String harborApiUrl = "https://${JENKINS_DOCKER_REGISTRY}/api/v2.0/projects/cloud/repositories/msg-messenger-core-api/" +
|
String harborApiUrl = "https://${JENKINS_DOCKER_REGISTRY}/api/v2.0/projects/cloud/repositories/" +
|
||||||
"artifacts?page=1&page_size=100&with_tag=true&sort=-push_time"
|
"msg-messenger-core-api/artifacts?page=1&page_size=100&with_tag=true&sort=-push_time"
|
||||||
|
|
||||||
def httpClientHarbor = createGetHttpClient(harborApiUrl, "${JENKINS_HARBOR_CREDENTIALS}")
|
def httpClientHarbor = createGetHttpClient(harborApiUrl, "${JENKINS_HARBOR_CREDENTIALS}")
|
||||||
httpClientHarbor.connect()
|
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 branch = envBranch.find { it.key == params.ENV }?.value
|
||||||
String valuesPath = ".helm/values.${params.ENV.toLowerCase()}.yaml"
|
String valuesPath = ".helm/values.${params.ENV.toLowerCase()}.yaml"
|
||||||
String namespace = "tavro-cloud-${params.ENV.toLowerCase()}"
|
String namespace = "tavro-cloud-${params.ENV.toLowerCase()}"
|
||||||
|
|
||||||
|
String helmRepoPath = "avroid/${repositoryName}"
|
||||||
String helmChart = 'msg-messenger-core-api'
|
|
||||||
String helmRepoPath = "avroid/${helmChart}"
|
|
||||||
String helmRepo = "${env.JENKINS_NEXUS_URL}/repository/devops-helm-release"
|
String helmRepo = "${env.JENKINS_NEXUS_URL}/repository/devops-helm-release"
|
||||||
println(branch)
|
println(branch)
|
||||||
Git git = new Git(this, env.JENKINS_GIT_CREDENTIALS_SSH)
|
Git git = new Git(this, env.JENKINS_GIT_CREDENTIALS_SSH)
|
||||||
|
|||||||
@@ -5,17 +5,13 @@ import tech.avroid.scm.Git
|
|||||||
import tech.avroid.jenkins.Notifications
|
import tech.avroid.jenkins.Notifications
|
||||||
import tech.avroid.jenkins.Jenkins
|
import tech.avroid.jenkins.Jenkins
|
||||||
|
|
||||||
String projectName = 'cloud' // Replace with your Harbor project name
|
String repositoryName = 'msg-profiles'
|
||||||
String repositoryName = 'msg-profiles' // Replace with your Harbor repository name
|
|
||||||
String k8sAppName = repositoryName
|
String k8sAppName = repositoryName
|
||||||
String pageSize = 100 // maximum number of artifacts to return 100
|
|
||||||
Map envBranch = [
|
Map envBranch = [
|
||||||
'DEV': 'develop',
|
'DEV': 'develop',
|
||||||
'TEST': 'test'
|
'TEST': 'test'
|
||||||
]
|
]
|
||||||
|
|
||||||
String apiUrl = "https://${JENKINS_DOCKER_REGISTRY}/api/v2.0/projects/${projectName}" +
|
|
||||||
"/repositories/${repositoryName}/artifacts"
|
|
||||||
properties([
|
properties([
|
||||||
buildDiscarder(logRotator(artifactNumToKeepStr: '10',
|
buildDiscarder(logRotator(artifactNumToKeepStr: '10',
|
||||||
numToKeepStr: '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 branch = envBranch.find { it.key == params.ENV }?.value
|
||||||
String valuesPath = ".helm/values.${params.ENV.toLowerCase()}.yaml"
|
String valuesPath = ".helm/values.${params.ENV.toLowerCase()}.yaml"
|
||||||
String namespace = "tavro-cloud-${params.ENV.toLowerCase()}"
|
String namespace = "tavro-cloud-${params.ENV.toLowerCase()}"
|
||||||
|
|
||||||
|
String helmRepoPath = "avroid/${repositoryName}"
|
||||||
String helmChart = 'msg-profiles'
|
|
||||||
String helmRepoPath = "avroid/${helmChart}"
|
|
||||||
String helmRepo = "${env.JENKINS_NEXUS_URL}/repository/devops-helm-release"
|
String helmRepo = "${env.JENKINS_NEXUS_URL}/repository/devops-helm-release"
|
||||||
println(branch)
|
println(branch)
|
||||||
Git git = new Git(this, env.JENKINS_GIT_CREDENTIALS_SSH)
|
Git git = new Git(this, env.JENKINS_GIT_CREDENTIALS_SSH)
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ String branch = 'master'
|
|||||||
String valuesPath = 'avroid.local/api-gateway/openresty'
|
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/${helmChart}"
|
||||||
String helmRepo = "${env.JENKINS_NEXUS_URL}/repository/devops-helm-release"
|
String helmRepo = "${env.JENKINS_NEXUS_URL}/repository/devops-helm-release"
|
||||||
|
|
||||||
Map configuration = [
|
Map configuration = [
|
||||||
|
|||||||
Reference in New Issue
Block a user