From 0d249b526cb346275e3fd263a9ce0f862b8141b5 Mon Sep 17 00:00:00 2001 From: AlexeerCT Date: Tue, 31 Mar 2026 18:12:32 -0500 Subject: [PATCH] Update Jenkinsfile to change Git repository URL and credentials for deployment --- Jenkinsfile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 15343777..06ea3e89 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -23,8 +23,8 @@ pipeline { $class: 'GitSCM', branches: [[name: "*/${params.ENVIRONMENT}"]], userRemoteConfigs: [[ - url: 'git@gitea.company.com:repo/anexo76.git', - credentialsId: 'gitea-ssh' + url: 'https://git.aduanasoft.com/ADUANASOFT/anexo76.git', + credentialsId: 'gitea_acazares' ]], extensions: [[$class: 'CloneOption', depth: 0, shallow: false]] ]) @@ -129,14 +129,15 @@ pipeline { expression { params.ENVIRONMENT == 'main' } } steps { - sshagent(credentials: ['gitea-ssh']) { + withCredentials([usernamePassword(credentialsId: 'gitea_acazares', usernameVariable: 'GIT_USERNAME', passwordVariable: 'GIT_PASSWORD')]) { sh ''' set -euo pipefail git -c user.name='Jenkins' -c user.email='jenkins@gitea.local' \ tag -a "v${APP_VERSION}" -m "Release version ${APP_VERSION}" + git remote set-url origin "https://${GIT_USERNAME}:${GIT_PASSWORD}@git.aduanasoft.com/ADUANASOFT/anexo76.git" git push origin "v${APP_VERSION}" ''' - } + } } }