OP#547 initial commit after forking

This commit is contained in:
2026-03-29 15:54:10 +02:00
committed by Jenkins Server
parent 1160e843d2
commit b2f6565b29
37 changed files with 93 additions and 3016 deletions

35
Jenkinsfile vendored
View File

@@ -1,7 +1,5 @@
pipeline {
agent {
label 'puppet'
}
agent any
post {
always {
@@ -69,7 +67,7 @@ pipeline {
withCredentials([string(credentialsId: 'sonar-token', variable: 'SONAR_TOKEN')]) {
sh '''
/opt/sonar-scanner/bin/sonar-scanner \
-Dsonar.projectKey=automatic_cd \
-Dsonar.projectKey=confdroid_automatic \
-Dsonar.sources=. \
-Dsonar.host.url=https://sonarqube.confdroid.com \
-Dsonar.token=$SONAR_TOKEN
@@ -90,6 +88,10 @@ pipeline {
sh '''
git config user.name "Jenkins Server"
git config user.email jenkins@confdroid.com
git rm -r --cached .scannerwork || echo "No .scannerwork to remove from git"
git rm -r --cached .yardoc || echo "No .yardoc to remove from git"
git rm -r --cached .vscode || echo "No .vscode to remove from git"
git commit --amend --no-edit --allow-empty
git add -A && git commit -am "Recommit for updates in build $BUILD_NUMBER" || echo "No changes to commit"
git push -o merge_request.create \
-o merge_request.target=master \
@@ -101,5 +103,30 @@ pipeline {
}
}
}
stage('Mirror to Gitea') {
steps {
withCredentials([usernamePassword(
credentialsId: 'Jenkins-gitea',
usernameVariable: 'GITEA_USER',
passwordVariable: 'GITEA_TOKEN')]) {
script {
// Checkout from GitLab (already done implicitly)
sh '''
git checkout master
git pull origin master
git branch -D development
git branch -D jenkins-build-$BUILD_NUMBER
git rm -f Jenkinsfile
git rm -r --cached .vscode || echo "No .vscode to remove from git"
git commit --amend --no-edit --allow-empty
git remote add master https://sourcecode.confdroid.com/confdroid/confdroid_automatic.git
git -c credential.helper="!f() { echo username=${GITEA_USER}; echo password=${GITEA_TOKEN}; }; f" \
push master --mirror
'''
}
}
}
}
}
}