From 8c7d3947cbe52a5004722032169ee88d151e0b4d Mon Sep 17 00:00:00 2001 From: 12ww1160 <12ww1160@confdroid.com> Date: Thu, 16 Apr 2026 21:57:39 +0200 Subject: [PATCH 1/4] OP#586 add tagging sync --- Jenkinsfile | 23 +++++++++++++++++++---- README.md | 1 + 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index febb0f7..6838119 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -113,14 +113,29 @@ pipeline { passwordVariable: 'GITEA_TOKEN')]) { script { sh ''' - git fetch origin - git checkout master - git reset --hard origin/master + git fetch --tags origin + 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_java.git \ || git remote add master https://sourcecode.confdroid.com/confdroid/confdroid_java.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 + 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 + git -c credential.helper="!f() { echo username=${GITEA_USER}; echo password=${GITEA_TOKEN}; }; f" \ + push master --tags + git ls-remote --tags master | awk '{print $2}' | sed -e 's#refs/tags/##' -e 's/\^{}$//' | sort -u | while read tag; do + if [ -n "$tag" ] && ! git show-ref --tags --verify --quiet "refs/tags/$tag"; then + git -c credential.helper="!f() { echo username=${GITEA_USER}; echo password=${GITEA_TOKEN}; }; f" \ + push master ":refs/tags/$tag" + fi + done ''' } } diff --git a/README.md b/README.md index 8e29bc1..23ced6b 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # Readme [![Build Status](https://jenkins.confdroid.com/buildStatus/icon?job=confdroid_java&style=plastic)](https://jenkins.confdroid.com/job/confdroid_java/) +[![Security Hotspots](https://sonarqube.confdroid.com/api/project_badges/measure?project=confdroid_java&metric=security_hotspots&token=sqb_c7b9021dbe66678773699d0232454ad6cc64234f)](https://sonarqube.confdroid.com/dashboard?id=confdroid_java) - [Readme](#readme) - [Synopsis](#synopsis) From e923c8c0e2c26cea4f8703d2e0e41f82e9586568 Mon Sep 17 00:00:00 2001 From: 12ww1160 <12ww1160@confdroid.com> Date: Thu, 16 Apr 2026 22:00:34 +0200 Subject: [PATCH 2/4] OP#586 add tagging sync --- Jenkinsfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 6838119..ac287db 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -118,8 +118,8 @@ pipeline { 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_java.git \ - || git remote add master https://sourcecode.confdroid.com/confdroid/confdroid_java.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 -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 @@ -130,13 +130,13 @@ pipeline { done git -c credential.helper="!f() { echo username=${GITEA_USER}; echo password=${GITEA_TOKEN}; }; f" \ push master --tags - git ls-remote --tags master | awk '{print $2}' | sed -e 's#refs/tags/##' -e 's/\^{}$//' | sort -u | while read tag; do + git ls-remote --tags master | awk '{print $2}' | sed 's#refs/tags/##' | cut -d'^' -f1 | sort -u | while read tag; do if [ -n "$tag" ] && ! git show-ref --tags --verify --quiet "refs/tags/$tag"; then git -c credential.helper="!f() { echo username=${GITEA_USER}; echo password=${GITEA_TOKEN}; }; f" \ push master ":refs/tags/$tag" fi done - ''' + ''' } } } From f7c6180b017810eaa772d8d901dc0a0c5126ca60 Mon Sep 17 00:00:00 2001 From: 12ww1160 <12ww1160@confdroid.com> Date: Thu, 16 Apr 2026 22:01:10 +0200 Subject: [PATCH 3/4] OP#586 add tagging sync --- Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index ac287db..8647b2c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -118,8 +118,8 @@ pipeline { 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 remote set-url master https://sourcecode.confdroid.com/confdroid/confdroid_java.git \ + || git remote add master https://sourcecode.confdroid.com/confdroid/confdroid_java.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 From c9495162e3042d235dae23a50b05ae2c6f35bd71 Mon Sep 17 00:00:00 2001 From: Jenkins Server Date: Thu, 16 Apr 2026 22:02:12 +0200 Subject: [PATCH 4/4] Recommit for updates in build 4 --- doc/file.README.html | 2 +- doc/index.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/file.README.html b/doc/file.README.html index 7c2b3e3..ba3936d 100644 --- a/doc/file.README.html +++ b/doc/file.README.html @@ -60,7 +60,7 @@

Readme

-

+

  • Readme

  • diff --git a/doc/index.html b/doc/index.html index 9c3f78c..1952c33 100644 --- a/doc/index.html +++ b/doc/index.html @@ -60,7 +60,7 @@

    Readme

    -

    +