diff --git a/Jenkinsfile b/Jenkinsfile index 33c9d78..4959f6b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -116,10 +116,11 @@ pipeline { git fetch origin git checkout master git reset --hard origin/master - git remote remove gitea || true - git remote add gitea https://sourcecode.confdroid.com/confdroid/confdroid_ssh.git + git remote get-url master >/dev/null 2>&1 \ + && git remote set-url master https://sourcecode.confdroid.com/confdroid/confdroid_ssh.git \ + || git remote add master https://sourcecode.confdroid.com/confdroid/confdroid_ssh.git git -c credential.helper="!f() { echo username=${GITEA_USER}; echo password=${GITEA_TOKEN}; }; f" \ - push gitea refs/heads/master:refs/heads/master + push --force master refs/heads/master:refs/heads/master ''' } }