From dc5f244579d83d1c58055282963ae3bb16effa2d Mon Sep 17 00:00:00 2001 From: Arne Teuke Date: Wed, 26 Nov 2025 20:15:07 +0100 Subject: [PATCH] add step to push to gitea --- Jenkinsfile | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 9094235..88176b7 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -91,19 +91,14 @@ pipeline { git config user.name "Jenkins Server" git config user.email jenkins@confdroid.com git add -A && git commit -am "Recommit for updates in build $BUILD_NUMBER" || echo "No changes to commit" - git push -o merge_request.create \ - -o merge_request.target=master \ - -o merge_request.title="Auto-merge for build $BUILD_NUMBER" \ - -o merge_request.description="Automated changes from Jenkins build $BUILD_NUMBER" \ - -o merge_request.merge_when_pipeline_succeeds=true \ - origin jenkins-build-$BUILD_NUMBER + git push origin HEAD:master + ''' } } } stage('Mirror to Gitea') { - when { branch 'master' } steps { withCredentials([usernamePassword( credentialsId: 'Jenkins-gitea', @@ -113,16 +108,14 @@ pipeline { // Checkout from GitLab (already done implicitly) sh ''' git remote remove gitea || true - git remote add gitea https://gitea.confdroid.com/confdroid/puppet_cd.git + git checkout master + git remote add master https://gitea.confdroid.com/confdroid/puppet_cd.git git -c credential.helper="!f() { echo username=${GITEA_USER}; echo password=${GITEA_TOKEN}; }; f" \ - push gitea refs/heads/master:refs/heads/master --tags + git push origin HEAD:master --tags ''' } } } -/* - when { branch 'master' } // Only on main branch to avoid noise -*/ } } }