OP#581 edit jenkinsfile so the mirror only receives relevant files
This commit is contained in:
7
Jenkinsfile
vendored
7
Jenkinsfile
vendored
@@ -115,13 +115,14 @@ pipeline {
|
||||
script {
|
||||
sh '''
|
||||
git fetch origin
|
||||
git checkout master
|
||||
git reset --hard origin/master
|
||||
git checkout -B gitea-mirror-$BUILD_NUMBER 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 set-url 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" \
|
||||
push --force master refs/heads/master:refs/heads/master
|
||||
push --force master HEAD:refs/heads/master
|
||||
'''
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user