Update Jenkinsfile to change Git repository URL and credentials for deployment

This commit is contained in:
2026-03-31 18:12:32 -05:00
parent 44b1f4b033
commit 0d249b526c

9
Jenkinsfile vendored
View File

@@ -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}"
'''
}
}
}
}