OP#581 edit jenkinsfile so the mirror only receives relevant files
This commit is contained in:
6
Jenkinsfile
vendored
6
Jenkinsfile
vendored
@@ -123,6 +123,12 @@ pipeline {
|
|||||||
|| 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 HEAD:refs/heads/master
|
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
|
||||||
'''
|
'''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user