Compare commits

...

4 Commits

Author SHA1 Message Date
c3c92ecd4b OP#586 edit warning section 2026-04-16 22:03:53 +02:00
f7c6180b01 OP#586 add tagging sync 2026-04-16 22:01:10 +02:00
e923c8c0e2 OP#586 add tagging sync 2026-04-16 22:00:34 +02:00
8c7d3947cb OP#586 add tagging sync 2026-04-16 21:57:39 +02:00
2 changed files with 22 additions and 6 deletions

23
Jenkinsfile vendored
View File

@@ -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 '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
'''
}
}

View File

@@ -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)
@@ -22,7 +23,7 @@
## WARNING
***Attention: Never use this puppet module on systems which have been previously configured manually. It is impossible to predict how and what would have been configured, hence previous configurations outside the scope of this module may be overwritten! Automated configurations require a test environment to verify that the module suits the purpose intended by the user, as well as tune the parameters, before deploying into live production***
> **Attention: Never use this puppet module on systems which have been previously configured manually. It is impossible to predict how and what would have been configured, hence previous configurations outside the scope of this module may be overwritten! Automated configurations require a test environment to verify that the module suits the purpose intended by the user, as well as tune the parameters, before deploying into live production**
## Features