From 5404dd47d08d6850918d684a88ce42e2aefdcb42 Mon Sep 17 00:00:00 2001 From: Rustam Tagaev Date: Mon, 20 Jan 2025 17:27:39 +0300 Subject: [PATCH] [DO-1503] rename project cloud-messenger-core-api (!65) Co-authored-by: Rustam Tagaev Reviewed-on: https://git.avroid.tech/DevOps/jenkins-pipelines/pulls/65 --- ...core_api.groovy => msg_messenger_core_api.groovy} | 12 ++++++------ ...y.groovy => msg_messenger_core_api_deploy.groovy} | 6 +++--- ...core-api.groovy => msg-messenger-core-api.groovy} | 6 +++--- .../Deploy/cloud-messenger-core-api-deploy.groovy | 10 +++++----- 4 files changed, 17 insertions(+), 17 deletions(-) rename jobs-dsl/jobs/Cloud/Apps-Backend/{cloud_messenger_core_api.groovy => msg_messenger_core_api.groovy} (89%) rename jobs-dsl/jobs/Cloud/Deploy/{cloud_messenger_core_api_deploy.groovy => msg_messenger_core_api_deploy.groovy} (92%) rename pipelines/Cloud/Apps-Backend/{cloud-messenger-core-api.groovy => msg-messenger-core-api.groovy} (94%) diff --git a/jobs-dsl/jobs/Cloud/Apps-Backend/cloud_messenger_core_api.groovy b/jobs-dsl/jobs/Cloud/Apps-Backend/msg_messenger_core_api.groovy similarity index 89% rename from jobs-dsl/jobs/Cloud/Apps-Backend/cloud_messenger_core_api.groovy rename to jobs-dsl/jobs/Cloud/Apps-Backend/msg_messenger_core_api.groovy index 9e66a91..f370d2d 100644 --- a/jobs-dsl/jobs/Cloud/Apps-Backend/cloud_messenger_core_api.groovy +++ b/jobs-dsl/jobs/Cloud/Apps-Backend/msg_messenger_core_api.groovy @@ -1,13 +1,13 @@ -multibranchPipelineJob('Cloud/Apps-Backend/cloud-messenger-core-api') { - description('cloud-messenger-core-api') - displayName('cloud-messenger-core-api') +multibranchPipelineJob('Cloud/Apps-Backend/msg-messenger-core-api') { + description('msg-messenger-core-api') + displayName('msg-messenger-core-api') factory { remoteJenkinsFileWorkflowBranchProjectFactory { localMarker('') matchBranches(true) fallbackBranch('master') lookupInParameters(false) - remoteJenkinsFile('pipelines/Cloud/Apps-Backend/cloud-messenger-core-api.groovy') + remoteJenkinsFile('pipelines/Cloud/Apps-Backend/msg-messenger-core-api.groovy') remoteJenkinsFileSCM { gitSCM { userRemoteConfigs { @@ -31,9 +31,9 @@ multibranchPipelineJob('Cloud/Apps-Backend/cloud-messenger-core-api') { giteaSCMSource { serverUrl("${JENKINS_GIT_REPOSITORY_URL}") repoOwner('Apps-Backend') - repository('cloud-messenger-core-api') + repository('msg-messenger-core-api') credentialsId("${JENKINS_GIT_CREDENTIALS_HTTP}") - id('Apps-Backend/cloud-messenger-core-api') + id('Apps-Backend/msg-messenger-core-api') traits { giteaBranchDiscovery { // 1 Exclude branches that are also filed as PRs diff --git a/jobs-dsl/jobs/Cloud/Deploy/cloud_messenger_core_api_deploy.groovy b/jobs-dsl/jobs/Cloud/Deploy/msg_messenger_core_api_deploy.groovy similarity index 92% rename from jobs-dsl/jobs/Cloud/Deploy/cloud_messenger_core_api_deploy.groovy rename to jobs-dsl/jobs/Cloud/Deploy/msg_messenger_core_api_deploy.groovy index a05c340..96c2dc6 100644 --- a/jobs-dsl/jobs/Cloud/Deploy/cloud_messenger_core_api_deploy.groovy +++ b/jobs-dsl/jobs/Cloud/Deploy/msg_messenger_core_api_deploy.groovy @@ -1,4 +1,4 @@ -pipelineJob('Cloud/Deploy/cloud-messenger-core-api-deploy') { +pipelineJob('Cloud/Deploy/msg-messenger-core-api-deploy') { logRotator { numToKeep(10) artifactNumToKeep(10) @@ -44,7 +44,7 @@ def createGetHttpClient(String url, String jenkinsCreds) { return httpClient } -String harborApiUrl = "https://${JENKINS_DOCKER_REGISTRY}/api/v2.0/projects/cloud/repositories/cloud-messenger-core-api/" + +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}") @@ -81,7 +81,7 @@ return imageVersions branch('master') } } - scriptPath('pipelines/Cloud/Deploy/cloud-messenger-core-api-deploy.groovy') + scriptPath('pipelines/Cloud/Deploy/msg-messenger-core-api-deploy.groovy') } } } diff --git a/pipelines/Cloud/Apps-Backend/cloud-messenger-core-api.groovy b/pipelines/Cloud/Apps-Backend/msg-messenger-core-api.groovy similarity index 94% rename from pipelines/Cloud/Apps-Backend/cloud-messenger-core-api.groovy rename to pipelines/Cloud/Apps-Backend/msg-messenger-core-api.groovy index 660feda..99ef6de 100644 --- a/pipelines/Cloud/Apps-Backend/cloud-messenger-core-api.groovy +++ b/pipelines/Cloud/Apps-Backend/msg-messenger-core-api.groovy @@ -13,10 +13,10 @@ properties([ Git git = new Git(this, env.JENKINS_GIT_CREDENTIALS_SSH) -String repoPath = 'Apps-Backend/cloud-messenger-core-api.git' +String repoPath = 'Apps-Backend/msg-messenger-core-api.git' String publishBranch = 'develop' String dockerGroup = 'cloud' -String dockerProject = 'cloud-messenger-core-api' +String dockerProject = 'msg-messenger-core-api' String projectSettingFile = 'pyproject.toml' Map gitVars = [:] String tag = '' @@ -84,7 +84,7 @@ slaveTemplates.jnlp { } stage('deploy application'){ if (git.getBranch() == publishBranch){ - build job: 'Cloud/Deploy/cloud-messenger-core-api-deploy', + build job: 'Cloud/Deploy/msg-messenger-core-api-deploy', parameters: [ string(name: 'ENV', value: 'DEV'), string(name: 'APP_VERSION', value: tag) diff --git a/pipelines/Cloud/Deploy/cloud-messenger-core-api-deploy.groovy b/pipelines/Cloud/Deploy/cloud-messenger-core-api-deploy.groovy index 45e836e..3d13a8d 100644 --- a/pipelines/Cloud/Deploy/cloud-messenger-core-api-deploy.groovy +++ b/pipelines/Cloud/Deploy/cloud-messenger-core-api-deploy.groovy @@ -6,7 +6,7 @@ import tech.avroid.jenkins.Notifications import tech.avroid.jenkins.Jenkins String projectName = 'cloud' // Replace with your Harbor project name -String repositoryName = 'cloud-messenger-core-api' // Replace with your Harbor repository name +String repositoryName = 'msg-messenger-core-api' // Replace with your Harbor repository name String pageSize = 100 // maximum number of artifacts to return 100 String apiUrl = "https://${JENKINS_DOCKER_REGISTRY}/api/v2.0/projects/${projectName}" + "/repositories/${repositoryName}/artifacts" @@ -48,7 +48,7 @@ def createGetHttpClient(String url, String jenkinsCreds) { return httpClient } -String harborApiUrl = "https://${JENKINS_DOCKER_REGISTRY}/api/v2.0/projects/cloud/repositories/cloud-messenger-core-api/" + +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}") @@ -71,14 +71,14 @@ return imageVersions ]) -String repoPath = 'Apps-Backend/cloud-messenger-core-api.git' +String repoPath = 'Apps-Backend/msg-messenger-core-api.git' String branch = 'develop' String valuesPath = ".helm/values.${params.ENV.toLowerCase()}.yaml" String namespace = "tavro-cloud-${params.ENV.toLowerCase()}" -String helmChart = 'helm-cloud-messenger-core-api' -String helmRepoPath = 'avroid/helm-cloud-messenger-core-api' +String helmChart = 'helm-msg-messenger-core-api' +String helmRepoPath = 'avroid/helm-msg-messenger-core-api' String helmRepo = "${env.JENKINS_NEXUS_URL}/repository/avroid-charts"