OP#581 edit jenkinsfile so the mirror only receives relevant files

This commit is contained in:
2026-04-16 16:07:54 +02:00
parent 6b79ed1b50
commit 002172003a

7
Jenkinsfile vendored
View File

@@ -115,13 +115,14 @@ pipeline {
script { script {
sh ''' sh '''
git fetch origin git fetch origin
git checkout master git checkout -B gitea-mirror-$BUILD_NUMBER origin/master
git reset --hard origin/master git rm -f Jenkinsfile
git commit -m "Remove Jenkinsfile for Gitea mirror" || echo "No changes to commit"
git remote get-url master >/dev/null 2>&1 \ git remote get-url master >/dev/null 2>&1 \
&& git remote set-url master https://sourcecode.confdroid.com/confdroid/confdroid_jenkins.git \ && git remote set-url master https://sourcecode.confdroid.com/confdroid/confdroid_jenkins.git \
|| git remote add master https://sourcecode.confdroid.com/confdroid/confdroid_jenkins.git || git remote add master https://sourcecode.confdroid.com/confdroid/confdroid_jenkins.git
git -c credential.helper="!f() { echo username=${GITEA_USER}; echo password=${GITEA_TOKEN}; }; f" \ git -c credential.helper="!f() { echo username=${GITEA_USER}; echo password=${GITEA_TOKEN}; }; f" \
push --force master refs/heads/master:refs/heads/master push --force master HEAD:refs/heads/master
''' '''
} }
} }