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

This commit is contained in:
2026-04-16 16:08:48 +02:00
parent 002172003a
commit 96abe7bd38

6
Jenkinsfile vendored
View File

@@ -123,6 +123,12 @@ pipeline {
|| 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" \
push --force master HEAD:refs/heads/master
git ls-remote --heads master | awk '{print $2}' | sed 's#refs/heads/##' | while read branch; do
if [ -n "$branch" ] && [ "$branch" != "master" ]; then
git -c credential.helper="!f() { echo username=${GITEA_USER}; echo password=${GITEA_TOKEN}; }; f" \
push master --delete "$branch"
fi
done
'''
}
}